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": "01HXXXXKCC2WP4BF400CT56HW7",
"shipping_method": "pnl-mpc",
"shipment_value": 19900,
"shipping_date": "2024-05-15T11:48:01.866Z",
"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": {
"description": "Shoes inside",
"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"
},
"direction_type": "OUTBOUND"
}

Response 🔗

HTTP/1.1 200 OK
Date: Wed, 15 May 2024 11:48:02 GMT
Content-Type: application/json
Content-Length: 1097
Connection: close
Vary: Accept-Encoding
x-trace-id: S20240515114802R3Z4G62MYR6A8B8K

{
"shipment": {
"id": "0f8f70d8-6987-4a99-bdd7-f8dde22a1356",
"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": "2024-05-15T11:48:01Z",
"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": "4966ed4e-f6e1-4a7a-a129-ba7a545a3b95",
"shipment_id": "0f8f70d8-6987-4a99-bdd7-f8dde22a1356",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "f0efbecd-ee13-494f-9a03-ecbbf8faec25",
"parcel_id": "4966ed4e-f6e1-4a7a-a129-ba7a545a3b95",
"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": "2024-05-15T11:48:02Z",
"updated_at": "2024-05-15T11:48:02Z"
}
],
"created_at": "2024-05-15T11:48:02Z",
"updated_at": "2024-05-15T11:48:02Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01HXXXXKCC2WP4BF400CT56HW7",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"description": "Shoes inside"
},
"created_at": "2024-05-15T11:48:02Z",
"updated_at": "2024-05-15T11:48:02Z",
"direction_type": "OUTBOUND"
}
}

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": "f7cd44e6-8cdc-4618-bf75-9f567ac944e9"
}

Response 🔗

HTTP/1.1 200 OK
Date: Wed, 15 May 2024 11:48:01 GMT
Content-Type: application/json
Content-Length: 54
Connection: close
Vary: Accept-Encoding
x-trace-id: S20240515114801CDCSTGS9B38CJYAA

{
"shipment": {
"id": "f7cd44e6-8cdc-4618-bf75-9f567ac944e9",
"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": "2024-05-15T11:48:00Z",
"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": "6b2d8b1f-09b8-4e3d-b69a-d7939a510eb9",
"shipment_id": "f7cd44e6-8cdc-4618-bf75-9f567ac944e9",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "04371a1c-5797-4ee9-a85c-29061efbfc2c",
"parcel_id": "6b2d8b1f-09b8-4e3d-b69a-d7939a510eb9",
"tracking_number": "00033333333000139061",
"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=00033333333000139061",
"created_at": "2024-05-15T11:48:01Z",
"updated_at": "2024-05-15T11:48:02Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2024-05-15T11:48:00Z"
}
}
],
"created_at": "2024-05-15T11:48:01Z",
"updated_at": "2024-05-15T11:48:01Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01HXXXXKCC2WP4BF400CT56HW7",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"description": "Shoes inside"
},
"created_at": "2024-05-15T11:48:01Z",
"updated_at": "2024-05-15T11:48:02Z",
"direction_type": "OUTBOUND"
}
}

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": "00033333333000139047"
}

Response 🔗

HTTP/1.1 200 OK
Date: Wed, 15 May 2024 11:47:59 GMT
Content-Type: application/json
Content-Length: 42
Connection: close
Vary: Accept-Encoding
x-trace-id: S20240515114759GWRZ263RX399S5NC

{
"delivery": {
"id": "f2e87409-b582-4fb6-8966-876f6ac8a68c",
"parcel_id": "636310b1-ebc9-4bc7-ac81-fc39243803a4",
"tracking_number": "00033333333000139047",
"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=00033333333000139047",
"created_at": "2024-05-15T11:47:58Z",
"updated_at": "2024-05-15T11:47:59Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2024-05-15T11:47:57Z"
}
}
}

Get Delivery

Request 🔗

GET /v1/som/deliveries.get?tracking_number=00033333333000139047 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: Wed, 15 May 2024 11:47:59 GMT
Content-Type: application/json

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

{
"delivery": {
"id": "f2e87409-b582-4fb6-8966-876f6ac8a68c",
"parcel_id": "636310b1-ebc9-4bc7-ac81-fc39243803a4",
"tracking_number": "00033333333000139047",
"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=00033333333000139047",
"created_at": "2024-05-15T11:47:58Z",
"updated_at": "2024-05-15T11:47:59Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2024-05-15T11:47:57Z"
}
}
}

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": "2024-05-15T11:47:59.455Z",
"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": {
"description": "Shoes inside",
"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"
},
"direction_type": "OUTBOUND"
}

Response 🔗

HTTP/1.1 200 OK
Date: Wed, 15 May 2024 11:48:00 GMT
Content-Type: application/json
Content-Length: 944
Connection: close
Vary: Accept-Encoding
x-trace-id: S20240515114759SC8GEKATHTXKS7E1

{
"shipment": {
"id": "4e3a89d8-ac98-4476-b068-e1a960f5d45b",
"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": "2024-05-15T11:47:59Z",
"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": "ca4dc88b-485c-446c-92cf-830c9674eb91",
"shipment_id": "4e3a89d8-ac98-4476-b068-e1a960f5d45b",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "ddcc9b33-6509-4290-bba8-d4e25ec77474",
"parcel_id": "ca4dc88b-485c-446c-92cf-830c9674eb91",
"tracking_number": "00033333333000139054",
"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=00033333333000139054",
"created_at": "2024-05-15T11:48:00Z",
"updated_at": "2024-05-15T11:48:00Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2024-05-15T11:47:59Z"
}
}
],
"created_at": "2024-05-15T11:48:00Z",
"updated_at": "2024-05-15T11:48:00Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01HXY19A22BD3DYMPX0YTXNPSG",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"description": "Shoes inside"
},
"created_at": "2024-05-15T11:48:00Z",
"updated_at": "2024-05-15T11:48:00Z",
"direction_type": "OUTBOUND"
}
}

Get Shipment

Returns the shipment by a specified parameter.

Request 🔗

GET /v1/som/shipments.get?id=4e3a89d8-ac98-4476-b068-e1a960f5d45b 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: Wed, 15 May 2024 11:48:00 GMT
Content-Type: application/json

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

{
"shipment": {
"id": "4e3a89d8-ac98-4476-b068-e1a960f5d45b",
"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": "2024-05-15T11:47:59Z",
"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": "ca4dc88b-485c-446c-92cf-830c9674eb91",
"shipment_id": "4e3a89d8-ac98-4476-b068-e1a960f5d45b",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "ddcc9b33-6509-4290-bba8-d4e25ec77474",
"parcel_id": "ca4dc88b-485c-446c-92cf-830c9674eb91",
"tracking_number": "00033333333000139054",
"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=00033333333000139054",
"created_at": "2024-05-15T11:48:00Z",
"updated_at": "2024-05-15T11:48:00Z",
"delivery_time": {
"start": "0001-01-01T00:00:00Z",
"end": "2024-05-15T11:47:59Z"
}
}
],
"created_at": "2024-05-15T11:48:00Z",
"updated_at": "2024-05-15T11:48:00Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "19900",
"tos_id": "01HXY19A22BD3DYMPX0YTXNPSG",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"description": "Shoes inside"
},
"created_at": "2024-05-15T11:48:00Z",
"updated_at": "2024-05-15T11:48:00Z",
"direction_type": "OUTBOUND"
}
}

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": "00033333333000139061"
}

Response 🔗

HTTP/1.1 200 OK
Date: Wed, 15 May 2024 11:48:01 GMT
Content-Type: application/json
Content-Length: 42
Connection: close
Vary: Accept-Encoding
x-trace-id: S20240515114801RC5CQH9FKAQMND34

{}

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": "0f8f70d8-6987-4a99-bdd7-f8dde22a1356",
"shipping_method": "pnl-mpc",
"shipment_value": 27800,
"shipping_date": "2024-05-15T11:48:02.113Z",
"external_id": "ACME12345",
"location_ref": "3806098",
"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": "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"
},
"meta": {
"is_fragile": "true",
"spring_promo": "true"
}
}

Response 🔗

HTTP/1.1 200 OK
Date: Wed, 15 May 2024 11:48:02 GMT
Content-Type: application/json
Content-Length: 874
Connection: close
Vary: Accept-Encoding
x-trace-id: S20240515114802Y0NAA53WFQCTETYG

{
"shipment": {
"id": "0f8f70d8-6987-4a99-bdd7-f8dde22a1356",
"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": "2024-05-15T11:48:02Z",
"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": "4966ed4e-f6e1-4a7a-a129-ba7a545a3b95",
"shipment_id": "0f8f70d8-6987-4a99-bdd7-f8dde22a1356",
"line_items": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
}
}
],
"deliveries": [
{
"id": "f0efbecd-ee13-494f-9a03-ecbbf8faec25",
"parcel_id": "4966ed4e-f6e1-4a7a-a129-ba7a545a3b95",
"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": "2024-05-15T11:48:02Z",
"updated_at": "2024-05-15T11:48:02Z",
"label_url": "https://api.ingrid.com/v1/labels/path-to-generated-label.svg"
}
],
"created_at": "2024-05-15T11:48:02Z",
"updated_at": "2024-05-15T11:48:02Z",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"weight": "720"
}
],
"external_id": "ACME12345",
"shipment_value": "27800",
"tos_id": "01HXXXXKCC2WP4BF400CT56HW7",
"contents": {
"goods": [
{
"sku": "SKU12345",
"name": "Saucony Shadow 6000",
"quantity": "1",
"dimensions": {
"length": "600",
"height": "250",
"width": "300"
},
"tags": [
"shoes",
"indigo",
"class_one"
],
"weight": "720"
}
],
"description": "Shoes inside"
},
"created_at": "2024-05-15T11:48:02Z",
"updated_at": "2024-05-15T11:48:02Z",
"direction_type": "OUTBOUND"
}
}

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": "0f8f70d8-6987-4a99-bdd7-f8dde22a1356"
}

Response 🔗

HTTP/1.1 200 OK
Date: Wed, 15 May 2024 11:48:02 GMT
Content-Type: application/json
Content-Length: 54
Connection: close
Vary: Accept-Encoding
x-trace-id: S202405151148021401G6FW407Y3YD0

{}

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. If a return shipment is connected with the provided shipment, the parcel will be added there as well. If parcel is provided in the request then it will be used for the new parcel. If no parcel is provided then the first existing parcel will be duplicated.

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: Fri, Dec 20, 06:15 AM