Fetches delivery options and prepares shipments.
Go to:
Fetch delivery options
GET /delivery-checkouts/{deliveryCheckoutId}
Fetches delivery options that are available in a Delivery Checkout.
The language and currency used as query parameters must be configured for the Delivery Checkout in nShift Delivery.
Some carriers may require more address parameters to consider the address complete.
URI parameters
deliveryCheckoutId |
string |
The Delivery Checkout ID from the set-up |
Required |
Query parameters
currency |
string |
Currency code |
Required |
language |
string |
Language code |
Required |
tocountry |
string |
Receiver country |
Required |
tozipcode |
string |
Receiver zip code |
Required |
Please refer to the parameter list for values and other parameters that can be added to the query.
Response example
{
"deliveryCheckoutId": "ece27d51-614d-4339-9728-4113e16b87ff+37",
"options": [
{
"id": "121f80bf-2652-43c7-9870-74de9d3157d9",
"name": "Hemleverans",
"description1": "Få paket hem",
"description2": "",
"description3": "",
"description4": "",
"description5": "",
"carrierId": null,
"priceDescription": null,
"priceValue": null,
"subOptions": [ {
"id": "aa59c047-21cc-46fa-bb62-3ca2566b6bbe",
"name": "PostNord Parcel",
"description1": "Leverans 1-2 vardagar",
"description2": "",
"description3": "",
"description4": "",
"deliveryTime": "",
"carrierId": "PLAB",
"priceDescription": "20 kr",
"priceValue": 20,
"subOptions": [],
"agents": []
}],
"agents": []
},
{
"id": "199e9ed0-5abf-4109-9899-270cf39f7138",
"name": "MyPack Collect",
"description1": "",
"description2": "",
"description3": "",
"description4": "",
"description5": "",
"carrierId": "PLAB",
"priceDescription": "29 SEK",
"priceValue": 29,
"subOptions": [],
"agents": [
{
"id": "74383",
"name": "Agent name",
"address1": "Agentstreet 1",
"address2": null,
"zipCode": "11111",
"city": "STOCKHOLM",
"country": "SE"
},
{
"id": "43333",
"name": "Agent name",
"address1": "Agentstreet 2",
"address2": null,
"zipCode": "11111",
"city": "STOCKHOLM",
"country": "SE"
}
],
"fields": null"addons": [
{
"id": "FCNOTIFYEMAIL",
"description": "E-postavisering",
"selected": false,
"priceDescription": "Gratis!",
"price": 0,
"oneOf": null,
"atLeastOneOf": [
"FCNOTIFYEMAIL",
"FCNOTIFYSMS",
"FCNOTIFYLETTER"
],
"exclude": [
"FCNOTIFYLETTER"
],
"fields": [
{
"id": "email",
"description": "E-post",
"type": "EMAIL",
"value": null,
"mandatory": true,
"min": null,
"max": null,
"pattern": null,
"items": []
}
]
},
{
"id": "FCNOTIFYSMS",
"description": "SMS-avisering",
"selected": false,
"priceDescription": "40 SEK",
"price": 40,
"oneOf": null,
"atLeastOneOf": [
"FCNOTIFYEMAIL",
"FCNOTIFYSMS",
"FCNOTIFYLETTER"
],
"exclude": [
"FCNOTIFYLETTER"
],
"fields": [
{
"id": "sms",
"description": "Sms",
"type": "PHONE",
"value": null,
"mandatory": true,
"min": null,
"max": null,
"pattern": null,
"items": []
}
]
},
{
"id": "FCNOTIFYLETTER",
"description": "Brevavisering",
"selected": false,
"priceDescription": "49 SEK",
"price": 49,
"oneOf": null,
"atLeastOneOf": [
"FCNOTIFYEMAIL",
"FCNOTIFYSMS",
"FCNOTIFYLETTER"
],
"exclude": [
"FCNOTIFYSMS",
"FCNOTIFYEMAIL"
],
"fields": []
}
]
}
]
}
For a description of properties, please refer to the Property reference guide.
For schema and testing, please refer to https://api.unifaun.com/rs-docs/ and navigate to /delivery-checkouts/{deliveryCheckoutId} GET.
Create a prepared shipment
POST /delivery-checkouts/{deliveryCheckoutId}
Creates a prepared shipment based on the delivery option the consumer has selected in the webshop.
This endpoint is mandatory.
Always use the complete Delivery Checkout ID since the Delivery Checkout version is included in the ID.
URI parameters
deliveryCheckoutId |
string |
The Delivery Checkout ID returned from the GET request |
Required |
returnShipmentData |
boolean |
Shipment data will be returned in the response. |
Optional |
Body example with agent (PUDO) and SMS-notification addon
{
{
"shipment": {
"receiver": {
"name": "nShift AB",
"address1": "Tegnérgatan 34",
"zipcode": "11359",
"city": "STOCKHOLM",
"country": "SE",
"phone": "+46 8 34 35 15",
"email": email2@example.com
},
"agent": {
"quickId": "74383",
"name": "Agent name",
"address1": "Agentstreet 1",
"address2": null,
"zipcode": "11111",
"city": "STOCKHOLM",
"country": "SE"
},
"orderNo": "order number 123",
"senderReference": "sender ref 234",
"receiverReference": "receiver ref 345"
},
"selectedOptionId": "199e9ed0-5abf-4109-9899-270cf39f7138",
"selectedAddons": [
{
"id": "FCNOTIFYSMS",
"fields": [
{
"id": "sms",
"value": "070000000"
}
]
}
],
"prepareId": "100012",
"returnShipmentData": true
}
Body example with timeslot
{
"shipment": {
"receiver": {
"name": "nShift AB",
"address1": "Tegnérgatan 34",
"zipcode": "11359",
"city": "STOCKHOLM",
"country": "SE",
"phone": "+46 8 34 35 15",
"email": email2@example.com
},
"orderNo": "order number 123",
"senderReference": "sender ref 234",
"receiverReference": "receiver ref 345"
},
"selectedOptionId": "6d9b4f7a-944e-4543-b21c-6e28d717cddf",
"fields": [
{
"id": "FCDELIVERYTIMEINTERVAL",
"value": "1678860000:1678892400:1678982400:1679000400"
}
],
"prepareId": "100013",
"returnShipmentData": false
}
A successful call returns an empty response with status 200 OK, unless the returnShipmentData value is set to true.
For a description of properties, please refer to the Property reference guide.
For schema and testing, please refer to https://api.unifaun.com/rs-docs/ and navigate to /delivery-checkouts/{deliveryCheckoutId} POST.