Skip to main content

Delete Barcode

Deleting a Barcode

Contents

Overview

  • Call name: delete-barcode
  • Endpoint URL: https://{API hostname}/internal/delete-barcode
  • Request methods: DELETE
  • Request Content-Type: application/x-www-form-urlencoded
  • Response Content-Type: application/json
  • Auth required: yes

This endpoint allows deleting a barcode from the Spaaza system.

Version-specific information

The following version-specific changes apply to this endpoint. See the versioning page for more details.

VersionChange details
N/AN/A

Permissions and Authentication

This API call requires admin authentication:

  • The performing user must be logged in and have DELETE access to the chain that owns the barcode
  • User and privileged authentication methods are not permitted for this endpoint

Headers

Standard headers are used for this endpoint. No special headers are required.

HTTP Parameters

The following HTTP parameters can be passed to the API:

ParameterDescription
id(integer, mandatory) The unique identifier of the barcode to delete

Sample request

DELETE /internal/delete-barcode HTTP/1.1
Content-Type: application/x-www-form-urlencoded

id=3

Sample response

{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"barcode": {
"barcode": "2000042436019",
"created_date": "2025-01-24T12:00:00+00:00",
"deleted": true,
"id": 3,
"last_modified_date": "2025-01-24T12:00:00+00:00",
"product_variant_id": 3
},
"result_type": "delete-barcode"
}
}

Possible error responses

CodeName and DescriptionHTTP Status Code
6no_valid_session
The user needs to be logged in and a valid session key needs to be sent
401
52http_vars_missing
The required id parameter is missing
400
68permission_denied_or_non_existent
This user has insufficient permissions for this object or the object does not exist
403
255inventory_barcode_id_invalid
The barcode ID must be an integer 10 digits or less
400
257inventory_barcode_id_not_found
No barcode was found with the specified ID
404
330server_error
Unexpected server error
500