Get shipment

Shipments API v2
GEThttps://api.mollie.com/v2/orders/*orderId*/shipments/*shipmentId*

Retrieve a single shipment and the order lines shipped by a shipment’s ID.

Parameters

Replace orderId in the endpoint URL by the order’s ID, for example ord_8wmqcHMN4U and replace shipmentId by the shipment’s ID, for example shp_3wmsgCJN4U

Access token parameters

If you are using organization access tokens or are creating an OAuth app, you can enable test mode through the testmode query string parameter.

testmodebooleanoptional

Response

200 application/hal+json

resourcestring
Indicates the response contains a shipment object. Will always contain shipment for this endpoint.
idstring
The shipment’s unique identifier, for example shp_3wmsgCJN4U.
orderIdstring
The order this shipment was created on, for example ord_8wmqcHMN4U.
createdAtdatetime
The shipment’s date and time of creation, in ISO 8601 format.
trackingobject

An object containing shipment tracking details. Will be omitted when no tracking details are available.

Show child parameters

carrierstring
The name of the postal carrier.
codestring
The track and trace code for the shipment.
urlstring
The URL where your customer can track the shipment.
linesarray

An array of order line objects as described in Get order.

The lines will show the quantity, discountAmount, vatAmount and totalAmount shipped in this shipment. If the line was partially shipped, these values will be different from the values in response from the Get order endpoint.

_linksobject

An object with several URL objects relevant to the shipment. Every URL object will contain an href and a type field.

Show child parameters

selfURL object
The API resource URL of the shipment itself.
orderURL object
The resource URL of the order this shipment was created for.
documentationURL object
The URL to the shipment retrieval endpoint documentation.

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET https://api.mollie.com/v2/orders/ord_kEn1PlbGa/shipments/shp_3wmsgCJN4U \
   -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
1
2
3
4
5
6
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');

$order = $mollie->orders->get('ord_kEn1PlbGa');
$shipment = $order->getShipment("shp_3wmsgCJN4U");
1
2
3
4
5
6
7
from mollie.api.client import Client

mollie_client = Client()
mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM")

order = mollie_client.orders.get("ord_kEn1PlbGa")
shipment = order.shipments.get("shp_3wmsgCJN4U")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require 'mollie-api-ruby'

Mollie::Client.configure do |config|
  config.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM'
end

shipment = Mollie::Order::Shipment.get(
  'shp_3wmsgCJN4U',
  order_id: 'ord_kEn1PlbGa'
)
1
2
3
4
5
6
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

const shipment = await mollieClient.orderShipments.get('shp_3wmsgCJN4U', {
  orderId: 'ord_kEn1PlbGa'
});

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
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
HTTP/1.1 200 OK
Content-Type: application/hal+json

{
     "resource": "shipment",
     "id": "shp_3wmsgCJN4U",
     "orderId": "ord_kEn1PlbGa",
     "createdAt": "2018-08-09T14:33:54+00:00",
     "tracking": {
         "carrier": "PostNL",
         "code": "3SKABA000000000",
         "url": "http://postnl.nl/tracktrace/?B=3SKABA000000000&P=1015CW&D=NL&T=C"
     },
     "lines": [
         {
             "resource": "orderline",
             "id": "odl_dgtxyl",
             "orderId": "ord_pbjz8x",
             "name": "LEGO 42083 Bugatti Chiron",
             "sku": "5702016116977",
             "type": "physical",
             "status": "shipping",
             "metadata": null,
             "isCancelable": true,
             "quantity": 1,
             "unitPrice": {
                 "value": "399.00",
                 "currency": "EUR"
             },
             "vatRate": "21.00",
             "vatAmount": {
                 "value": "51.89",
                 "currency": "EUR"
             },
             "discountAmount": {
                 "value": "100.00",
                 "currency": "EUR"
             },
             "totalAmount": {
                 "value": "299.00",
                 "currency": "EUR"
             },
             "createdAt": "2018-08-02T09:29:56+00:00",
             "_links": {
                 "productUrl": {
                     "href": "https://shop.lego.com/nl-NL/Bugatti-Chiron-42083",
                     "type": "text/html"
                 },
                 "imageUrl": {
                     "href": "https://sh-s7-live-s.legocdn.com/is/image//LEGO/42083_alt1?$main$",
                     "type": "text/html"
                 }
             }
         },
         {
             "resource": "orderline",
             "id": "odl_jp31jz",
             "orderId": "ord_pbjz8x",
             "name": "LEGO 42056 Porsche 911 GT3 RS",
             "sku": "5702015594028",
             "type": "physical",
             "status": "completed",
             "metadata": null,
             "isCancelable": false,
             "quantity": 1,
             "unitPrice": {
                 "value": "329.99",
                 "currency": "EUR"
             },
             "vatRate": "21.00",
             "vatAmount": {
                 "value": "57.27",
                 "currency": "EUR"
             },
             "totalAmount": {
                 "value": "329.99",
                 "currency": "EUR"
             },
             "createdAt": "2018-08-02T09:29:56+00:00",
             "_links": {
                 "productUrl": {
                     "href": "https://shop.lego.com/nl-NL/Porsche-911-GT3-RS-42056",
                     "type": "text/html"
                 },
                 "imageUrl": {
                     "href": "https://sh-s7-live-s.legocdn.com/is/image/LEGO/42056?$PDPDefault$",
                     "type": "text/html"
                 }
             }
         }
     ],
     "_links": {
         "self": {
             "href": "https://api.mollie.com/v2/order/ord_kEn1PlbGa/shipments/shp_3wmsgCJN4U",
             "type": "application/hal+json"
         },
         "order": {
             "href": "https://api.mollie.com/v2/orders/ord_kEn1PlbGa",
             "type": "application/hal+json"
         },
         "documentation": {
             "href": "https://docs.mollie.com/reference/v2/shipments-api/get-shipment",
             "type": "text/html"
         }
     }
 }