Read order overview (shipping, goods receipt and returns) and tracking V2
Promail REST API 2.0 is an easy way to exchange and manipulate data with the Promail platform.
The current orders (dispatch, returns or goods receipt) can be called up with the "Read order - API".
The response contains information such as tracking number, shipping date or differences in goods receipt. older version V1 (until June 2021)
Basic HTTP
The API is HTTP based. That means the API can be used with HTTP libraries like cURL or urllib.
This allows the API to be used directly in the browser.
Host url
The requests can be sent to the url https://test.deal1.ch/PromailRESTstatusV2.php.
Json
The answers are returned in the JavaScript language "Json".
examples below.
GET
The API reacts to the API Send methods and controls different functions.
The GET method must be used for status + tracking.
Access Key and API_Name
In order to use the API, the correct access keys and desired API name must be included in the API call.
The API uses 3 keys, which are transferred when the API is called.
"Key" = x6R38e94z721GtUp (the key is related to your Promail account).
"PrivatKey" = Must be requested from Promail.
"Your_Email" = Your main account email address. Promail will be happy to provide you with information.
The corresponding interface is selected with "API name". Partners/customers receive the access key by sending an email to office@promail-ag.ch. As a GET query, the access keys are used as follows: https://test.deal1.ch/PromailRESTstatusV2.php?partner=Key label>*PrivateKey:Your_Email&lieferzettel_nr=1234
or for the last 100 orders: https://test.deal1.ch/PromailRESTstatusV2.php?partner=Key label>*PrivateKey:Your_Email&lieferschein_nr=last
With group the query can be further restricted.
group=post -> Orders sent by post are displayed.
group=dhl -> Orders sent with DHL are displayed.
group=gls -> Orders sent with GLS are displayed.
group=truck -> Orders sent by truck are displayed.
group=return -> Returns are displayed.
group=delivery -> Goods receipts are displayed.
For example: https://www.deal1.ch/PromailRESTstatusV2.php?partner=Key label>*PrivateKey:Your_Email&lieferschein_nr=last&group =delivery
GET Query Status + Tracking
In the following example PHP code, a query is submitted using cURL:
status "success" = Order has been sent
status "unchecked" = Order not checked yet
status "in progress" = order in progress
status "done" = Order ready but not sent yet
status "deleted" = Order has been deleted
Error Messages+Success Messages
If the API is successfully called, an http status 200 is sent.
If the call was unsuccessful, an http status 401 is sent.