Api
Digitalisering van uw logistiek
Verstuur eenvoudig documenten, pakketten en pallets met ons gebruiksvriendelijke verzendplatform. Ontvang de beste verzendtarieven en oplossingen en verzend met de grootste vervoerders.
Introductie
De Select Courier API biedt een snelle en eenvoudige manier om toegang te krijgen tot service-informatie via internet. Met deze API kunt u eenvoudig de Select Courier-technologie integreren in uw eigen applicaties of website. De gebruikers die uw applicaties of website gebruiken, kunnen snel en veilig toegang krijgen tot alle Select Courier-services.
Elke tool die vloeiend is in HTTP kan communiceren met onze API door simpelweg de juiste URI op te vragen. Verzoeken moeten worden gedaan met behulp van het HTTPS-protocol, zodat het verkeer wordt versleuteld. De API reageert op verschillende methoden, afhankelijk van de vereiste actie.
Nadat de API is geïmplementeerd, kunt u de services die we aanbieden verkrijgen, offertes genereren, boekingen plaatsen, labels genereren, collecties regelen en trackinginformatie krijgen.
Vereisten
! JSON-bibliotheek en internetverbinding.
! API ondersteunt alleen ASCII-tekens.
Authenticatie
Om een API-verzoek te kunnen doen, raden we u aan om de cURL-bibliotheek te gebruiken. U hebt ook een API-key en API-secret nodig. API-key’s zijn unieke codes die u of uw applicatie identificeert wanneer u één van onze API’s aanroept. API-secret is een andere code die als wachtwoord fungeert voor de API-key. Nadat u een account bij ons heeft aangemaakt, kunt u een API-key en API-secret genereren in uw gebruikersinstellingen.
Request Code samples
curl -X POST -k \
-u API_KEY:API_SECRET \
-H “Content-Type: application/json” \
-d ‘{“action”: “quote”}’ \
https://portal.selectcourier.com/api/json
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “https://portal.selectcourier.com/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
Gebruik deze methode om informatie te krijgen over beschikbare services en prijzen. Vereist ‘authentication request elements’.
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
action | Mandatory | Describes what type of request will be sent to the server. | quote |
o_company | Optional | Shipper’s company name. | SelectCourier |
o_name | Mandatory | Contact persons name. | John White |
o_email | Optional | Shipper’s email address. | test@selectcourier.com |
o_phone | Mandatory | Shipper’s phone number. | 0031102237006 |
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. | SelectCourier |
d_name | Mandatory | Contact name at the consignee’s. | David Black |
d_email | Optional | Consignee’s email address. | test@selectcourier.com |
d_phone | Mandatory | Consignee’s phone number. | 0031102237006 |
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. | SC0000 |
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
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
quantity | Mandatory | Number of same products. | 2 |
product_code | Mandatory | Product or article code. | SCRA27 |
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
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
Type | Mandatory | Third party type (Broker, Importer, Notifying Party). | Broker |
company | Optional | Third party’s company name. | SelectCourier |
name | Mandatory | Contact name at the third party. | David Black |
email | Optional | Third party’s email address. | test@selectcourier.com |
phone | Mandatory | Third party’s phone number. | 0031102237006 |
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
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
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
Naam | Beschrijving | ||
---|---|---|---|
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
Naam | Beschrijving | ||
---|---|---|---|
services | Dataset of services. |
Services child elements
Naam | Beschrijving | Voorbeeld | |
---|---|---|---|
service_id | Service ID. | 12604 | |
courier_keycode | Courier keycode. | SC | |
courier_name | Courier name. | SELECTCOURIER | |
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” => “sc”,
“courier_name” => “SELECT COURIER”,
“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” => “sc”,
“courier_name” => “SELECT COURIER”,
“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()
);
Verzenden
Gebruik deze methode om een boeking te maken. Verzendinglabels worden gegenereerd als PDF. Vereist ‘authentication request elements’.
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
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. | SelectCourier |
d_sp_keycode | Optional | Destination service point keycode. | 1382551 |
d_sp_street_1 | 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
Naam | Beschrijving | ||
---|---|---|---|
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
Naam | Beschrijving | Voorbeeld | |
---|---|---|---|
order_no | Order number. | SCTEST | |
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”: “SCTEST”,
“consignment_no”: “COURIERCONN”,
“label”: “DawNjE1MiAwMDAwMCBuIAp0cmFp…”,
“remarks”: “RawNjE1MiAwMDAwMCBuIAp0cmFp…”
},
“errors”: []
}
$response = array(
“result” => array(
“order_no” => “SCTEST”,
“consignment_no” => “COURIERCONN”,
“label” => “DawNjE1MiAwMDAwMCBuIAp0cmFp…”,
“remarks” => “RawNjE1MiAwMDAwMCBuIAp0cmFp…”,
),
“errors” => array()
);
Collectie
Gebruik deze methode om collecties in te plannen. Vereist ‘authentication request elements’.
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
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. | SelectCourier |
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”: [
“SCXXXXXX1”,
“SCXXXXXX2”
]
}
$request += array(
“action” => “pickup”,
“date” => “2021-01-24”,
“r_time” => “09:00”,
“c_time” => “17:00”,
“instuctions” => “test collection”,
“shipments” => array(
“SCXXXXXX1”, “SCXXXXXX2”
)
);
Response elements
Naam | Beschrijving | ||
---|---|---|---|
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
Naam | Beschrijving | ||
---|---|---|---|
collection_no | Collection number. | ||
manifest | Manifest encoded as PDF string. |
Response code samples
{
“result”: {
“collection_no”: “SCTEST”,
“manifest”: “RawNjE1MiAwMDAwMCBuIAp0cmFp…”
},
“errors”: []
}
$response = array(
“result” => array(
“collection_no” => “SCTEST”,
“manifest” => “RawNjE1MiAwMDAwMCBuIAp0cmFp…”
),
“errors” => array()
);
Webhooks
Met webhooks kunt u eenvoudig trackingupdates toevoegen aan een specifieke URL. Om webhooks te activeren, voegt u uw URL toe in accountinstellingen. Wilt u zeker weten of het gelukt is? U kunt het meteen testen.
Wanneer er een event plaatsvindt, doet ons systeem een HTTP POST-verzoek naar uw geconfigureerde URL om de webhook te ontvangen. Webhook-data wordt naar de geconfigureerde URL verzonden als een webhook-payload in JSON-formaat.
Track & Trace
Gebruik deze methode om informatie over uw bestelling te ontvangen (status, locatie, datum, tijd).
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
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). | “SCXXXXXX1”, “SCXXXXXX2” |
Request Code samples
{
“action”: “track”,
“order_numbers”: [
“SCXXXXXX1”,
“SCXXXXXX2”
]
}
$request += array(
“action” => “track”,
“order_numbers” => array(
“SCXXXXXX1”,
“SCXXXXXX2”
)
);
Response elements
Naam | Beschrijving | ||
---|---|---|---|
result | This element contains response from server with information about available services and their prices. | ||
errors | This element contains error messages. |
Result child elements
Naam | Beschrijving | Voorbeeld | |
---|---|---|---|
order_no | Order Number. | SCXXXXXX1 | |
status | Order’s status. | Arranged | |
consignment_no | Courier consignment number. | COURIERCONN | |
courier_keycode | Courier keycode. | SC | |
courier_name | Courier name. | SELECTCOURIER | |
service_keycode | Service keycode. | EXPRESS_WORLDWIDE | |
service_name | Service name. | Express Worldwide | |
items | Array of items |
Items child elements
Naam | Beschrijving | Voorbeeld | |
---|---|---|---|
item_no | Item number. | SCXXXXXXX | |
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
Naam | Beschrijving | Voorbeeld | |
---|---|---|---|
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”: “SCXXXXXX1”,
“status”: “Collected”,
“consignment_no”: “COURIERCONN”,
“courier_keycode”: “sc”,
“courier_name”: “SELECT COURIER”,
“service_keycode”: “EXPRESS_WORLDWIDE”,
“service_name”: “Express Worldwide”,
“items”: [
{
“item_no”: “SCXXXXXX1-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”: “SCXXXXXX2”,
“status”: “Delivered”,
“consignment_no”: “COURIERCONN”,
“courier_keycode”: “sc”,
“courier_name”: “SELECT COURIER”,
“service_keycode”: “standard”,
“service_name”: “Standard”,
“items”: [
{
“item_no”: “SCXXXXXX2-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” => “SCXXXXXX1”,
“status” => “Collected”,
“consignment_no” => “COURIERCONN”,
“courier_keycode” => “sc”,
“courier_name” => “SELECT COURIER”,
“service_keycode” => “EXPRESS_WORLDWIDE”,
“service_name” => “Express Worldwide”,
“items” => array(
0 => array(
“item_no” => “SCXXXXXX1-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” => “SCXXXXXX2”,
“status” => “Delivered”,
“consignment_no” => “COURIERCONN”,
“courier_keycode” => “sc”,
“courier_name” => “SELECT COURIER”,
“service_keycode” => “standard”,
“service_name” => “Standard”,
“items” => array(
0 => array(
“item_no” => “SCXXXXXX2-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
Gebruik deze methode om meerdere of enkele zendingslabels op te halen nadat er al een zending is aangemaakt. Vereist ‘authentication request elements’.
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
order_numbers | Mandatory | Array or order numbers (For multiple shipment tracking). | “SCXXXXXX1”, “SCXXXXXX2” |
Request Code samples
{
“action”: “labels”,
“order_numbers”: [
“SCXXXXXX1”,
“SCXXXXXX2”
]
}
$request += array(
“action” => “labels”,
“order_numbers” => array(
“SCXXXXXX1”,
“SCXXXXXX2”
)
);
Response elements
Naam | Beschrijving | ||
---|---|---|---|
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
Naam | Beschrijving | ||
---|---|---|---|
order_numbers | Order numbers. | ||
labels | Labels encode as PDF or ZPL string. |
Response code samples
{
“result”: {
“order_numbers”: [
“SCXXXXXX1”,
“SCXXXXXX2”
],
“labels”: “DawNjE1MiAwMDAwMCBuIAp0cmFp…”
},
“errors”: []
}
$response = array(
“result” => array(
“order_numbers” => array(
“SCXXXXXX1”,
“SCXXXXXX2”
),
“labels” => “DawNjE1MiAwMDAwMCBuIAp0cmFp…”
),
“errors” => array()
);
Zending annuleren
Gebruik deze methode om een geboekte zending te annuleren. Dit is niet mogelijk wanneer een zending al geregeld is. Neem in dit geval contact op met onze Customer Service.
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
action | Mandatory | Describes what type of request
will be sent to the server. | cancel_shipment |
order_no | Mandatory | Order number. | SCXXXXXX1 |
Request Code samples
{
“action”: “cancel_shipment”,
“order_no”: “SCXXXXXX1”
}
$request += array(
“action” => “labels”,
“order_no” => “SCXXXXXX1”
);
Response elements
Naam | Beschrijving | ||
---|---|---|---|
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
Naam | Beschrijving | 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()
);
Servicepunten
Deze methode wordt gebruikt om het adres, de openingstijden en de afstand van servicepunten op te vragen. Er kunnen twee soorten verzoeken zijn, afhankelijk van het type servicepunt. Het eerste verzoek is het servicepunt van herkomst waar de zending door de afzender wordt afgegeven. Voor dit type aanvraag is het ordernummer vereist. Het tweede verzoek is het servicepunt van bestemming waar de zending wordt opgehaald door de ontvanger. Voor dit type aanvraag, is de quote service-ID vereist. Vereist ‘authentication request elements’.
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
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. | SCXXXXXXX |
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”: “SCXXXXXXX”
}
$request += array(
“action” => “service_points”,
“type” => “origin”,
“order_no” => “SCXXXXXXX”
);
Response elements
Naam | Beschrijving | ||
---|---|---|---|
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
Naam | Beschrijving | Voorbeeld | |
---|---|---|---|
keycode | Service point keycode. | 1382551 | |
name | Name of the service point. | SelectCourier | |
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
Naam | Beschrijving | Voorbeeld | |
---|---|---|---|
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 documenten
Gebruik deze methode om documenten voor uw zending te uploaden die nodig zijn voor douane- en andere doeleinden.
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
action | Mandatory | Describes what type of request will be sent to the server. | upload_documents |
order_no | Mandatory | Order number. | SCXXXXXX1 |
documents | Mandatory | Array of documents information. |
Documents child elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
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”: “SCXXXXXX1”,
“documents”: [
{
“document_type”: “Customs Invoice”,
“name”: “Customs Invoice.pdf”,
“type”: “application/pdf”,
“content”: “DawNjE1MiAwMDAwMCBuIAp0cmFp…”
}
]
}
$request += array(
“action” => “upload_documents”,
“order_no” => “SCXXXXXX1”,
“documents” => array(
0 => array(
“document_type” => “Customs Invoice”,
“name” => “Customs Invoice.pdf”
“type” => “application/pdf”,
“content” => “DawNjE1MiAwMDAwMCBuIAp0cmFp…”
)
)
);
Response elements
Naam | Beschrijving | ||
---|---|---|---|
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
Naam | Beschrijving | Voorbeeld | |
---|---|---|---|
success | Success. | 1 |
Response code samples
{
“result”: {
“success”: “1”
},
“errors”: []
}
$response = array(
“result” => array(
“success” => “1”
),
“errors” => array()
);
Naar productie
Onze API gebruikt standaard een ontwikkelomgeving (sandbox). Wanneer u klaar bent met het testen van de vereiste methoden, kunt u de omgevingsvariabele die in de ‘request elements’ is doorgegeven, wijzigen in ‘production’, zodat u daadwerkelijk kunt beginnen met het verzenden van uw zendingen via ons platform.
Request elements
Naam | Vereist | Beschrijving | Voorbeeld |
---|---|---|---|
environment | Mandatory | Use production environment to start shipping. | “production” or “development” |
account | Optional | Used if your user has multiple accounts enabled. | Select Courier B.V. |
Request Code samples
{
“environment”: “production”
“action”: “ship”,
….
}
{
“environment”: “production”
“action”: “ship”,
….
}
$request += array(
“environmet” => “production”
“action” => “ship”,
…
);
PLAN EEN GRATIS DEMO
Ontdek wat Select Courier voor uw organisatie kan doen.
Ons verzendplatform kan worden aangepast aan al uw wensen. Van het sneller en betrouwbaarder leveren van uw pakketten tot het efficiënter opereren van uw bedrijf. Plan een demo om te zien hoe u:
- Al uw leveringen binnen enkele klikken kunt verzenden.
- Uw hele logistieke proces op één plek kunt beheren.
- Naadloos kunt integreren met uw huidige software.
- Toegang krijgt tot analyses en rapporten voor betere besluitvorming.
Plan een gratis demo
Ontdek wat Select Courier voor uw organisatie kan doen.
Ons verzendplatform kan worden aangepast aan al uw wensen. Van het sneller en betrouwbaarder leveren van uw pakketten tot het efficiënter opereren van uw bedrijf. Plan een demo om te zien hoe u:
- Al uw leveringen binnen enkele klikken kunt verzenden.
- Uw hele logistieke proces op één plek kunt beheren.
- Naadloos kunt integreren met uw huidige software.
- Toegang krijgt tot analyses en rapporten voor betere besluitvorming.