Documentation

API for Headless Tracking Integrations

For headless integrations, Ingrid provides a dedicated API endpoint, GetTrackingParcels, returning current tracking status of parcels together with complete order information.

To obtain the data you need, make a GET request to v1/delivery_tracking/parcels using one of three possible identifiers.

Identifiers

Pass either tracking_number or external_id in the request. Passing both of them at the same time will result in an error. When token is provided, the other parameters (even if provided) are ignored.

Using tracking number

When a tracking number is passed in the request, the response will only contain information about the parcel associated with the provided tracking number.

GET /v1/delivery_tracking/parcels?tracking_number=<TRACKING_NUMBER> HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer <BASE64-ENCODED-API-TOKEN>
HTTP/1.1 200 OK
Date: Fri, 28 Oct 2022 16:07:11 GMT
Content-Type: application/json
Content-Length: 656
Vary: Accept-Encoding

{
"parcels": [
{
"tracking_number": "<TRACKING_NUMBER_1>",
"current_progress": {
"step": "STEP_DELIVERED_TO_CONSUMER",
"time": "2023-09-05T12:45:28Z"
},
"progress_history": [
{
"step": "STEP_DELIVERED_TO_CONSUMER",
"time": "2023-09-05T12:45:28Z"
},
{
"step": "STEP_DELIVERED_TO_PICKUP_POINT",
"time": "2023-09-05T12:35:28Z"
},
{
"step": "STEP_ON_ROUTE",
"time": "2023-09-05T12:35:28Z"
},
{
"step": "STEP_SUBMITTED_TO_CARRIER",
"time": "2023-09-05T12:35:28Z"
},
{
"step": "STEP_PREPARED_BY_MERCHANT",
"time": "2023-09-05T12:30:38Z"
},
{
"step": "STEP_CONFIRMED_BY_MERCHANT",
"time": "2023-09-05T12:30:31Z"
}
],
"carrier_name": "Carrier Postnord",
"sender": {
"name": "The Example Store",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
}
},
"destination": {
"name": "Ingrid Customer",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
},
"location_type": "MANNED"
},
"receiver": {
"name": "Ingrid",
"email": "ingrid.customer@example.com",
"phone_number": "+1234567890",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
}
},
"shipping_method": "pnl-mpc",
"shipping_methods": [
{
"origin": "ORDER",
"value": "pnl-mpc"
},
{
"origin": "BOOKING",
"value": "pnl-mpx"
}
]
}
],
"external_id": "<EXTERNAL_ID>",
"tracking_link": "<TRACKING_LINK>",
"tos_id": "<TOS_ID>"
}

Using order external identifier

To retrieve information for all parcels related to a specific order, use an order external identifier (external_id) instead of a tracking number.

GET /v1/delivery_tracking/parcels?external_id=<EXTERNAL_ID> HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer <BASE64-ENCODED-API-TOKEN>
HTTP/1.1 200 OK
Date: Fri, 28 Oct 2022 16:07:11 GMT
Content-Type: application/json
Content-Length: 1156
Vary: Accept-Encoding

{
"parcels": [
{
"tracking_number": "<TRACKING_NUMBER_1>",
"current_progress": {
"step": "STEP_DELIVERED_TO_CONSUMER",
"time": "2023-09-05T12:45:28Z"
},
"progress_history": [
{
"step": "STEP_DELIVERED_TO_CONSUMER",
"time": "2023-09-05T12:45:28Z"
},
{
"step": "STEP_DELIVERED_TO_PICKUP_POINT",
"time": "2023-09-05T12:35:28Z"
},
{
"step": "STEP_ON_ROUTE",
"time": "2023-09-05T12:35:28Z"
},
{
"step": "STEP_SUBMITTED_TO_CARRIER",
"time": "2023-09-05T12:35:28Z"
},
{
"step": "STEP_PREPARED_BY_MERCHANT",
"time": "2023-09-05T12:30:38Z"
},
{
"step": "STEP_CONFIRMED_BY_MERCHANT",
"time": "2023-09-05T12:30:31Z"
}
],
"carrier_name": "Carrier Postnord",
"sender": {
"name": "The Example Store",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
}
},
"destination": {
"name": "Ingrid Customer",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
},
"location_type": "MANNED"
},
"receiver": {
"name": "Ingrid",
"email": "ingrid.customer@example.com",
"phone_number": "+1234567890",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
}
},
"shipping_method": "pnl-mpc"
},
{
"tracking_number": "<TRACKING_NUMBER_2>",
"current_progress": {
"step": "STEP_DELIVERED_TO_CONSUMER",
"time": "2023-09-06T14:30:00Z"
},
"progress_history": [
{
"step": "STEP_DELIVERED_TO_CONSUMER",
"time": "2023-09-06T14:30:00Z"
},
{
"step": "STEP_DELIVERED_TO_PICKUP_POINT",
"time": "2023-09-06T14:00:00Z"
},
{
"step": "STEP_ON_ROUTE",
"time": "2023-09-06T14:00:00Z"
},
{
"step": "STEP_SUBMITTED_TO_CARRIER",
"time": "2023-09-06T14:00:00Z"
},
{
"step": "STEP_PREPARED_BY_MERCHANT",
"time": "2023-09-06T13:45:00Z"
},
{
"step": "STEP_CONFIRMED_BY_MERCHANT",
"time": "2023-09-06T13:40:00Z"
}
],
"carrier_name": "Carrier Postnord",
"sender": {
"name": "The Example Store",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
}
},
"destination": {
"name": "Ingrid Customer",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
},
"location_type": "MANNED"
},
"receiver": {
"name": "Ingrid",
"email": "ingrid.customer@example.com",
"phone_number": "+1234567890",
"address": {
"city": "Stockholm",
"postal_code": "11120",
"country": "SE"
}
},
"shipping_method": "pnl-mpc",
"shipping_methods": [
{
"origin": "ORDER",
"value": "pnl-mpc"
},
{
"origin": "BOOKING",
"value": "pnl-mpx"
}
]
}
],
"external_id": "<EXTERNAL_ID>",
"tracking_link": "<TRACKING_LINK>",
"tos_id": "<TOS_ID>"
}

Using tracking token

In addition to tracking number and external_id, you can also use a tracking token to make requests to the GetTrackingParcels endpoint. This method requires more extensive setup, as you need to obtain a tracking token beforehand. This approach is typically employed when integrating the GetTrackingParcels endpoint with other Ingrid Delivery Tracking products, such as the Tracking Widget or Tracking Notifications. If you're interested in implementing this solution, please reach out to Ingrid Customer Support.

Last updated: Wed, Nov 20, 06:15 AM