DC API
Intro
The DC API is intended to provide download and print related functionality to warehouses and distribution centres.
The API consists of a download endpoint and several print focused endpoints, through which clients can programmatically trigger and route their prints.
DC API URLs
Production
Beta
Authentication
Treat the API key and API password like you would any other password, since whoever has access to these credentials has full API access.
To interact with the Retain.me Order API, your application must provide the necessary authentication credentials on each HTTP request to the Retain.me Order API. The way to provide these credentials is more or less the same with which ever tech stack you choose to use.
Applications can interact with the Retain.me Order API via basic HTTP authentication over SSL. The required credentials must be generated/requested from the Retain.Me team and can be regenerated upon request.
Applications authenticate through basic HTTP authorization, where the API key of the application is the username, and the API Password is the password.
Some HTTP clients support basic authentication by prepending username:password to the hostname in the URL. For example:
POST 45634643FGDFGFDG:hfcdethuzzjhg54 @'https://orders-beta.smartslip.io/api/v2/orders'
If your HTTP client doesn't support basic authentication using this method, then you can provide the credentials in the Authorization header field instead:
Join the API key and API password with a single colon (:). Encode the resulting string in base64 representation. Prepend the base64-encoded string with Basic and a space:
Authorization: Basic NDQ3OGViN2FjMTM4YTEzNjg1MmJhYmQ4NjE5NTZ...=
API Requests
Cancel & Print objects are self explanatory, save for the SourceID, explained below: The Source_id is only used to determine the printer the SMARTSlip® should be printed to. If you have 1 printer only, this is not required. For an implementation with multiple printers, the source ID's should be set as P1, P2, P3 etc. The sources relate to the aliases in the retain.me Fulfill application (fulfill.smartslip.io) which are then associated to the printers (the aliases can be moved in the fulfill app if there is a problem with a printer). See Retain.me browser based application section for more information.
Batch Print is a single API request sent in for a batch of orders sent with the same batch ID (as defined in the order API Order object, batch_id - https://orders-beta.smartslip.io/v2)
For detailed information on Batch Printing, please request API Print methods document by emailing at help@retain.me
Downloaded is an API endpoint which returns True or False depending on if the order PDF for the requested order number has been successfully transferred into the DC and is available for print.
Last updated