Optimise your logistics with our powerful APIs.
MyShipper API offers a fast and convenient way to access MyShipper service information using the Internet. With this API, MyShipper lets you easily incorporate MyShipper technology in your own applications or your own website. Your users running your applications or visiting your website can have fast and safe access to the MyShipper services.
Any tool that is fluent in HTTP can communicate with our API simply by requesting the correct URI. Requests should be made using the HTTPS protocol so that traffic is encrypted. The API responds to different methods depending on the action required.
After the API is implemented you will be able to obtain the services we offer, generate quotes, place bookings, generate labels, arrange collections and get tracking information.
Requirements
! JSON library and Internet connection.
! API supports only ASCII characters.
curl -X POST -k \
-u API_KEY:API_SECRET \
-H "Content-Type: application/json" \
-d '{"action": "quote"}' \
https://www.myshipper.nl/api/json
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.myshipper.nl/api/json");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array("action" => "quote")));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: Basic " . base64_encode(API_KEY . ":" . API_SECRET)
));
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response, true);
return $response;
Authentication
To make API requests, we would advise you to use cURL library. You will also need an API key, API secret. API keys are unique codes that identify you or your application each time you make a call to one of our API’s. API Secret is another code which severs like a password for the API key. After creating an account with us, you will be able to generate API key and API secret in your settings environment.
Request Code samples
curl -X POST -k \
-u API_KEY:API_SECRET \
-H “Content-Type: application/json” \
-d ‘{“action”: “quote”}’ \
https://portal.myshipper.nl/api/json
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “https://portal.myshipper.nl/api/json”);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(“action” => “quote”)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
“Authorization: Basic ” . base64_encode(API_KEY . “:” . API_SECRET)
));
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response, true);
return $response;
Quoting
Use this method to get information about available services and their prices. Requires authentication request elements.
Request elements
Name | Required | Description | Example |
---|---|---|---|
action | Mandatory | Describes what type of request will be sent to the server. | quote |
o_company | Optional | Shipper’s company name. | MyShipper |
o_name | Mandatory | Contact persons name. | John White |
o_email | Optional | Shipper’s email address. | test@myshipper.nl |
o_phone | Mandatory | Shipper’s phone number. | 0031102263466 |
o_street_1 | Mandatory | Shipper’s street address. | Rotterdam Airportplein |
o_street_2 | Optional | Additional shipper’s address information, preferably building, room or floor. | Fourth floor |
o_street_3 | Optional | Additional shipper’s address information,
preferably room or floor. | Room 8 |
o_street_no | Mandatory | Shipper’s house number. | 27 |
o_postal | Conditional | Shipper’s postcode/zip code. Conditionally required if shipper’s country uses postal/zip. | 3045 AP |
o_city | Mandatory | Shipper’s city. | Rotterdam |
o_province | Conditional | Shipper’s province/state. Conditionally required if shipping from the United States or Canada. The official State code is required. | Zuid Holland |
o_country | Mandatory | Shipper’s ISO Country Code. | NL |
o_eori | Conditional | Shipper’s EORI number (Economic Operators Registration and Identification number). | NL012345678 |
o_date | Optional | Preferred collection date (YYYY-MM-DD). | 2024-01-25
|
d_company | Optional | Consignee’s company name. | MyShipper |
d_name | Mandatory | Contact name at the consignee’s. | David Black |
d_email | Optional | Consignee’s email address. | test@myshipper.nl |
d_phone | Mandatory | Consignee’s phone number. | 0031102263466 |
d_street_1 | Mandatory | Consignee’s street address. | Rotterdam Airportplein |
d_street_2 | Optional | Additional consignee’s address information, preferably building, room or floor. | 4th floor |
d_street_3 | Optional | Additional consignee’s address information, preferably room or floor. | Room 8 |
d_street_no | Mandatory | Consignee’s house number. | 27 |
d_postal | Conditional | Consignee’s postcode/zip code. Conditionally required if consignee’s country uses postcodes/zip codes. | 3045 AP |
d_city | Mandatory | Consignee’s city. | Rotterdam |
d_province | Conditional | Consignee’s province/ state. Conditionally state code required if shipping to United States or Canada. | Zuid Holland |
d_country | Mandatory | Consignee’s ISO country code. | NL |
d_eori | Conditional | Consignee’s EORI number (Economic Operators Registration and Identification number). | NL012345678 |
type | Mandatory | Consignment type (Parcel, Document, Pallet). | parcel |
reference | Optional | Shipment reference. | MYS0000 |
inco | Optional | Incoterms (party who has to pay duties). | DAP (default value) or DDP. |
stackable | Optional | Either stackable on top of other shipments and stackable on top of your shipment (1 or 0). | 1 |
export_reason | Conditional | Mandatory for shipments outside EU. Possible values are “Commercial”, “Sample”, “Repair / Warranty”, “Return”, “Gift”, “Personal use”, “Temporary”. | Commercial |
has_batteries | Optional | Whether shipment contains batteries (1 or 0). | 0 |
own_customs_invoice | Optional | Specifies whether your own customs invoice will be used. Please use Upload Documents method after creating a shipment to upload your own customs invoice (1 or 0). | 0 |
delivery_instructions | Optional | Instructions for courier upon shipment delivery. | Deliver at the door |
return_service | Mandatory | Creates return label for shipment. For swap purposes (1 or 0). | 1 |
items | Mandatory | Array of items. | |
third_party | Optional | Array of third party. | |
customs | Optional | Array of customs. |
Products child elements
Name | Required | Description | Example |
---|---|---|---|
quantity | Mandatory | Number of same products. | 2 |
product_code | Mandatory | Product or article code. | MYSRA27 |
o_country | Mandatory | ISO country where the product was manufactured in. | NL |
weight | Mandatory | Weight of the product (in kg). | 5.3 |
description | Mandatory | Clear goods’ description. | Audio headset |
value | Mandatory | Product value per piece. | 20.00 |
value_currency | Mandatory | Product value currency. | EUR |
hs_code | Mandatory | Harmonized System Code. | 85183000 |
Third party child elements
Name | Required | Description | Example |
---|---|---|---|
Type | Mandatory | Third party type (Broker, Importer, Notifying Party). | Broker |
company | Optional | Third party’s company name. | MyShipper |
name | Mandatory | Contact name at the third party. | David Black |
email | Optional | Third party’s email address. | test@myshipper.nl |
phone | Mandatory | Third party’s phone number. | 0031102263466 |
street_1 | Mandatory | Third party’s street address. | Rotterdam Airportplein |
street_2 | Optional | Additional third party’s address information, preferably building, room or floor. | 4th floor |
street_3 | Optional | Additional third party’s address information, preferably room or floor. | Room 8 |
street_no | Mandatory | Third party’s house number. | 27 |
postal | Conditional | Third party’s postcode/zip code. Conditionally required if consignee’s country uses postcodes/zip codes. | 3045 AP |
city | Mandatory | Third party’s city. | Rotterdam |
province | Conditional | Third party’s province/ state. Conditionally, state code required if shipping to the United States or Canada. | Zuid Holland |
country | Mandatory | Third party’s ISO country code. | NL |
eori | Conditional | Third party’s EORI number (Economic Operators Registration and Identification number). | NL012345678 |
Customs child elements
Name | Required | Description | Example |
---|---|---|---|
transport_costs | Optional | Transport costs which will be presented on the customs invoice. | 120.00 |
insurance_costs | Optional | Insurance costs which will be presented on the customs invoice. | 130.00 |
other_costs | Optional | Other costs which will be presented on the customs invoice. | 40.00 |
export_declaration | Optional | Export Declaration, which will be presented on the customs invoice. | The exporter of the products covered by this document (customs authorisation No………(1) declares that, except where otherwise clearly indicated, these products are of ………….(2) preferential origin. |
Request Code samples
{
“action”: “quote”,
“shipment”: {
“o_company”: “Test”,
“o_name”: “Test”,
“o_email”: “test@test.com”,
“o_phone”: “0000000”,
“o_eori”: “”,
“o_street_1”: “Test street”,
“o_street_no”: “27B”,
“o_postal”: “3045 AB”,
“o_city”: “Rotterdam”,
“o_province”: “”,
“o_country”: “NL”,
“d_company”: “Test”,
“d_name”: “Test”,
“d_email”: “test@test.com”,
“d_phone”: “0000000”,
“d_eori”: “”,
“d_street_1”: “Test street “,
“d_street_no”: “35C”,
“d_postal”: “1000”,
“d_city”: “Brussels”,
“d_province”: “”,
“d_country”: “BE”,
“type”: “Parcel”,
“reference”: “AB0000”,
“stackable”: “1”,
“export_reason”: “Commercial”,
“items”: [
{
“contents”: “Keyboard”,
“value”: “55.00”,
“weight”: “5.0”,
“length”: “50”,
“width”: “15”,
“height”: “5”
},
{
“contents”: “Electronic Device”,
“value”: “10.00”,
“weight”: “10”,
“length”: “15”,
“width”: “20”,
“height”: “15”,
“products”: [
{
“quantity”: “2”,
“product_code”: “023232”,
“o_country”: “NL”,
“weight”: “5.3”,
“description”: “Headset”,
“value”: “20.0”,
“value_currency”: “EUR”,
“hs_code”: “85183000”
}
]
}
]
}
}
$request += array(
“action” => “quote”,
“shipment” => array(
“o_company” => “Test”,
“o_name” => “Test”,
“o_email” => “test@test.com”,
“o_phone” => “0000000”,
“o_eori” => “”,
“o_street_1” => “Test street”,
“o_street_no” => “27B”,
“o_postal” => “3045 AB”,
“o_city” => “Rotterdam”,
“o_province” => “”,
“o_country” => “NL”,
“d_company” => “Test”,
“d_name” => “Test”,
“d_email” => “test@test.com”,
“d_phone” => “0000000”,
“d_eori” => “”,
“d_street_1” => “Test street “,
“d_street_no” => “35C”,
“d_postal” => “1000”,
“d_city” => “Brussels”,
“d_province” => “”,
“d_country” => “BE”,
“type” => “Parcel”,
“reference” => “AB0000”,
“stackable” => “1”,
“export_reason” => “Commercial”,
“items” => array(
array(
“contents” => “Keyboard”,
“value” => “55.00”,
“weight” => “5.0”,
“length” => “50”,
“width” => “15”,
“height” => “5”,
),
array(
“contents” => “Electronic Device”,
“value” => “10.00”,
“weight” => “10”,
“length” => “15”,
“width” => “20”,
“height” => “15”,
“products” => array(
array(
“quantity” => “2”,
“product_code” => “023232”,
“o_country” => “NL”,
“weight” => “5.3”,
“description” => “Headset”,
“value” => “20.0”,
“value_currency” => “EUR”,
“hs_code” => “85183000”,
)
)
)
)
)
);
Response elements
Name | Description | ||
---|---|---|---|
result | This element contains a response from server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Name | Description | ||
---|---|---|---|
services | Dataset of services. |
Services child elements
Name | Description | Example | |
---|---|---|---|
service_id | Service ID. | 12604 | |
courier_keycode | Courier keycode. | MYS | |
courier_name | Courier name. | MYSHIPPER | |
service_keycode | Service keycode. | EXPRESS WORLDWIDE | |
service_name | Service name. | Express Worldwide | |
etc | Estimated time of collection. | 2024-01-25 before 18:00 | |
eta | Estimated time of arrival. | 2024-01-25 before 18:00 | |
origin_service_points | Origin service point availability indicator (1=available, 0=not available). | 1 | |
destination_service_points | Destination service point availability indicator (1=available, 0=not available). | 0 | |
co2 | CO2 availability indicator (1=available, 0=not available). | 1 | |
co2_price | CO2 compensation. | 1.37 | |
insurance | Insurance availability indicator (1=available, 0=not available). | 1 | |
insurance_price | Insurance costs. | 9.38 | |
sub_total | Price without VAT. | 18.00 | |
vat_total | VAT. | 3.21 | |
total_price | Total shipping price. | 21.21 | |
currency | Currency. | EUR |
Response code samples
$response = array(
“result” => array(
“services” => array(
0 => array(
“service_id” => 12613,
“courier_keycode” => “mys”,
“courier_name” => “MYSHIPPER”,
“service_keycode” => “EXPRESS 12:00”,
“service_name” => “Express 12:00”,
“etc” => “2021-01-25 before 20:00”,
“eta” => “2021-01-25 before 12:00”,
“origin_service_points” => 1,
“destination_service_points” => 1,
“currency” => “EUR”,
“co2” => 1,
“co2_price” => 1.37,
“insurance” => 1,
“insurance_price” => 9.38,
“sub_total” => 29.91,
“vat_total” => 5.68,
“total_price” => 35.59
)
)
),
“errors” => array()
);
$response = array(
“result” => array(
“services” => array(
0 => array(
“service_id” => 12613,
“courier_keycode” => “mys”,
“courier_name” => “MYSHIPPER”,
“service_keycode” => “EXPRESS 12:00”,
“service_name” => “Express 12:00”,
“etc” => “2021-01-25 before 20:00”,
“eta” => “2021-01-25 before 12:00”,
“origin_service_points” => 1,
“destination_service_points” => 1,
“currency” => “EUR”,
“co2” => 1,
“co2_price” => 1.37,
“insurance” => 1,
“insurance_price” => 9.38,
“sub_total” => 29.91,
“vat_total” => 5.68,
“total_price” => 35.59
)
)
),
“errors” => array()
);
Shipping
Use this method to create booking. Shipment label will be retrieved as an encoded PDF string. Requires authentication request elements.
Request elements
Name | Required | Description | Example |
---|---|---|---|
action | Mandatory | Describes what type of request will be sent to the server. | Ship |
service_id | Mandatory | Service id retrieved from quoting process. | 3851 |
co2 | Optional | Use 1 to compensate for co2 emission. | 0 (default value) or 1 |
insurance | Optional | Use 1 to insure your shipment. | 0 (default value) or 1 |
label_format | Optional | Describes what format label will be in. | PDF (default value) or ZPL |
d_sp_name | Optional | Destination service point name. | MyShipper |
d_sp_keycode | Optional | Destination service point keycode. | 1382551 |
d_sp_street_1 | Mandatory | Destination service point address line 1. | Rotterdam Airportplein 27 |
d_sp_street_2 | Optional | Destination service point address line 2. | 4th floor |
d_sp_street_3 | Optional | Destination service point address line 3. | Room 8 |
d_sp_postal | Optional | Destination service point postcode. | 3045 AP |
d_sp_city | Optional | Destination service point city. | Rotterdam |
d_sp_province | Optional | Destination service point province. | Zuid Holland |
d_sp_country | Optional | Destination service point ISO country code. | NL |
Request Code samples
{
“action”: “ship”,
“service_id”: “3851”,
“co2”: 0,
“insurance”: 1
}
$request += array(
“action” => “ship”,
“service_id” => “3851”,
“co2” => 0,
“insurance” => 1
);
Response elements
Name | Description | ||
---|---|---|---|
result | This element contains a response from the server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Name | Description | Example | |
---|---|---|---|
order_no | Order number. | MYSTEST | |
consignment_no | Courier consignment number. | COURIERCONN | |
label | Label encoded as PDF or ZPL string. | ||
remarks | Additional documents as encoded PDF string. | ||
items | Shipment item details. |
Response code samples
{
“result”: {
“order_no”: “MYSTEST”,
“consignment_no”: “COURIERCONN”,
“label”: “DawNjE1MiAwMDAwMCBuIAp0cmFp…”,
“remarks”: “RawNjE1MiAwMDAwMCBuIAp0cmFp…”
},
“errors”: []
}
$response = array(
“result” => array(
“order_no” => “MYSTEST”,
“consignment_no” => “COURIERCONN”,
“label” => “DawNjE1MiAwMDAwMCBuIAp0cmFp…”,
“remarks” => “RawNjE1MiAwMDAwMCBuIAp0cmFp…”,
),
“errors” => array()
);
Arrange Driver
Use this method to arrange collections. Requires authentication request elements.
Request elements
Name | Required | Description | Example |
---|---|---|---|
action | Mandatory | Describes what type of request will be sent to the server. | pickup |
date | Mandatory | Collection date. | 2024-01-01 |
r_time | Mandatory | Ready time. | 09:00 |
c_time | Mandatory | Closing time. | 17:00 |
instructions | Optional | Instructions for courier. | Pickup at front door |
shipments | Mandatory | Array of order numbers. | |
o_sp_name | Optional | Origin service point name. | MyShipper |
o_sp_keycode | Optional | Origin service point keycode. | 1382551 |
o_sp_street_1 | Optional | Origin service point address line 1. | Rotterdam Airportplein 27 |
o_sp_street_2 | Optional | Origin service point address line 2. | 4th floor |
o_sp_street_3 | Optional | Origin service point address line 3. | Room 8 |
o_sp_postal | Optional | Origin service point postcode. | 3045 AP |
o_sp_city | Optional | Origin service point city. | Rotterdam |
o_sp_province | Optional | Origin service point province. | Zuid Holland |
o_sp_country | Optional | Origin service point ISO country code. | NL |
Request Code samples
{
“action”: “pickup”,
“date”: “2021-01-24”,
“r_time”: “09:00”,
“c_time”: “17:00”,
“instuctions”: “test collection”,
“shipments”: [
“MYSXXXXXX1”,
“MYSXXXXXX2”
]
}
$request += array(
“action” => “pickup”,
“date” => “2021-01-24”,
“r_time” => “09:00”,
“c_time” => “17:00”,
“instuctions” => “test collection”,
“shipments” => array(
“MYSXXXXXX1”, “MYSXXXXXX2”
)
);
Response elements
Name | Description | ||
---|---|---|---|
Result | This element contains a response from server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Name | Description | ||
---|---|---|---|
collection_no | Collection number. | ||
manifest | Manifest encoded as PDF string. |
Response code samples
{
“result”: {
“collection_no”: “MYSTEST”,
“manifest”: “RawNjE1MiAwMDAwMCBuIAp0cmFp…”
},
“errors”: []
}
$response = array(
“result” => array(
“collection_no” => “MYSTEST”,
“manifest” => “RawNjE1MiAwMDAwMCBuIAp0cmFp…”
),
“errors” => array()
);
Webhooks
With webhooks, you can easily add tracking updates to a specific URL. In order to activate webhooks, you add your URL in account settings. Want to know for sure if it worked? You can immediately test it.
When the event occurs, our system makes an HTTP POST request to your configured URL to receive the webhook. Webhook data is sent to the configured URL as a webhook payload in JSON format.
Track & Trace
Use this method to receive information about your order (status, location, date, time).
Request elements
Name | Required | Description | Example |
---|---|---|---|
action | Mandatory | Describes what type of request will be sent to the server. | track |
order_numbers | Mandatory | Array or order numbers (For multiple shipments tracking). | “MYSXXXXXX1”, “MYSXXXXXX2” |
Request Code samples
{
“action”: “track”,
“order_numbers”: [
“MYSXXXXXX1”,
“MYSXXXXXX2”
]
}
$request += array(
“action” => “track”,
“order_numbers” => array(
“MYSXXXXXX1”,
“MYSXXXXXX2”
)
);
Response elements
Name | Description | ||
---|---|---|---|
result | This element contains response from server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Name | Description | Example | |
---|---|---|---|
order_no | Order Number. | MYSXXXXXX1 | |
status | Order’s status. | Arranged | |
consignment_no | Courier consignment number. | COURIERCONN | |
courier_keycode | Courier keycode. | MYS | |
courier_name | Courier name. | MYSHIPPER | |
service_keycode | Service keycode. | EXPRESS_WORLDWIDE | |
service_name | Service name. | Express Worldwide | |
items | Array of items |
Items child elements
Name | Description | Example | |
---|---|---|---|
item_no | Item number. | MYSXXXXXXX | |
status | Item status. | Arranged | |
tracking_no | Tracking number. | XXXXXXXXX | |
courier_tracking_link | Hyperlink to the tracking environment of the courier website. | https://courier.com/trackingpage | |
trackings | Array of track and trace information. |
Trackings child elements
Name | Description | Example | |
---|---|---|---|
status | Order’s status. | Collected | |
courier_status | Delivery status of consignment as of the local event date and time. | Shipment collected | |
location | Location where status was updated. | Rotterdam | |
date | Date and time when status was updated. | 2024-01-25 15:46:59
| |
signer | The person who signs for receiving the shipment. | D. Black |
Response code samples
{
“result”: {
“order_no”: “MYSXXXXXX1”,
“status”: “Collected”,
“consignment_no”: “COURIERCONN”,
“courier_keycode”: “mys”,
“courier_name”: “MYSHIPPER”,
“service_keycode”: “EXPRESS_WORLDWIDE”,
“service_name”: “Express Worldwide”,
“items”: [
{
“item_no”: “MYSXXXXXX1-1”,
“status”: “Collected”,
“tracking_no”: “XXXXXXXXX”,
“courier_tracking_link”: “https:\/\/courier.com\/trackingpage”,
“trackings”: [
{
“status”: “Collected”,
“courier_status”: “Shipment collected”,
“location”: “Rotterdam”,
“date”: “2021-01-24 15:46:59”,
“signer”: “”
}
]
}
]
},
{
“order_no”: “MYSXXXXXX2”,
“status”: “Delivered”,
“consignment_no”: “COURIERCONN”,
“courier_keycode”: “mys”,
“courier_name”: “MYSHIPPER”,
“service_keycode”: “standard”,
“service_name”: “Standard”,
“items”: [
{
“item_no”: “MYSXXXXXX2-1”,
“status”: “Booked”,
“tracking_no”: “XXXXXXXXX”,
“courier_tracking_link”: “https:\/\/courier.com\/trackingpage”,
“trackings”: [
{
“status”: “Delivered”,
“courier_status”: “Delivered”,
“location”: “Rotterdam”,
“date”: “2017-06-07 10:55:45”,
“signer”: “J. Smith”
},
{
“status”: “In Transit”,
“courier_status”: “In Transit”,
“location”: “Delft”,
“date”: “2017-06-06 10:55:19”,
“signer”: “”
}
]
}
]
}
],
“errors”: []
}
$response = array(
“result” => array(
0 => array(
“order_no” => “MYSXXXXXX1”,
“status” => “Collected”,
“consignment_no” => “COURIERCONN”,
“courier_keycode” => “mys”,
“courier_name” => “MYSHIPPER”,
“service_keycode” => “EXPRESS_WORLDWIDE”,
“service_name” => “Express Worldwide”,
“items” => array(
0 => array(
“item_no” => “MYSXXXXXX1-1”,
“status” => “Collected”,
“tracking_no” => “XXXXXXXXX”,
“courier_tracking_link” => “https://courier.com/trackingpage”,
“trackings” => array(
0 => array(
“status” => “Collected”,
“courier_status” => “Shipment collected”,
“location” => “Rotterdam”,
“date” => “2021-01-24 15:46:59”,
“signer” => “”
)
)
)
)
),
1 => array(
“order_no” => “MYSXXXXXX2”,
“status” => “Delivered”,
“consignment_no” => “COURIERCONN”,
“courier_keycode” => “mys”,
“courier_name” => “MYSHIPPER”,
“service_keycode” => “standard”,
“service_name” => “Standard”,
“items” => array(
0 => array(
“item_no” => “MYSXXXXXX2-1”,
“status” => “Booked”,
“tracking_no” => “XXXXXXXXX”,
“courier_tracking_link” => “https://courier.com/trackingpage”,
“trackings” => array(
0 => array(
“status” => “Delivered”,
“courier_status” => “Delivered”,
“location” => “Rotterdam”,
“date” => “2017-06-07 10:55:45”,
“signer” => “J. Smith”
),
1 => array(
“status” => “In Transit”,
“courier_status” => “In Transit”,
“location” => “Delft”,
“date” => “2017-06-06 10:55:19”,
“signer” => “”
)
)
)
)
)
),
“errors” => array()
);
Labels
Use this method to retrieve multiple or single shipment labels after a shipment has already been created. Requires authentication request elements.
Request elements
Name | Required | Description | Example |
---|---|---|---|
order_numbers | Mandatory | Array or order numbers (For multiple shipment tracking). | “MYSXXXXXX1”, “MYSXXXXXX2” |
Request Code samples
{
“action”: “labels”,
“order_numbers”: [
“MYSXXXXXX1”,
“MYSXXXXXX2”
]
}
$request += array(
“action” => “labels”,
“order_numbers” => array(
“MYSXXXXXX1”,
“MYSXXXXXX2”
)
);
Response elements
Name | Description | ||
---|---|---|---|
result | This element contains a response from server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Name | Description | ||
---|---|---|---|
order_numbers | Order numbers. | ||
labels | Labels encode as PDF or ZPL string. |
Response code samples
{
“result”: {
“order_numbers”: [
“MYSXXXXXX1”,
“MYSXXXXXX2”
],
“labels”: “DawNjE1MiAwMDAwMCBuIAp0cmFp…”
},
“errors”: []
}
$response = array(
“result” => array(
“order_numbers” => array(
“MYSXXXXXX1”,
“MYSXXXXXX2”
),
“labels” => “DawNjE1MiAwMDAwMCBuIAp0cmFp…”
),
“errors” => array()
);
Cancel Shipment
Use this method to cancel a booked shipment. Does not work for shipments which are already arranged.
Request elements
Name | Required | Description | Example |
---|---|---|---|
action | Mandatory | Describes what type of request
will be sent to the server. | cancel_shipment |
order_no | Mandatory | Order number. | MYSXXXXXX1 |
Request Code samples
{
“action”: “cancel_shipment”,
“order_no”: “MYSXXXXXX1”
}
$request += array(
“action” => “labels”,
“order_no” => “MYSXXXXXX1”
);
Response elements
Name | Description | ||
---|---|---|---|
result | This element contains a response from server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Name | Description | Example | |
---|---|---|---|
success | Success | 1 |
Response code samples
{
“result”: {
“success”: “1”
},
“errors”: []
}
$response = array(
“result” => array(
“success” => “1”
),
“errors” => array()
);
$response = array(
“result” => array(
“success” => “1”
),
“errors” => array()
);
Service Points
This method is used to retrieve the address, opening hours and distance of service points. There can be two types of requests, based on the type of service point. The first request is the origin service point where the shipment will be dropped off by the sender. The order number is required for this type of request. The second request is the destination service point where the shipment will be picked up by the receiver. For this type of request, the quote service ID is required. Requires authentication request elements.
Request elements
Name | Required | Description | Example |
---|---|---|---|
action | Mandatory | Describes what type of request will be sent to the server. | service_points |
type | Mandatory | Origin – service point where the shipment will be dropped off by the sender; destination – service point where the shipment will be picked up by the receiver. | “origin” or “destination” |
order_no | Conditional | Order number. Required for origin type service points. | MYSXXXXXXX |
service_id | Conditional | Service id retrieved from quoting process. Required for destination type service points. | 3851 |
Request Code samples
{
“action”: “service_points”,
“type”: “origin”,
“order_no”: “MYSXXXXXXX”
}
$request += array(
“action” => “service_points”,
“type” => “origin”,
“order_no” => “MYSXXXXXXX”
);
Response elements
Name | Description | ||
---|---|---|---|
result | This element contains a response from the server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Name | Description | Example | |
---|---|---|---|
keycode | Service point keycode. | 1382551 | |
name | Name of the service point. | MyShipper | |
street_1 | Address where the service point is located. | Rotterdam Airportplein 27 | |
postal | Service point postcode. | 3045 AP | |
city | City of the service point. | Rotterdam | |
country | ISO country code of the service point. | NL | |
lat | Coordinate of the service point—latitude. | 51.9364411250671 | |
lng | Coordinate of the service point—longitude. | 4.42779022507839 | |
business_hours | Dataset of service point opening hours. | 3851 | |
distance | The distance in kilometres from the service point address to either sender / receiver address. Determined by service point type. | 2 |
Result child elements
Name | Description | Example | |
---|---|---|---|
Monday | Service point opening hours on Mondays. | 08.00-17.30 | |
Tuesday | Service point opening hours on Tuesdays. | 08.00-17.30 | |
Wednesday | Service point opening hours on Wednesdays. | 08.00-17.30 | |
Thursday | Service point opening hours on Thursdays. | 08.00-17.30 | |
Friday | Service point opening hours on Fridays. | 08.00-17.30 | |
Saturday | Service point opening hours on Saturdays. | 08.00-17.30 | |
Sunday | Service point opening hours on Sundays. | 08.00-17.30 |
Response code samples
{
“result”: [
{
“keycode”: “1382551”,
“name”: “Royal Mini Market”,
“street_1”: “Burgemeester Baumannlaan 151”,
“postal”: “3042 AC”,
“city”: “Rotterdam”,
“country”: “NL”,
“lat”: “51.9364411250671”,
“lng”: “4.42779022507839”,
“business_hours”: {
“Monday”: “08.00-20.00”,
“Tuesday”: “08.00-20.00”,
“Wednesday”: “08.00-20.00”,
“Thursday”: “08.00-20.00”,
“Friday”: “08.00-20.00”,
“Saturday”: “08.00-20.00”,
“Sunday”: []
},
“distance”: 2
},
{
“keycode”: “1364013”,
“name”: “Primera”,
“street_1”: “Burgemeester Baumannlaan 191”,
“postal”: “3042 AD”,
“city”: “Rotterdam”,
“country”: “NL”,
“lat”: “51.9345596226563”,
“lng”: “4.42854295007801”,
“business_hours”: {
“Monday”: “08.00-17.30”,
“Tuesday”: “08.00-17.30”,
“Wednesday”: “08.00-17.30”,
“Thursday”: “08.00-17.30”,
“Friday”: “08.00-17.30”,
“Saturday”: “10.00-17.00”,
“Sunday”: []
},
“distance”: 2.16
}
],
“errors”: []
}
$response = array(
“result” => array(
0 => array(
“keycode” => “1382551”,
“name” => “Royal Mini Market”,
“street_1” => “Burgemeester Baumannlaan 151”,
“postal” => “3042 AC”,
“city” => “Rotterdam”,
“country” => “NL”,
“lat” => “51.9364411250671”,
“lng” => “4.42779022507839”,
“business_hours” => array(
“Monday” => “08.00-20.00”,
“Tuesday” => “08.00-20.00”,
“Wednesday” => “08.00-20.00”,
“Thursday” => “08.00-20.00”,
“Friday” => “08.00-20.00”,
“Saturday” => “08.00-20.00”,
“Sunday” => array()
),
“distance” => 2
),
1 => array(
“keycode” => “1364013”,
“name” => “Primera”,
“street_1” => “Burgemeester Baumannlaan 191”,
“postal” => “3042 AD”,
“city” => “Rotterdam”,
“country” => “NL”,
“lat” => “51.9345596226563”,
“lng” => “4.42854295007801”,
“business_hours” => array(
“Monday” => “08.00-17.30”,
“Tuesday” => “08.00-17.30”,
“Wednesday” => “08.00-17.30”,
“Thursday” => “08.00-17.30”,
“Friday” => “08.00-17.30”,
“Saturday” => “10.00-17.00”,
“Sunday” => array()
),
“distance” => 2.16
)
),
“errors” => array()
);
Upload Documents
Use this method to upload documents for your order which are needed for customs and other purposes.
Request elements
Name | Required | Description | Example |
---|---|---|---|
action | Mandatory | Describes what type of request will be sent to the server. | upload_documents |
order_no | Mandatory | Order number. | MYSXXXXXX1 |
documents | Mandatory | Array of documents information. |
Documents child elements
Name | Required | Description | Example |
---|---|---|---|
document_type | Mandatory | Possible values are “Customs Invoice” or “Certificate of Origin”. | Customs Invoice
|
name | Mandatory | Name. | Customs Invoice.pdf |
type | Mandatory | Type. | application/pdf |
content | Mandatory | Base64 encoded content of the file. | DawNjE1MiAwMDAwMCBuIAp0cmFp… |
Request Code samples
{
“action”: “upload_documents”,
“order_no”: “MYSXXXXXX1”,
“documents”: [
{
“document_type”: “Customs Invoice”,
“name”: “Customs Invoice.pdf”,
“type”: “application/pdf”,
“content”: “DawNjE1MiAwMDAwMCBuIAp0cmFp…”
}
]
}
$request += array(
“action” => “upload_documents”,
“order_no” => “MYSXXXXXX1”,
“documents” => array(
0 => array(
“document_type” => “Customs Invoice”,
“name” => “Customs Invoice.pdf”
“type” => “application/pdf”,
“content” => “DawNjE1MiAwMDAwMCBuIAp0cmFp…”
)
)
);
Response elements
Name | Description | ||
---|---|---|---|
result | This element contains a response from the server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Name | Description | Example | |
---|---|---|---|
success | Success. | 1 |
Response code samples
{
“result”: {
“success”: “1”
},
“errors”: []
}
$response = array(
“result” => array(
“success” => “1”
),
“errors” => array()
);
Go To Production
By default, our API is using development (sandbox) environment. When you have finished testing required methods, you can change the environment variable passed in the request elements to “production” so you can actually start sending your shipments via our platform.
Request elements
Name | Required | Description | Example |
---|---|---|---|
environment | Mandatory | Use production environment to start shipping. | “production” or “development” |
account | Optional | Used if your user has multiple accounts enabled. | MyShipper B.V. |
Request Code samples
{
“environment”: “production”
“action”: “ship”,
….
}
{
“environment”: “production”
“action”: “ship”,
….
}
$request += array(
“environmet” => “production”
“action” => “ship”,
…
);
Global shipping solutions
All carriers in one shipping platform.
Connect with the B2B shipping platform for efficient, effortless and sustainable worldwide shipping. Sending your parcels, documents, and pallets in just a few clicks.
Efficiently manage returns
Book your shipments instantly.
Enhance customer satisfaction with our all-in-one shipping solutions. Effortlessly manage orders and returns, ensuring optimised logistics operations.
Worldwide tracking
Parcels, pallets, documents, and cargo shipments.
Access simplified and in depth real-time tracking data. Effortlessly track all your domestic and international shipments and create automated notifications.
Easy order management
One-click shipping for all your orders.
Synchronise your orders, checkout, and shipping solutions. One platform, all couriers. Ship all your parcels, pallets, and documents instantly.
Shipping as a Service
Connect your own contracts and apps.
Access one of our integration modules and elevate your shipping process in a few clicks. Connect, select and ship.
Platform
Access the MyShipper platform together with a wide variety of smart shippingtools. Ship globally using our carrier contracts.
Free
account
Connect
Arrange your full shipping process from one clear online platform and connect your own software and carrier contract.
€125
per Month
Connect+
Complete your shipping process by connecting multiple apps and carrier contracts. Arrange all your shipping from one environment.
€175
per Month