API POST Request Format

POST Request Format

The structure of a GET request is shown in the reference section for each API entity and method. For POST requests, however, the structure needs to be slightly more complex.

Each transaction in the request is posted individually or can be grouped so that a number of transactions are posted together.

The XML content tags for an inbound POST request on the Bluestore API are:

  • The root tag : <Inbound lang=”” enterprise=”” requestNo=””>
    • The enterprise attribute holds the enterprise code, this is optional so can be left empty. It is used for some internal API calls and is not strictly required.
    • The requestNo attribute is a reference that can be assigned freely by the source system to match the response back to the request.
    • For the language attribute 'en' is currently the only supported entry.
  • The grouping tag  : <Batch batchNo=””> 
    • For transactions that should be processed together. 
    • The batchNo is an integer starting from 1 so that each batch can be easily referenced in the response.
    • They should either all be successful or all fail.
    • The batch tag can contain several structures (either of similar or of different types)
    • The order of the batch elements is optional but will be preserved if they ordered as follows. Each element can appear once, multiple times or not at all.
      • products
      • barcodes
      • costPrices
      • salePrices
      • customers
      • exchangeRates
      • transactionSales
  •  Additional attribute : docNo=”” 
    • Each transaction within a request has this attribute which is an integer incrementing from 1 within each batch.

POST Response Format

For each POST request there is a generic XML response regardless of the transactions in the request.

The content tags for an Inbound POST response are:

  • Level 1 <InboundResponse requestNo=””>
    • The root tag. Attribute requestNo contains the original reference assigned to the request.
  • Level 1 <RequestSuccess
    • Set as true if all batches and transactions in the request were successful.
  • Level 1<Batch batchNo=””> 
    • Repeating grouping tag with batch reference number.
  • Level 2 <BatchSuccess
    • true or false
  • Level 2 <Transaction docNo=””> 
    • Repeating tag for each transaction. 
    • docNo is the original reference from the request docNo attribute for the transaction. 
  • Level 3 <TransactionSuccess
    • true or false
  • Level 3 <BluestoreRef
    • Populated with the Bluestore transaction reference generated if the transaction was posted successfully e.g. sale transaction number.
  • Level 3 <Message id=”” type=”” lang=””>
    • Message details (can be repeating if required).
    • The language is the same as that specified in the Inbound attribute.
    • Message id is the system message id and type is E, I, S or W (error, information, success or warning).
Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk