Zenki
Zenki Home Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Add tracking numbers to the orders.

The following endpoint helps us to load tracking numbers to orders pending shipment. The process of uploading tracking guides to orders is very simple, we need to reference the order with the order identifier and/or the merchant’s internal order number, add the shipping company code as an optional parameter, and finally the tracking number.

This service will give us as a response a summary of accepted orders, rejected orders and orders not found. Also with the detail of orders with failed shipment.

💡 Remember that you must use the previously generated Bearer Token Access Token


ENDPOINT

POST  https://api.zenki.fi/v1/api/tracking 
  • Headers
    • Accept: application/json
    • Authorization: Bearer Tokens
  • Authorization [Bearer Token]
    • Token: (token)
  • Body [raw / json]
    • orderId : (string | required)
    • merchantOrderId : (string)
    • courier : (string)
    • trackingId : (string | required)
  • Response attributes
    • acceptedOrders: (number)
    • rejectedOrders: (number)
    • ordersNotFound: (number)
    • ordersSelectCourier: (number)
    • shipmentFailed: (Array)
      • orderId: (string)
      • merchantOrderId: (string)
      • trackingId: (string)
      • courier: (string)
      • errorMessage: (string)
    • shipmentSelectCourier: (Array)
      • orderId: (string)
      • merchantOrderId: (string)
      • trackingId: (string)
      • courier: (string)
      • possibleCouriers: (Array)
        • key: (string)
        • country: (string)
        • url: (string)
        • name: (string)
        • nameZhCn: (string)
        • nameZhHk: (string)
        • group: (string)

cURL

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
curl --request POST \
     --url https://api.zenki.fi/v1/api/tracking \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIwenJMTnEwbzBab1R4NTlaeWVPaTI1RGxZLWl6cV91SVFSLThWS0RaWjlFIn0.eyJleHAiOjE2NjE3OTg0NDgsImlhdCI6MTY2MTc5NjY0OCwianRpIjoiOWNlZjIwNjItYTc1OS00NzllLWJlYTctZDQ1NzRiYWIzYzM5IiwiaXNzIjoiaHR0cHM6Ly9kZXYtYXV0aC56ZW5raS5maS9h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4A7AeqfzxH02BrZpTHuq3ZL4_3JtlL5OvRcBQ8hA7pnnDA5ukSlcfuztnNzxkd7o3ktM1Wclni4RKtl_Flu4Du2FaFU9sub7LPJMb_BlHmXphWUNOe5JF_csncvPK-6O0qYokMUWlxi48O2y8fNkC0kWlUZHqEjm2PT7QeHW3oq515kV3Vg' \
     --header 'Content-Type: application/json' \
     --data '
[{
     "orderId": "79d8d1bae04642cc8f86cce2f521f3a0",
     "trackingId": "3212434451",
     "courier": "1",
     "merchantOrderId": "290822A"
}]
'

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  "acceptedOrders": 1,
  "rejectedOrders": 1,
  "ordersNotFound": 0,
  "ordersSelectCourier": 1,
  "shipmentFailed": [
    {
      "orderId": "79d8d1bae04642cc8f86cce2f521f3a0",
      "merchantOrderId": "67643321241",
      "trackingId": "1456456",
      "courier": 12,
      "errorMessage": "The value of '12' is invalid."
    }
  ],
  "shipmentSelectCourier": [
    {
      "orderId": "717df0e00fe849aeaa76ff27355ff3a0",
      "merchantOrderId": null,
      "trackingId": "906587618687",
      "courier": null,
      "possibleCouriers": [
        {
          "key": "100003",
          "country": "0",
          "countryIso": "",
          "url": "http://www.fedex.com/",
          "name": "Fedex",
          "nameZhCn": "Fedex",
          "nameZhHk": "Fedex",
          "group": "11"
        },
        {
          "key": "100005",
          "country": "0",
          "countryIso": "",
          "url": "https://gls-group.eu/EU/en/home",
          "name": "GLS",
          "nameZhCn": "GLS",
          "nameZhHk": "GLS",
          "group": "11"
        }
      ]
    }
  ]
}

Errors

Code Description json
401 The request has not been executed because it lacks valid authentication credentials for the requested resource. Unauthorized