Skip to main content

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 authentication
  • password: SM user password for authentication
  • itemnr: the ItemNr from which you reserve the barcodes
  • branchnr: BranchNr on which to reserve the barcodes
  • quantity (optional): number of barcodes to reserve. When missing, it will be set to 1
  • eventnr (optional): if the reservation is done for an event, you should send the EventId here

Return Values of the JSON Structure:

  • success: true or false
  • status: numeric status, see table below for details
  • data: 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"
]
}
}