exportBarcodes.php
SM JSON Barcode Reservation Service
Endpoint: ExportBarcodes.php
This service reserves one or more barcodes from a ticket item (print@home packing type) and returns them if available. Mostly used with the webshop.
Parameters:
user: SM user name for authenticationpassword: SM user password for authenticationitemnr: the ItemNr from which you reserve the barcodesbranchnr: BranchNr on which to reserve the barcodesquantity(optional): number of barcodes to reserve. When missing, it will be set to 1eventnr(optional): if the reservation is done for an event, you should send the EventId here
Return Values of the JSON Structure:
success: true or falsestatus: numeric status, see table below for detailsdata: if success is true, returns an array of barcodes
Status Codes:
- 0: Execution of the service succeeded
- 102: Cannot connect to database/server
- 103: Authentication failure
- 104: ItemNr missing
- 105: BranchNr missing
- 106: No barcode available
Examples:
Request:
- ExportBarcodes.php?user=user&password=password&itemnr=35509&branchnr=5&quantity=1&eventnr=20476
Get barcodes
{
"success": true,
"status": 0,
"data": {
"reservedbarcodes": [
"6127439193265"
]
}
}