Link Search Menu Expand Document

Deleting a Barcode

Contents

Overview

  • Call name: delete-barcode
  • Endpoint URL: https://api0.spaaza.com/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.

Version Change details
N/A N/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:

Parameter Description
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

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