Trackings (GET)#
Tracking information are uploaded at 6:00 pm German time.
GET api/trackings
You can access tracking-information as follows:
- Doing a
GET
-request against the endpointapi/orders
allows you to query bystatus
.- If you search for
status=shipped
you can fetch the latest tracking-ids and then update the status tocomplete
(viaPATCH
-request) afterwards.
- If you search for
- Doing a
GET
-request against the endpointapi/orders
allows you to query byexternalOrderNumber
.- The returned order will include links to trackings (if available) as a list.
- Doing a
GET
-request against the endpointapi/trackings
allows you to query by params likecreatedAt*
ororder.externalOrderNumber
.- The response will include tracking-resources (if available) as a list.
Parameters#
NAME | TYPE | DESCRIPTION |
---|---|---|
createdAt[before] |
string | Optional - Date(time) to filter trackings that have been created at or before said datetime |
createdAt[strictly_before] |
string | Optional - Date(time) to filter trackings that have been created before said datetime |
createdAt[after] |
string | Optional - Date(time) to filter trackings that have been created at or after said datetime |
createdAt[strictly_after] |
string | Optional - Date(time) to filter trackings that have been created after said datetime |
order.externalOrderNumber |
string | Optional - the ordernumber from your system |
itemsPerPage |
integer | Optional - allows the restriction of results per page |
page |
integer | Optional - number of page (useful for paginated responses) |
Response#
- If tracking isn't available, an empty list will be returned.
- Besides the tracking-id and the shipment-date, the response will also include the courier the parcel is shipped with. This allows you to create "clickable" tracking-URLs.
- If an item is shipped by Bulk carrier the courier will be
Bulk carrier
while the tracking-id will only contain a single_
(underscore).
{
"@context": {
"@vocab": "https://api.1concepts.de/v2/api/docs.jsonld#",
"hydra": "http://www.w3.org/ns/hydra/core#",
"courier": "Tracking/courier",
"status": "Tracking/status",
"trackingId": "Tracking/trackingId",
"order": {
"@id": "Tracking/order",
"@type": "@id"
},
"createdAt": "Tracking/createdAt"
},
"@id": "/v2/api/trackings",
"@type": "hydra:Collection",
"hydra:member": [
{
"@id": "/v2/api/trackings/2",
"@type": "Tracking",
"id": 2,
"order": "/v2/api/orders/27",
"createdAt": "2019-11-28T17:25:58+01:00",
"courier": "DHL",
"status": "shipped",
"trackingId": "297988728381"
}
],
"hydra:totalItems": 3017,
"hydra:view": {
"@id": "/v2/api/trackings?itemsPerPage=1&page=1",
"@type": "hydra:PartialCollectionView",
"hydra:first": "/v2/api/trackings?itemsPerPage=1&page=1",
"hydra:last": "/v2/api/trackings?itemsPerPage=1&page=3017",
"hydra:next": "/v2/api/trackings?itemsPerPage=1&page=2"
},
"hydra:search": {
"@type": "hydra:IriTemplate",
"hydra:template": "/v2/api/trackings{?createdAt[before],createdAt[strictly_before],createdAt[after],createdAt[strictly_after],order.externalOrderNumber}",
"hydra:variableRepresentation": "BasicRepresentation",
"hydra:mapping": [
{
"@type": "IriTemplateMapping",
"variable": "createdAt[before]",
"property": "createdAt",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "createdAt[strictly_before]",
"property": "createdAt",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "createdAt[after]",
"property": "createdAt",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "createdAt[strictly_after]",
"property": "createdAt",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "order.externalOrderNumber",
"property": "order.externalOrderNumber",
"required": false
}
]
}
}