Documentation

SOM API

SOM is responsible for shipment order management. Booking and tracking of the shipments, parcels and deliveries. Below are the endpoints (or methods) available.

Domain Model

The domain model consists of three important objects - Shipment, Parcel and Delivery.

graph LR s(Shipment) p(Parcels) d(Deliveries) s-- has many -->p; p-- has many -->d;

General Flow

Creating a Shipment, generating labels and tracking numbers and booking pickup involves three steps.

sequenceDiagram participant C as Client participant S as SOM C->>S: POST /shipments.create S->>C: Return Shipment with Parcels and Deliveries C->>S: POST /shipment.bookParcels S->>C: Return Shipment with Parcels and Deliveries C->>S: POST /deliveries.bookPickup S->>C: Return Delivery
  1. Create a shipment. Shipment, Parcels and Deliveries are created with a single call to shipments.create.
  2. To generate labels and tracking numbers for a Shipment, call shipments.bookParcels. This will create labels and tracking numbers for all Deliveries in the specified Shipment.
  3. The final step is to book one or all Deliveries attached to a Shipment. This is done by calling deliveries.bookPickup with the tracking number as a parameter. Once a delivery has been booked, it is handled by our booking service which will most often generate and upload an EDI file at a configured interval.

Create Shipment

This call creates new shipment, parcels and deliveries at once in SOM. So called Composite Shipment.

tos_id

If you already use our Delivery Checkout solution we highly recommend to provide tos_id in CreateShipment request, in order to connect Shipment with Order. In this case, you don't have to provide all the shipment details, Ingrid will take all the required data for the shipment from the Order. But you still will have a possibility to override TOS Order data with the data you would give in the CreateShipment request.

address_return

Provide address_return in the CreateShipment request in case you want to override a default return address. A default return address is taken from the sender address ("address_from") which is usually the address of your warehouse.

Use case:
An outbound shipment is made from Sweden to Norway, however, you want an inbound shipment (return shipment) to be delivered back to Norway (your hub or warehouse). In this case, you need to provide a Norwegian address in the address return field.

Request 🔗

POST /v1/som/shipments.create HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token

{
"tos_id": "01G1QDS00DVDJ6190NZBCCV229",
"shipping_method": "pnl-mpc",
"shipment_value": 19900,
"shipping_date": "2022-04-28T07:12:06.687Z",
"number_of_parcels": 1,
"external_id": "ACME12345",
"location_ref": "3806098",
"customer_info": {
"name": "Erik Johansson",
"email": "erik@example.com",
"phone": "0761234561",
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Elvegata 12"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
}
},
"address_to": {
"name": "Coop Extra Sandnes",
"address_lines": [
"Elvegata 11"
],
"postal_code": "4306",
"city": "Sandnes",
"country": "NO"
},
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"postal_code": "11556",
"city": "Stockholm",
"country": "SE"
},
"address_return": {
"name": "Acme, Norway Warehouse",
"address_lines": [
"Bestumåsen 190"
],
"postal_code": "0281",
"city": "Oslo",
"country": "NO"
},
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": 1,
"weight": 720,
"dimensions": {
"length": 600,
"width": 300,
"height": 250
},
"tags": [
"shoes",
"indigo",
"class_one"
]
}
]
},
"meta": {
"is_fragile": "true"
}
}

Response 🔗

HTTP/1.1 200 OK
Date: Thu, 28 Apr 2022 07:12:07 GMT
Content-Type: application/json
Content-Length: 1040
Connection: close
Vary: Accept-Encoding
x-trace-id: S202204280712077SCDMN98Y476SFV8

{
"shipment": {
"id": "a5b26fcc-711e-4abf-8737-6eb26f6ed41e",
"site_id": "11756e4a98c64fa9a9c5d627fd88a236",
"customer_info": {
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Elvegata 12"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
},
"phone": "0761234561",
"email": "erik@example.com"
},
"meta": {
"is_fragile": "true"
},
"shipping_date": "2022-04-28T07:12:06Z",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "Coop Extra Sandnes",
"address_lines": [
"Elvegata 11"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
},
"address_return": {
"name": "Acme, Norway Warehouse",
"address_lines": [
"Bestumåsen 190"
],
"city": "Oslo",
"postal_code": "0281",
"country": "NO"
},
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"parcels": [
{
"id": "35928120-30c9-494b-940d-9376a845f325",
"shipment_id": "a5b26fcc-711e-4abf-8737-6eb26f6ed41e",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "69420dac-8e9a-4d64-855f-80887e3a099d",
"parcel_id": "35928120-30c9-494b-940d-9376a845f325",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "Coop Extra Sandnes",
"address_lines": [
"Elvegata 11"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
},
"shipping_method": "pnl-mpc",
"location_ref": "3806098",
"delivery_status": "created",
"address_return": {
"name": "Acme, Norway Warehouse",
"address_lines": [
"Bestumåsen 190"
],
"city": "Oslo",
"postal_code": "0281",
"country": "NO"
},
"created_at": "2022-04-28T07:12:07Z",
"updated_at": "2022-04-28T07:12:07Z"
}
],
"created_at": "2022-04-28T07:12:08Z",
"updated_at": "2022-04-28T07:12:08Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01G1QDS00DVDJ6190NZBCCV229",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
]
},
"created_at": "2022-04-28T07:12:08Z",
"updated_at": "2022-04-28T07:12:08Z",
"direction_type": "UNSPECIFIED"
}
}

Book Parcels

Creates a booking with the shipping company. This is when tracking numbers, tracking links and shipping labels are generated.

Request 🔗

POST /v1/som/shipments.bookParcels HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token

{
"shipment_id": "a5b26fcc-711e-4abf-8737-6eb26f6ed41e"
}

Response 🔗

HTTP/1.1 200 OK
Date: Thu, 28 Apr 2022 07:12:08 GMT
Content-Type: application/json
Content-Length: 54
Connection: close
Vary: Accept-Encoding
x-trace-id: S20220428071208D9P3M4SXB5ZQNKQF

{
"shipment": {
"id": "a5b26fcc-711e-4abf-8737-6eb26f6ed41e",
"site_id": "11756e4a98c64fa9a9c5d627fd88a236",
"customer_info": {
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Elvegata 12"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
},
"phone": "0761234561",
"email": "erik@example.com"
},
"meta": {
"is_fragile": "true"
},
"shipping_date": "2022-04-28T07:12:06Z",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "Coop Extra Sandnes",
"address_lines": [
"Elvegata 11"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
},
"address_return": {
"name": "Acme, Norway Warehouse",
"address_lines": [
"Bestumåsen 190"
],
"city": "Oslo",
"postal_code": "0281",
"country": "NO"
},
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"parcels": [
{
"id": "35928120-30c9-494b-940d-9376a845f325",
"shipment_id": "a5b26fcc-711e-4abf-8737-6eb26f6ed41e",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "69420dac-8e9a-4d64-855f-80887e3a099d",
"parcel_id": "35928120-30c9-494b-940d-9376a845f325",
"tracking_number": "00033333333000138446",
"label_url": "https://api.ingrid.com/v1/labels/path-to-generated-label.svg",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "Coop Extra Sandnes",
"address_lines": [
"Elvegata 11"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
},
"shipping_method": "pnl-mpc",
"location_ref": "3806098",
"delivery_status": "booked",
"address_return": {
"name": "Acme, Norway Warehouse",
"address_lines": [
"Bestumåsen 190"
],
"city": "Oslo",
"postal_code": "0281",
"country": "NO"
},
"tracking_url": "https://tracking.postnord.com/NO?id=00033333333000138446",
"created_at": "2022-04-28T07:12:07Z",
"updated_at": "2022-04-28T07:12:08Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2022-04-28T07:12:06Z"
}
}
],
"created_at": "2022-04-28T07:12:08Z",
"updated_at": "2022-04-28T07:12:08Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01G1QDS00DVDJ6190NZBCCV229",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
]
},
"created_at": "2022-04-28T07:12:08Z",
"updated_at": "2022-04-28T07:12:08Z",
"direction_type": "UNSPECIFIED"
}
}

Book Pickup

When the shipment has received tracking numbers and labels it is time to book pickup. This call makes the actual booking and and notifies the shipping company about the delivery.

Request 🔗

POST /v1/som/deliveries.bookPickup HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token

{
"tracking_number": "00033333333000138422"
}

Response 🔗

HTTP/1.1 200 OK
Date: Thu, 28 Apr 2022 07:12:05 GMT
Content-Type: application/json
Content-Length: 42
Connection: close
Vary: Accept-Encoding
x-trace-id: S20220428071205H4SWZPQFF03J3TDW

{
"delivery": {
"id": "40a9f7a1-fc5d-42fe-a8cb-224530b94ead",
"parcel_id": "0f1fdc5e-9553-4071-9314-fad9794a9dfb",
"tracking_number": "00033333333000138422",
"label_url": "https://api.ingrid.com/v1/labels/path-to-generated-label.svg",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "Coop Extra Sandnes",
"address_lines": [
"Elvegata 11"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
},
"shipping_method": "pnl-mpc",
"location_ref": "3806098",
"delivery_status": "pickup",
"address_return": {
"name": "Acme, Norway Warehouse",
"address_lines": [
"Bestumåsen 190"
],
"city": "Oslo",
"postal_code": "0281",
"country": "NO"
},
"tracking_url": "https://tracking.postnord.com/NO?id=00033333333000138422",
"created_at": "2022-04-28T07:12:04Z",
"updated_at": "2022-04-28T07:12:05Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2022-04-28T07:12:04Z"
}
}
}

Get Delivery

Request 🔗

GET /v1/som/deliveries.get?tracking_number=00033333333000138422 HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token


Response 🔗

HTTP/1.1 200 OK
Date: Thu, 28 Apr 2022 07:12:05 GMT
Content-Type: application/json

Connection: close
Vary: Accept-Encoding
x-trace-id: S2022042807120564162RYG94QMS13E

{
"delivery": {
"id": "40a9f7a1-fc5d-42fe-a8cb-224530b94ead",
"parcel_id": "0f1fdc5e-9553-4071-9314-fad9794a9dfb",
"tracking_number": "00033333333000138422",
"label_url": "https://api.ingrid.com/v1/labels/path-to-generated-label.svg",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "Coop Extra Sandnes",
"address_lines": [
"Elvegata 11"
],
"city": "Sandnes",
"postal_code": "4306",
"country": "NO"
},
"shipping_method": "pnl-mpc",
"location_ref": "3806098",
"delivery_status": "pickup",
"address_return": {
"name": "Acme, Norway Warehouse",
"address_lines": [
"Bestumåsen 190"
],
"city": "Oslo",
"postal_code": "0281",
"country": "NO"
},
"tracking_url": "https://tracking.postnord.com/NO?id=00033333333000138422",
"created_at": "2022-04-28T07:12:04Z",
"updated_at": "2022-04-28T07:12:05Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2022-04-28T07:12:04Z"
}
}
}

Create and Book

Create and book shipment is essentially a wrapper for the three calls shipments.create, shipments.bookParcels and deliveries.bookPickup. It will create a shipment, generate labels and tracking numbers and finally book the created deliveries for pickup, all in one single call.

Request 🔗

POST /v1/som/shipments.createAndBook HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token

{
"shipping_method": "pnl-mpc",
"shipment_value": 19900,
"shipping_date": "2022-04-28T07:12:05.843Z",
"number_of_parcels": 1,
"external_id": "ACME12345",
"location_ref": "592971",
"customer_info": {
"name": "Erik Johansson",
"email": "erik@example.com",
"phone": "0761234561",
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Industrigatan 5"
],
"city": "Stockholm",
"postal_code": "11239",
"country": "SE"
}
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"postal_code": "11556",
"city": "Stockholm",
"country": "SE"
},
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": 1,
"weight": 720,
"dimensions": {
"length": 600,
"width": 300,
"height": 250
},
"tags": [
"shoes",
"indigo",
"class_one"
]
}
]
},
"meta": {
"is_fragile": "true"
}
}

Response 🔗

HTTP/1.1 200 OK
Date: Thu, 28 Apr 2022 07:12:06 GMT
Content-Type: application/json
Content-Length: 887
Connection: close
Vary: Accept-Encoding
x-trace-id: S20220428071206KWEJPM1HR9BS6X45

{
"shipment": {
"id": "b0466817-3d32-47d0-949f-2843cff828bc",
"site_id": "11756e4a98c64fa9a9c5d627fd88a236",
"customer_info": {
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Industrigatan 5"
],
"city": "Stockholm",
"postal_code": "11239",
"country": "SE"
},
"phone": "0761234561",
"email": "erik@example.com"
},
"meta": {
"is_fragile": "true"
},
"shipping_date": "2022-04-28T07:12:05Z",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"parcels": [
{
"id": "77f00e70-2937-4a9f-b8c2-de00d1cfc83e",
"shipment_id": "b0466817-3d32-47d0-949f-2843cff828bc",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "6f0ece62-7228-4040-90ed-d1fb5ae4d96e",
"parcel_id": "77f00e70-2937-4a9f-b8c2-de00d1cfc83e",
"tracking_number": "00033333333000138439",
"label_url": "https://api.ingrid.com/v1/labels/path-to-generated-label.svg",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"shipping_method": "pnl-mpc",
"location_ref": "592971",
"delivery_status": "booked",
"tracking_url": "https://tracking.postnord.com/SE?id=00033333333000138439",
"created_at": "2022-04-28T07:12:06Z",
"updated_at": "2022-04-28T07:12:06Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2022-04-28T07:12:05Z"
}
}
],
"created_at": "2022-04-28T07:12:06Z",
"updated_at": "2022-04-28T07:12:06Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01G1QG6GH2AQN2WTYXKEQKTR82",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
]
},
"created_at": "2022-04-28T07:12:06Z",
"updated_at": "2022-04-28T07:12:06Z",
"direction_type": "UNSPECIFIED"
}
}

Get Shipment

Returns the shipment by a specified parameter.

Request 🔗

GET /v1/som/shipments.get?id=b0466817-3d32-47d0-949f-2843cff828bc HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token


Response 🔗

HTTP/1.1 200 OK
Date: Thu, 28 Apr 2022 07:12:06 GMT
Content-Type: application/json

Connection: close
Vary: Accept-Encoding
x-trace-id: S202204280712063STH0X4N6N6RGH0W

{
"shipment": {
"id": "b0466817-3d32-47d0-949f-2843cff828bc",
"site_id": "11756e4a98c64fa9a9c5d627fd88a236",
"customer_info": {
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Industrigatan 5"
],
"city": "Stockholm",
"postal_code": "11239",
"country": "SE"
},
"phone": "0761234561",
"email": "erik@example.com"
},
"meta": {
"is_fragile": "true"
},
"shipping_date": "2022-04-28T07:12:05Z",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"parcels": [
{
"id": "77f00e70-2937-4a9f-b8c2-de00d1cfc83e",
"shipment_id": "b0466817-3d32-47d0-949f-2843cff828bc",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "6f0ece62-7228-4040-90ed-d1fb5ae4d96e",
"parcel_id": "77f00e70-2937-4a9f-b8c2-de00d1cfc83e",
"tracking_number": "00033333333000138439",
"label_url": "https://api.ingrid.com/v1/labels/path-to-generated-label.svg",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"shipping_method": "pnl-mpc",
"location_ref": "592971",
"delivery_status": "pickup",
"tracking_url": "https://tracking.postnord.com/SE?id=00033333333000138439",
"created_at": "2022-04-28T07:12:06Z",
"updated_at": "2022-04-28T07:12:06Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2022-04-28T07:12:05Z"
}
}
],
"created_at": "2022-04-28T07:12:06Z",
"updated_at": "2022-04-28T07:12:06Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01G1QG6GH2AQN2WTYXKEQKTR82",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
]
},
"created_at": "2022-04-28T07:12:06Z",
"updated_at": "2022-04-28T07:12:06Z",
"direction_type": "UNSPECIFIED"
}
}

Cancel Delivery

Cancels a delivery before it has been picked up by the carrier.

Request 🔗

POST /v1/som/deliveries.cancel HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token

{
"tracking_number": "00033333333000136619"
}

Response 🔗

HTTP/1.1 200 OK
Date: Mon, 01 Mar 2021 12:19:40 GMT
Content-Type: application/json
Content-Length: 42
Connection: close
Vary: Accept-Encoding
x-trace-id: 01EZPVNMVG9A2303F4RF1SS6MT

{}

Update Shipment

Updates a shipment

Request 🔗

POST /v1/som/shipments.update HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token

{
"shipment_id": "4659fc78-a9cf-4012-8709-6479e51aa119",
"shipping_method": "pnl-mpc",
"shipment_value": 27800,
"shipping_date": "2021-03-01T12:19:40.652Z",
"number_of_parcels": 1,
"external_id": "ACME12345",
"location_ref": "592971",
"customer_info": {
"name": "Erik Johansson",
"email": "erik@example.com",
"phone": "0761234561",
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Industrigatan 5"
],
"city": "Stockholm",
"postal_code": "11239",
"country": "SE"
}
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"postal_code": "11556",
"city": "Stockholm",
"country": "SE"
},
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": 1,
"weight": 720,
"dimensions": {
"length": 600,
"width": 300,
"height": 250
},
"tags": [
"shoes",
"indigo",
"class_one"
]
},
{
"sku": "SKU23456",
"name": "Stüssy Small Stock Crew Socks - One Size",
"quantity": 1,
"weight": 50,
"tags": [
"socks",
"indigo",
"class_one"
]
}
]
},
"meta": {
"is_fragile": "true",
"spring_promo": "true"
}
}

Response 🔗

HTTP/1.1 200 OK
Date: Mon, 01 Mar 2021 12:19:41 GMT
Content-Type: application/json
Content-Length: 1095
Connection: close
Vary: Accept-Encoding
x-trace-id: 01EZPVNNV2D664XW57S0GD96EM

{
"shipment": {
"id": "4659fc78-a9cf-4012-8709-6479e51aa119",
"site_id": "11756e4a98c64fa9a9c5d627fd88a236",
"customer_info": {
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Industrigatan 5"
],
"city": "Stockholm",
"postal_code": "11239",
"country": "SE"
},
"phone": "0761234561",
"email": "erik@example.com"
},
"meta": {
"is_fragile": "true",
"spring_promo": "true"
},
"shipping_date": "2021-03-01T12:19:40Z",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"parcels": [
{
"id": "316b6769-b537-4dd9-96f1-a824e747f8bb",
"shipment_id": "4659fc78-a9cf-4012-8709-6479e51aa119",
"deliveries": [
{
"id": "c3cbf98f-fe7a-4de1-ae78-3e2a36758c2a",
"parcel_id": "316b6769-b537-4dd9-96f1-a824e747f8bb",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"shipping_method": "pnl-mpc",
"location_ref": "592971",
"delivery_status": "created",
"created_at": "2021-03-01T12:19:40Z",
"updated_at": "2021-03-01T12:19:41Z",
"label_url": "https://api.ingrid.com/v1/labels/path-to-generated-label.svg"
}
],
"created_at": "2021-03-01T12:19:41Z",
"updated_at": "2021-03-01T12:19:41Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "27800",
"tos_id": "01EZPVNN71H7JDH6B9HZ080YGH",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
]
},
"created_at": "2021-03-01T12:19:41Z",
"updated_at": "2021-03-01T12:19:41Z"
}
}

Cancel Shipment

Cancels a shipment

Request 🔗

POST /v1/som/shipments.cancel HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token

{
"shipment_id": "4659fc78-a9cf-4012-8709-6479e51aa119"
}

Response 🔗

HTTP/1.1 200 OK
Date: Mon, 01 Mar 2021 12:19:41 GMT
Content-Type: application/json
Content-Length: 54
Connection: close
Vary: Accept-Encoding
x-trace-id: 01EZPVNP6VB8ZJS4CXXWB5N1P6

{}

Add Parcel

Allows adding new parcel to already existing shipment. It is possible to add the parcel to the newly created (CreateShipment) carrier pickup that is not yet requested. If the shipment was booked using BookParcels, using AddParcel will book and generate a new label for the added parcel. The endpoint also works with custom booking methods. If a return shipment is connected with the provided shipment, a parcel will be added there.

Typical use case would be to generate labels separately for each parcel in a warehouse.

Request 🔗

POST /v1/som/shipments.add_parcel HTTP/1.1
Host: api.ingrid.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer base64-encoded-api-token

{
"site_id": "5ba74bc0-c44d-4abf-b3df-2acdedc7c8bc",
"shipment_id": "886772b7-ecb2-4a54-bcbb-5c6c60abcfa8"
}

Response 🔗

HTTP/1.1 200 OK
Date: Mon, 01 Mar 2021 12:19:41 GMT
Content-Type: application/json
Content-Length: 1095
Connection: close
Vary: Accept-Encoding
x-trace-id: 01EZPVNNV2D664XW57S0GD96EM

{
"shipment": {
"id": "4659fc78-a9cf-4012-8709-6479e51aa119",
"site_id": "11756e4a98c64fa9a9c5d627fd88a236",
"customer_info": {
"address": {
"care_of": "Anders Ekman",
"address_lines": [
"Industrigatan 5"
],
"city": "Stockholm",
"postal_code": "11239",
"country": "SE"
},
"phone": "0761234561",
"email": "erik@example.com"
},
"meta": {
"is_fragile": "true"
},
"shipping_date": "2021-03-01T12:19:40Z",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"parcels": [
{
"id": "316b6769-b537-4dd9-96f1-a824e747f8bb",
"shipment_id": "4659fc78-a9cf-4012-8709-6479e51aa119",
"deliveries": [
{
"id": "c3cbf98f-fe7a-4de1-ae78-3e2a36758c2a",
"parcel_id": "316b6769-b537-4dd9-96f1-a824e747f8bb",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"shipping_method": "pnl-mpc",
"location_ref": "592971",
"delivery_status": "created",
"created_at": "2021-03-01T12:19:40Z",
"updated_at": "2021-03-01T12:19:40Z"
}
],
"created_at": "2021-03-01T12:19:40Z",
"updated_at": "2021-03-01T12:19:40Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
},
{
"id": "ddee0942-e5d8-4a9b-a2d0-69c256e66d60",
"shipment_id": "4659fc78-a9cf-4012-8709-6479e51aa119",
"deliveries": [
{
"id": "fcd7d87a-1772-4044-bc25-68a14de34203",
"parcel_id": "ddee0942-e5d8-4a9b-a2d0-69c256e66d60",
"address_from": {
"name": "Acme, Main Warehouse",
"address_lines": [
"Frihamnsgatan 56"
],
"city": "Stockholm",
"postal_code": "11556",
"country": "SE"
},
"address_to": {
"name": "ICA Västermalmsgallerian",
"address_lines": [
"S:t Eriksgatan 45"
],
"city": "Stockholm",
"postal_code": "11234",
"country": "SE"
},
"shipping_method": "pnl-mpc",
"location_ref": "592971",
"delivery_status": "created",
"created_at": "2021-03-01T13:29:40Z",
"updated_at": "2021-03-01T13:29:40Z"
}
],
"created_at": "2021-03-01T13:29:40Z",
"updated_at": "2021-03-01T13:29:40Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01EZPVNN71H7JDH6B9HZ080YGH",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
]
},
"created_at": "2021-03-01T12:19:40Z",
"updated_at": "2021-03-01T12:19:40Z"
}
}

Last updated: Thu, Jun 30, 06:15 AM