DPD Slovakia Tracking API
Create a tracking
Creates a new tracking object.
Parameters
tracking_numberstring required
Tracking number of a shipment. Duplicated tracking numbers, tracking numbers with invalid tracking number format will not be accepted.
Only accept tracking numbers with length from 4 to 100slugstring, staticdpd-sk.titlestring
By default this field shows thetracking_number, but you can customize it as you wish with any info (e.g. the order number).order_idstring
A globally-unique identifier for the order.order_promised_delivery_datestring
The promised delivery date of the order. It uses the formatYYYY-MM-DD. This has no timezone and uses whatever date you provide. Since other EDDs use the shipment recipient’s timezone, we suggest following the same logic here.
Returns
Return a tracking object if the call succeeded.
curl --request POST \
--url https://api.aftership.com/tracking/2024-04/trackings \
--header 'Content-Type: application/json'\
--data '{"tracking":{"slug":"dpd-sk","title":"Title Name","smses":["+18555072509","+18555072501"],"emails":["[email protected]","[email protected]"],"order_id":"ID 1234","language":"en","pickup_note":"Reach out to our staffs when you arrive our stores for shipment pickup","origin_city":"Beijing","order_number":"1234","origin_state":"Beijing","order_id_path":"http://www.aftership.com/order_id=1234","custom_fields":{"product_name":"iPhone Case","product_price":"USD19.99"},"delivery_type":"pickup_at_store","tracking_number":"123456789","pickup_location":"Flagship Store","destination_city":"New York City","destination_state":"New York","origin_postal_code":"065001","origin_country_iso3":"CHN","origin_raw_location":"Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China","destination_postal_code":"10001","destination_country_iso3":"USA","destination_raw_location":"13th Street, New York, NY, 10011, USA, United States","order_promised_delivery_date":"2019-05-20"}}'const url = 'https://api.aftership.com/tracking/2024-04/trackings';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: "{\"tracking\":{\"slug\":\"dpd-sk\",\"title\":\"Title Name\",\"smses\":[\"+18555072509\",\"+18555072501\"],\"emails\":[\"[email protected]\",\"[email protected]\"],\"order_id\":\"ID 1234\",\"language\":\"en\",\"pickup_note\":\"Reach out to our staffs when you arrive our stores for shipment pickup\",\"origin_city\":\"Beijing\",\"order_number\":\"1234\",\"origin_state\":\"Beijing\",\"order_id_path\":\"http://www.aftership.com/order_id=1234\",\"custom_fields\":{\"product_name\":\"iPhone Case\",\"product_price\":\"USD19.99\"},\"delivery_type\":\"pickup_at_store\",\"tracking_number\":\"123456789\",\"pickup_location\":\"Flagship Store\",\"destination_city\":\"New York City\",\"destination_state\":\"New York\",\"origin_postal_code\":\"065001\",\"origin_country_iso3\":\"CHN\",\"origin_raw_location\":\"Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China\",\"destination_postal_code\":\"10001\",\"destination_country_iso3\":\"USA\",\"destination_raw_location\":\"13th Street, New York, NY, 10011, USA, United States\",\"order_promised_delivery_date\":\"2019-05-20\"}}"
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/tracking/2024-04/trackings"
payload := strings.NewReader("{\"tracking\":{\"slug\":\"dpd-sk\",\"title\":\"Title Name\",\"smses\":[\"+18555072509\",\"+18555072501\"],\"emails\":[\"[email protected]\",\"[email protected]\"],\"order_id\":\"ID 1234\",\"language\":\"en\",\"pickup_note\":\"Reach out to our staffs when you arrive our stores for shipment pickup\",\"origin_city\":\"Beijing\",\"order_number\":\"1234\",\"origin_state\":\"Beijing\",\"order_id_path\":\"http://www.aftership.com/order_id=1234\",\"custom_fields\":{\"product_name\":\"iPhone Case\",\"product_price\":\"USD19.99\"},\"delivery_type\":\"pickup_at_store\",\"tracking_number\":\"123456789\",\"pickup_location\":\"Flagship Store\",\"destination_city\":\"New York City\",\"destination_state\":\"New York\",\"origin_postal_code\":\"065001\",\"origin_country_iso3\":\"CHN\",\"origin_raw_location\":\"Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China\",\"destination_postal_code\":\"10001\",\"destination_country_iso3\":\"USA\",\"destination_raw_location\":\"13th Street, New York, NY, 10011, USA, United States\",\"order_promised_delivery_date\":\"2019-05-20\"}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/tracking/2024-04/trackings"))
.method("POST", HttpRequest.BodyPublishers.ofString("{\"tracking\":{\"slug\":\"dpd-sk\",\"title\":\"Title Name\",\"smses\":[\"+18555072509\",\"+18555072501\"],\"emails\":[\"[email protected]\",\"[email protected]\"],\"order_id\":\"ID 1234\",\"language\":\"en\",\"pickup_note\":\"Reach out to our staffs when you arrive our stores for shipment pickup\",\"origin_city\":\"Beijing\",\"order_number\":\"1234\",\"origin_state\":\"Beijing\",\"order_id_path\":\"http://www.aftership.com/order_id=1234\",\"custom_fields\":{\"product_name\":\"iPhone Case\",\"product_price\":\"USD19.99\"},\"delivery_type\":\"pickup_at_store\",\"tracking_number\":\"123456789\",\"pickup_location\":\"Flagship Store\",\"destination_city\":\"New York City\",\"destination_state\":\"New York\",\"origin_postal_code\":\"065001\",\"origin_country_iso3\":\"CHN\",\"origin_raw_location\":\"Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China\",\"destination_postal_code\":\"10001\",\"destination_country_iso3\":\"USA\",\"destination_raw_location\":\"13th Street, New York, NY, 10011, USA, United States\",\"order_promised_delivery_date\":\"2019-05-20\"}}"))
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.post('https://api.aftership.com/tracking/2024-04/trackings', headers=headers, json={"tracking":{"slug":"dpd-sk","title":"Title Name","smses":["+18555072509","+18555072501"],"emails":["[email protected]","[email protected]"],"order_id":"ID 1234","language":"en","pickup_note":"Reach out to our staffs when you arrive our stores for shipment pickup","origin_city":"Beijing","order_number":"1234","origin_state":"Beijing","order_id_path":"http://www.aftership.com/order_id=1234","custom_fields":{"product_name":"iPhone Case","product_price":"USD19.99"},"delivery_type":"pickup_at_store","tracking_number":"123456789","pickup_location":"Flagship Store","destination_city":"New York City","destination_state":"New York","origin_postal_code":"065001","origin_country_iso3":"CHN","origin_raw_location":"Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China","destination_postal_code":"10001","destination_country_iso3":"USA","destination_raw_location":"13th Street, New York, NY, 10011, USA, United States","order_promised_delivery_date":"2019-05-20"}}){
"meta": {
"code": 201
},
"data": {
"tracking": {
"id": "5b766a5cc7c33c0e007de3c9",
"ios": [],
"tag": "Pending",
"slug": "dpd-sk",
"note": "test note",
"smses": [],
"title": "1111111111111",
"active": true,
"emails": [],
"source": "api",
"subtag": "Pending_001",
"android": [],
"order_id": "123",
"language": null,
"signed_by": "John Doe",
"created_at": "2018-08-17T06:25:32+00:00",
"updated_at": "2018-08-17T06:25:32+00:00",
"order_date": "2021-07-26T11:23:51-05:00",
"order_tags": [],
"checkpoints": [],
"pickup_note": "Contact shop keepers when you arrive our stores for shipment pickup",
"unique_token": "deprecated",
"tracking_key": null,
"custom_fields": null,
"customer_name": "John doe",
"delivery_time": 0,
"order_id_path": "/123",
"shipment_type": "{shipment_type}",
"tracked_count": 0,
"delivery_type": "pickup_at_store",
"subtag_message": "Pending",
"tracking_state": null,
"on_time_status": "trending-on-time",
"last_updated_at": "2018-08-17T06:25:32+00:00",
"tracking_number": "1111111111111",
"shipment_weight": 1,
"pickup_location": "Flagship Store",
"subscribed_smses": [],
"return_to_sender": false,
"expected_delivery": "2018-08-16",
"subscribed_emails": [],
"tracking_ship_date": null,
"first_attempted_at": "2018-08-16",
"on_time_difference": 0,
"origin_country_iso3": "USD",
"shipment_pickup_date": "2018-08-16",
"shipment_weight_unit": "kg",
"tracking_postal_code": null,
"courier_tracking_link": "{courier_tracking_link}",
"courier_redirect_link": "{courier_redirect_link}",
"shipment_package_count": 0,
"shipment_delivery_date": "2018-08-16",
"tracking_account_number": null,
"tracking_origin_country": null,
"destination_country_iso3": "USA",
"last_mile_tracking_supported": false,
"tracking_destination_country": null,
"order_promised_delivery_date": "2019-05-20",
"courier_destination_country_iso3": "USA",
"aftership_estimated_delivery_date": null
}
}
}Retrieve a tracking
Retrieves the details of an existing tracking. Supply the unique tracking ID from either a tracking creation request or the tracking list, and AfterShip will return the corresponding tracking information.
Parameters
fieldsstring
List of fields to include in the response. Use comma for multiple values. Fields to include:tracking_postal_code,tracking_ship_date,tracking_account_number,tracking_key,tracking_origin_country,tracking_destination_country,tracking_state,title,order_id,tag,checkpointslangstring
Translate checkpoint messages from the carrier’s provided language to the target language.
Returns
Returns a tracking object if a valid identifier was provided.
curl --request GET \
--url https://api.aftership.com/tracking/2024-04/trackings/id \
--header 'Content-Type: application/json'const url = 'https://api.aftership.com/tracking/2024-04/trackings/id';
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
body: undefined
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/tracking/2024-04/trackings/id"
req, _ := http.NewRequest("GET", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/tracking/2024-04/trackings/id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.get('https://api.aftership.com/tracking/2024-04/trackings/id', headers=headers){
"meta": {
"code": 200
},
"data": {
"tracking": {
"id": "5b7658cec7c33c0e007de3c5",
"ios": [],
"tag": "Delivered",
"slug": "dpd-sk",
"note": null,
"smses": [],
"title": "Title Name",
"active": false,
"emails": [],
"source": "api",
"subtag": "Delivered_001",
"android": [],
"order_id": null,
"language": null,
"signed_by": "..KOSUTOKO",
"created_at": "2018-08-17T05:10:38+00:00",
"updated_at": "2018-08-17T05:10:46+00:00",
"order_tags": [],
"checkpoints": [
{
"slug": "dpd-sk",
"city": null,
"created_at": "2018-08-17T05:10:41+00:00",
"location": null,
"country_name": null,
"message": "Shipment information sent to DPD Slovakia",
"country_iso3": null,
"tag": "InfoReceived",
"subtag": "InfoReceived_001",
"subtag_message": "Info Received",
"checkpoint_time": "2018-07-23T01:21:39-05:00",
"coordinates": [],
"state": null,
"zip": null,
"raw_tag": "FPX_L_RPIF"
}
],
"pickup_note": null,
"order_number": "1234",
"unique_token": "deprecated",
"tracking_key": null,
"custom_fields": null,
"customer_name": null,
"delivery_time": 2,
"order_id_path": null,
"shipment_type": "{shipment_type}",
"tracked_count": 1,
"delivery_type": "pickup_at_store",
"subtag_message": "Delivered",
"tracking_state": null,
"on_time_status": "trending-on-time",
"last_updated_at": "2018-08-17T05:10:46+00:00",
"tracking_number": "111111111111",
"shipment_weight": 4,
"pickup_location": "Flagship Store",
"subscribed_smses": [],
"return_to_sender": false,
"expected_delivery": null,
"subscribed_emails": [],
"tracking_ship_date": null,
"first_attempted_at": "2018-07-25T10:10:00+09:00",
"on_time_difference": 0,
"origin_country_iso3": "CHN",
"shipment_pickup_date": "2018-07-23T08:58:00",
"shipment_weight_unit": "kg",
"tracking_postal_code": null,
"courier_tracking_link": "{courier_tracking_link}",
"courier_redirect_link": "{courier_redirect_linkGet tracking results of a single tracking.}",
"shipment_package_count": 1,
"shipment_delivery_date": "2018-07-25T01:10:00",
"tracking_account_number": null,
"tracking_origin_country": null,
"destination_country_iso3": "JPN",
"last_mile_tracking_supported": null,
"tracking_destination_country": null,
"order_promised_delivery_date": "2019-05-02",
"courier_destination_country_iso3": "JPN",
"aftership_estimated_delivery_date": {
"confidence_score": null,
"estimated_delivery_date": "2022-01-03",
"estimated_delivery_date_min": "2022-01-01",
"estimated_delivery_date_max": "2022-01-06"
}
}
}
}Update a tracking
Updates the specific tracking by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Parameters
smsesarray[string]
The phone number(s) to receive sms notifications. Input [] to clear the value of this field. Supports up to 3 phone numbers.emailsarray[string]
Email address(es) to receive email notifications. Input [] to clear the value of this field. Supports up to 3 email addresses.titlestring
By default this field shows the tracking_number, but you can customize it as you wish with any info (e.g. the order number).customer_namestring
Customer name of the tracking.order_idstring
A globally-unique identifier for the order.order_id_pathstring
The URL for the order in your system or store.notestring
Text field for the note. Input""to clear the value of this field.languagestring
The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. Use an ISO 639-1 Language Code to specify the language.order_promised_delivery_datestring
The promised delivery date of the order. It uses the format YYYY-MM-DD. This has no timezone and uses whatever date you provide. Since other EDDs use the shipment recipient’s timezone, we suggest following the same logic here.
Returns
Returns the tracking object if the update succeeded.
curl --request PUT \
--url https://api.aftership.com/tracking/2024-04/trackings/id \
--header 'Content-Type: application/json'\
--data '{"value":{"tracking":{"note":"some notes","title":"New Title"}}}'const url = 'https://api.aftership.com/tracking/2024-04/trackings/id';
const options = {
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
body: "{\"value\":{\"tracking\":{\"note\":\"some notes\",\"title\":\"New Title\"}}}"
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/tracking/2024-04/trackings/id"
payload := strings.NewReader("{\"value\":{\"tracking\":{\"note\":\"some notes\",\"title\":\"New Title\"}}}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/tracking/2024-04/trackings/id"))
.method("PUT", HttpRequest.BodyPublishers.ofString("{\"value\":{\"tracking\":{\"note\":\"some notes\",\"title\":\"New Title\"}}}"))
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.put('https://api.aftership.com/tracking/2024-04/trackings/id', headers=headers, json={"value":{"tracking":{"note":"some notes","title":"New Title"}}}){
"value": {
"meta": {
"code": 200
},
"data": {
"tracking": {
"id": "5b7658cec7c33c0e007de3c5",
"ios": [],
"tag": "Delivered",
"slug": "dpd-sk",
"note": null,
"smses": [],
"title": "Title Name",
"active": false,
"emails": [],
"source": "api",
"subtag": "Delivered_001",
"android": [],
"order_id": null,
"language": null,
"signed_by": "..KOSUTOKO",
"created_at": "2018-08-17T05:10:38+00:00",
"updated_at": "2018-08-17T05:10:46+00:00",
"order_tags": [],
"checkpoints": [
{
"slug": "dpd-sk",
"city": null,
"created_at": "2018-08-17T05:10:41+00:00",
"location": null,
"country_name": null,
"message": "Shipment information sent to DPD Slovakia",
"country_iso3": null,
"tag": "InfoReceived",
"subtag": "InfoReceived_001",
"subtag_message": "Info Received",
"checkpoint_time": "2018-07-23T01:21:39-05:00",
"coordinates": [],
"state": null,
"zip": null,
"raw_tag": "FPX_L_RPIF"
}
],
"pickup_note": null,
"unique_token": "deprecated",
"tracking_key": null,
"custom_fields": null,
"customer_name": null,
"delivery_time": 2,
"order_id_path": null,
"shipment_type": "{shipment_type}",
"tracked_count": 1,
"delivery_type": "pickup_at_store",
"subtag_message": "Delivered",
"tracking_state": null,
"on_time_status": "trending-on-time",
"last_updated_at": "2018-08-17T05:10:46+00:00",
"tracking_number": "111111111111",
"shipment_weight": 4,
"pickup_location": "Flagship Store",
"subscribed_smses": [],
"return_to_sender": false,
"expected_delivery": null,
"subscribed_emails": [],
"tracking_ship_date": null,
"first_attempted_at": "2018-07-25T10:10:00+09:00",
"on_time_difference": 0,
"origin_country_iso3": "CHN",
"shipment_pickup_date": "2018-07-23T08:58:00",
"shipment_weight_unit": "kg",
"tracking_postal_code": null,
"courier_tracking_link": "{courier_tracking_link}",
"courier_redirect_link": "{courier_redirect_link}",
"shipment_package_count": 1,
"shipment_delivery_date": "2018-07-25T01:10:00",
"tracking_account_number": null,
"tracking_origin_country": null,
"destination_country_iso3": "JPN",
"last_mile_tracking_supported": null,
"tracking_destination_country": null,
"order_promised_delivery_date": "2019-05-02",
"courier_destination_country_iso3": "JPN",
"aftership_estimated_delivery_date": {
"confidence_score": null,
"estimated_delivery_date": "2022-01-03",
"estimated_delivery_date_min": "2022-01-01",
"estimated_delivery_date_max": "2022-01-06"
}
}
}
}
}Delete a tracking
Delete a tracking.
Parameters
idstring required
Tracking ID
Returns
Returns a deleted object on success. Otherwise, this call raises an error.
curl --request DELETE \
--url https://api.aftership.com/tracking/2024-04/trackings/id \
--header 'Content-Type: application/json'const url = 'https://api.aftership.com/tracking/2024-04/trackings/id';
const options = {
method: 'DELETE',
headers: {
'Content-Type': 'application/json'
},
body: undefined
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/tracking/2024-04/trackings/id"
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/tracking/2024-04/trackings/id"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.delete('https://api.aftership.com/tracking/2024-04/trackings/id', headers=headers){
"value": {
"meta": {
"code": 200
},
"data": {
"tracking": {
"id": "5b7658cec7c33c0e007de3c5",
"slug": "dpd-sk",
"tracking_key": null,
"tracking_state": null,
"tracking_number": "772857780801111",
"tracking_ship_date": null,
"tracking_postal_code": null,
"tracking_account_number": null,
"tracking_origin_country": null,
"tracking_destination_country": null
}
}
}
}Retrack an expired tracking
Retrack an expired tracking. Max 3 times per tracking.
Parameters
idstring, required
Tracking ID
Returns
Returns the tracking object if the retrack succeeded.
curl --request POST \
--url https://api.aftership.com/tracking/2024-04/trackings/id/retrack \
--header 'Content-Type: application/json'const url = 'https://api.aftership.com/tracking/2024-04/trackings/id/retrack';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: undefined
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/tracking/2024-04/trackings/id/retrack"
req, _ := http.NewRequest("POST", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/tracking/2024-04/trackings/id/retrack"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.post('https://api.aftership.com/tracking/2024-04/trackings/id/retrack', headers=headers){
"meta": {
"code": 200,
"type": "BadRequest",
"message": "string"
},
"data": {
"tracking": {
"id": "string",
"slug": "string",
"active": true,
"tracking_key": "string",
"tracking_state": "string",
"tracking_number": "string",
"tracking_ship_date": "string",
"tracking_postal_code": "string",
"tracking_account_number": "string",
"tracking_origin_country": "string",
"tracking_destination_country": "string"
}
}
}Mark tracking as completed
Mark a tracking as completed. The tracking won't auto update until retrack it.
Parameters
reason string required
required
One of DELIVERED, LOST or RETURNED_TO_SENDER.
- Mark the tracking as completed with
DELIVERED. The tag of the tracking will be updated to Delivered and the subtag will be updated toDelivered_001. - Mark the tracking as completed with
LOST. The tag of the tracking will be updated toExceptionand the subtag will be updated toException_013. - Mark the tracking as completed with
RETURNED_TO_SENDER. The tag of the tracking will be updated to Exception and the subtag will be updated toException_011.
Allowed values: DELIVERED LOST RETURNED_TO_SENDER
Returns
meta meta required
Meta data
codeinteger required
meta code
Example:200messagestring
error message, only exist if the response status is not 2xxtypestring
error type, only exist if the response status is not 2xx
Allowed values:BadRequestUnauthorizedForbiddenNotFoundTooManyRequestsInternalErrordataobject requiredtrackingTracking
Object describes the tracking information.
curl --request POST \
--url https://api.aftership.com/tracking/2024-04/trackings/id/mark-as-completed \
--header 'Content-Type: application/json'\
--data '{"reason":{"type":"string","enum":["DELIVERED","LOST","RETURNED_TO_SENDER"],"description":"One of `DELIVERED`, `LOST` or `RETURNED_TO_SENDER`.\n\n- Mark the tracking as completed with `DELIVERED`. The tag of the tracking will be updated to `Delivered` and the subtag will be updated to `Delivered_001`.\n- Mark the tracking as completed with `LOST`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_013`.\n- Mark the tracking as completed with `RETURNED_TO_SENDER`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_011`."}}'const url = 'https://api.aftership.com/tracking/2024-04/trackings/id/mark-as-completed';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: "{\"reason\":{\"type\":\"string\",\"enum\":[\"DELIVERED\",\"LOST\",\"RETURNED_TO_SENDER\"],\"description\":\"One of `DELIVERED`, `LOST` or `RETURNED_TO_SENDER`.\\n\\n- Mark the tracking as completed with `DELIVERED`. The tag of the tracking will be updated to `Delivered` and the subtag will be updated to `Delivered_001`.\\n- Mark the tracking as completed with `LOST`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_013`.\\n- Mark the tracking as completed with `RETURNED_TO_SENDER`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_011`.\"}}"
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/tracking/2024-04/trackings/id/mark-as-completed"
payload := strings.NewReader("{\"reason\":{\"type\":\"string\",\"enum\":[\"DELIVERED\",\"LOST\",\"RETURNED_TO_SENDER\"],\"description\":\"One of `DELIVERED`, `LOST` or `RETURNED_TO_SENDER`.\\n\\n- Mark the tracking as completed with `DELIVERED`. The tag of the tracking will be updated to `Delivered` and the subtag will be updated to `Delivered_001`.\\n- Mark the tracking as completed with `LOST`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_013`.\\n- Mark the tracking as completed with `RETURNED_TO_SENDER`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_011`.\"}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/tracking/2024-04/trackings/id/mark-as-completed"))
.method("POST", HttpRequest.BodyPublishers.ofString("{\"reason\":{\"type\":\"string\",\"enum\":[\"DELIVERED\",\"LOST\",\"RETURNED_TO_SENDER\"],\"description\":\"One of `DELIVERED`, `LOST` or `RETURNED_TO_SENDER`.\\n\\n- Mark the tracking as completed with `DELIVERED`. The tag of the tracking will be updated to `Delivered` and the subtag will be updated to `Delivered_001`.\\n- Mark the tracking as completed with `LOST`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_013`.\\n- Mark the tracking as completed with `RETURNED_TO_SENDER`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_011`.\"}}"))
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.post('https://api.aftership.com/tracking/2024-04/trackings/id/mark-as-completed', headers=headers, json={"reason":{"type":"string","enum":["DELIVERED","LOST","RETURNED_TO_SENDER"],"description":"One of `DELIVERED`, `LOST` or `RETURNED_TO_SENDER`.\n\n- Mark the tracking as completed with `DELIVERED`. The tag of the tracking will be updated to `Delivered` and the subtag will be updated to `Delivered_001`.\n- Mark the tracking as completed with `LOST`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_013`.\n- Mark the tracking as completed with `RETURNED_TO_SENDER`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_011`."}}){
"meta": {
"code": 200,
"type": "BadRequest",
"message": "string"
},
"data": {
"tracking": {
"id": "my2uktymyz72xld1f7l3h01z",
"tag": "Delivered",
"slug": "dpd-sk",
"note": "note",
"smses": [
"+8613800138000"
],
"title": "61293150000079650811",
"active": false,
"emails": [
"[email protected]"
],
"source": "api",
"subtag": "Delivered_002",
"order_id": "6845a095a27a4caeb27487806f058add",
"language": "en",
"signed_by": "Steve Young",
"created_at": "2023-01-18T08:47:10+00:00",
"updated_at": "2023-01-18T17:47:10+00:00",
"order_date": "2022-01-20T15:56:12+08:00",
"order_tags": [
"Exception"
],
"origin_city": "Beijing",
"checkpoints": [
{
"created_at": "2023-01-18T08:47:10+00:00",
"slug": "dpd-sk",
"checkpoint_time": "2022-01-01T18:47:10-05:00",
"location": "13th Street, New York, NY 10011, USA, United States",
"city": "New York",
"state": "NY",
"zip": "10011",
"coordinate": null,
"country_iso3": "USA",
"country_name": "United States",
"message": "Package delivered",
"tag": "Delivered",
"subtag": "Delivered_002",
"subtag_message": "Picked up by customer",
"raw_tag": "RO",
"events": {
"code": "unable_to_deliver",
"reason": {
"code": "incorrect_missing_address"
}
}
}
],
"pickup_note": "No notes",
"location_id": "bda843ed811541fc852a8447371cf6f2",
"transit_time": 9,
"origin_state": "Beijing",
"unique_token": "Deprecated",
"tracking_key": null,
"order_number": "162654659775",
"custom_fields": {
"store_name": "my-store"
},
"customer_name": "Steve Young",
"order_id_path": "https://www.aftership.com/my-orders/6845a095a27a4caeb27487806f058add",
"shipment_type": "{shipment_type}",
"tracked_count": 13,
"delivery_type": "pickup_at_store",
"shipment_tags": [
"Returned"
],
"next_couriers": [
{
"slug": "dpd-sk",
"tracking_number": "61293150000079650811",
"source": "system"
}
],
"subtag_message": "Picked up by customer",
"on_time_status": "on-time",
"tracking_state": "CA",
"last_updated_at": "2023-01-18T17:47:10+00:00",
"tracking_number": "61293150000079650811",
"shipment_weight": 0.7,
"pickup_location": "13th Street, New York, NY 10011, USA, United States",
"shipping_method": "Local Delivery",
"destination_city": "New York City",
"subscribed_smses": [
"string"
],
"return_to_sender": false,
"carbon_emissions": {
"unit": "kg",
"value": 0.7
},
"destination_state": "New York",
"expected_delivery": "2022-01-05T12:11:11+01:00",
"subscribed_emails": [
"string"
],
"origin_postal_code": "065001",
"first_attempted_at": "2022-01-01T17:00:00-05:00",
"tracking_ship_date": "20220101",
"on_time_difference": 0,
"origin_country_iso3": "CHN",
"origin_raw_location": "Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China",
"shipment_pickup_date": "2022-01-21T15:00:00",
"shipment_weight_unit": "kg",
"tracking_postal_code": "90213",
"courier_tracking_link": "{courier_tracking_link}",
"courier_redirect_link": "{courier_redirect_link}",
"courier_connection_id": "8e1261bde336436abbc7cb3eee8cd707",
"signature_requirement": "signature_required",
"shipment_package_count": 1,
"shipment_delivery_date": "2022-01-29T11:23:00",
"destination_postal_code": "10001",
"tracking_account_number": null,
"tracking_origin_country": "CHN",
"destination_country_iso3": "USA",
"destination_raw_location": "13th Street, New York, NY, 10011, USA, United States",
"first_estimated_delivery": {
"type": "specific",
"source": "Carrier EDD",
"datetime": "2022-01-05T12:11:11+01:00",
"datetime_min": null,
"datetime_max": null
},
"failed_delivery_attempts": 2,
"latest_estimated_delivery": {
"type": "specific",
"source": "AfterShip EDD",
"datetime": "2022-01-05T12:11:11+01:00",
"datetime_min": null,
"datetime_max": null
},
"last_mile_tracking_supported": true,
"order_promised_delivery_date": "2022-01-01",
"tracking_destination_country": "USA",
"custom_estimated_delivery_date": {
"type": "specific",
"datetime": "2022-01-05",
"datetime_min": null,
"datetime_max": null
},
"courier_destination_country_iso3": "USA",
"aftership_estimated_delivery_date": {
"confidence_code": 10001,
"estimated_delivery_date": "2022-01-03",
"estimated_delivery_date_min": "2022-01-02",
"estimated_delivery_date_max": "2022-01-04"
}
}
}
}DPD Slovakia Last Checkpoint API
Get last checkpoint
Return the tracking information of the last checkpoint of a single tracking.
Parameters
fieldsstring
List of fields to include in the response. Use comma for multiple values. Fields to include:slug,created_at,checkpoint_time,city,coordinates,country_iso3,country_name,message,state,tag,zip
Example:city,taglangstring
Support Chinese to English translation forchina-emsandchina-postonly
Example:en
Returns
metametacodeinteger required
meta code
Example: 200messagestring
error message, only exist if the response status is not 2xxtypestring
error type, only exist if the response status is not 2xx
Allowed values:BadRequestUnauthorizedForbiddenNotFoundTooManyRequestsInternalError
dataobjectidstring
Tracking idtracking_numberstring
Tracking number.slugstring dpd-sk
Unique code of courier.tagstring
Current status of tracking. (See tag definition)
Allowed values:PendingInfoReceivedInTransitOutForDeliveryAttemptFailDeliveredAvailableForPickupExceptionExpired
Example:Deliveredsubtagstring
Current subtag of tracking. ([See subtag definition]subtag_messagestring
Normalized tracking message. (See subtag message definition)checkpointCheckpoint
Object describes checkpoint information.
curl --request GET \
--url https://api.aftership.com/tracking/2024-04/last_checkpoint/tracking_id \
--header 'Content-Type: application/json'const url = 'https://api.aftership.com/tracking/2024-04/last_checkpoint/tracking_id';
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
body: undefined
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/tracking/2024-04/last_checkpoint/tracking_id"
req, _ := http.NewRequest("GET", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/tracking/2024-04/last_checkpoint/tracking_id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.get('https://api.aftership.com/tracking/2024-04/last_checkpoint/tracking_id', headers=headers){
"value": {
"meta": {
"code": 200
},
"data": {
"id": "5b74f4958776db0e00b6f5ed",
"tag": "Delivered",
"slug": "dpd-sk",
"subtag": "Delivered_001",
"checkpoint": {
"tag": "Delivered",
"zip": null,
"slug": "dpd-sk",
"city": "Deal",
"state": "NJ",
"subtag": "Delivered_001",
"message": "Delivered - Left at front door. Signature Service not requested.",
"raw_tag": "FPX_L_RPIF",
"created_at": "2018-08-16T03:50:47+00:00",
"coordinates": [],
"country_iso3": null,
"country_name": null,
"subtag_message": "Delivered",
"checkpoint_time": "2018-08-01T13:19:47-04:00"
},
"subtag_message": "Delivered",
"tracking_number": "111111111111"
}
}
}DPD Slovakia Estimated delivery date API
Batch predict the estimated delivery date
The estimated delivery date is provided by AfterShip, based on its AI-predictive model. You can display the EDD on the product page, cart, and order checkout page. It indicates when a customer will receive the order.
You can use AfterShip’s AI-powered predictive estimated delivery date API to provide expected delivery dates to shoppers for online orders without tracking numbers. You can get the earliest date, the latest date, and the most-likely-arrival date through our AI-predictive EDD API.
Display accurate estimated delivery dates on the product page, store cart, and order checkout page to encourage customers to check out faster and give them a better customer experience.
Contact sales to activate this feature.
Supported functionalities require:
- One
EstimatedDeliveryDateobject for one prediction result. - Maximum 5
EstimatedDeliveryDateobjects are allowed. - API call will fail if any of the requests
EstimatedDeliveryDateobjects do not meet the specification requirement.
Parameters
estimated_delivery_datesarray[EstimatedDeliveryDate] required>= 1 items<= 5 itemsslugstringdpd-skrequired
AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download.service_type_namestring or null
AfterShip’s unique code represents carrier’s shipping and delivery options. Refer to Download Link.origin_addressobjectrequired
The location from where the package is picked up by the carrier to be delivered to the final destination.destination_addressobjectrequired
The final destination of the customer where the delivery will be made.weightobject or null
AfterShip uses this object to calculate the total weight of the order.package_countinteger or null
The number of packages.pickup_timestring or null
The local pickup time in the origin address time zone of the package.estimated_pickupobject or null
The local pickup time of the package. Eitherpickup_timeorestimated_pickupis required.
Returns
metameta requiredcodeinteger required
meta codemessagestring
error message, only exist if the response status is not 2xxtypestring
error type, only exist if the response status is not 2xx
Allowed values:BadRequestUnauthorizedForbiddenNotFoundTooManyRequestsInternalError
- data object required
estimated_delivery_datesarray[EstimatedDeliveryDate] required
curl --request POST \
--url https://api.aftership.com/tracking/2024-04/estimated-delivery-date/predict-batch \
--header 'Content-Type: application/json'\
--data '{"estimated_delivery_dates":[{"slug":"dpd-sk","service_type_name":"{service_type_name}","origin_address":{"country":"USA","state":"WA","city":"Seattle","postal_code":"98108","raw_location":"Seattle, Washington, 98108, USA, United States"},"destination_address":{"country":"USA","state":"CA","postal_code":"92019","raw_location":"El Cajon, California, 92019, USA, United States"},"weight":{"unit":"kg","value":1},"package_count":1,"pickup_time":"2021-07-01 15:00:00"},{"slug":"dpd-sk","service_type_name":"{service_type_name}","origin_address":{"country":"USA","state":"WA","postal_code":"98108","raw_location":"Seattle, Washington, 98108, USA, United States"},"destination_address":{"country":"USA","state":"California","postal_code":"92019","raw_location":"El Cajon, California, 92019, USA, United States"},"weight":null,"package_count":null,"estimated_pickup":{"order_time":"2021-07-01 15:04:05","order_cutoff_time":"20:00:00","business_days":[1,2,3,4,5,6,7],"order_processing_time":{"unit":"day","value":0}}}]}'const url = 'https://api.aftership.com/tracking/2024-04/estimated-delivery-date/predict-batch';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: "{\"estimated_delivery_dates\":[{\"slug\":\"dpd-sk\",\"service_type_name\":\"{service_type_name}\",\"origin_address\":{\"country\":\"USA\",\"state\":\"WA\",\"city\":\"Seattle\",\"postal_code\":\"98108\",\"raw_location\":\"Seattle, Washington, 98108, USA, United States\"},\"destination_address\":{\"country\":\"USA\",\"state\":\"CA\",\"postal_code\":\"92019\",\"raw_location\":\"El Cajon, California, 92019, USA, United States\"},\"weight\":{\"unit\":\"kg\",\"value\":1},\"package_count\":1,\"pickup_time\":\"2021-07-01 15:00:00\"},{\"slug\":\"dpd-sk\",\"service_type_name\":\"{service_type_name}\",\"origin_address\":{\"country\":\"USA\",\"state\":\"WA\",\"postal_code\":\"98108\",\"raw_location\":\"Seattle, Washington, 98108, USA, United States\"},\"destination_address\":{\"country\":\"USA\",\"state\":\"California\",\"postal_code\":\"92019\",\"raw_location\":\"El Cajon, California, 92019, USA, United States\"},\"weight\":null,\"package_count\":null,\"estimated_pickup\":{\"order_time\":\"2021-07-01 15:04:05\",\"order_cutoff_time\":\"20:00:00\",\"business_days\":[1,2,3,4,5,6,7],\"order_processing_time\":{\"unit\":\"day\",\"value\":0}}}]}"
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/tracking/2024-04/estimated-delivery-date/predict-batch"
payload := strings.NewReader("{\"estimated_delivery_dates\":[{\"slug\":\"dpd-sk\",\"service_type_name\":\"{service_type_name}\",\"origin_address\":{\"country\":\"USA\",\"state\":\"WA\",\"city\":\"Seattle\",\"postal_code\":\"98108\",\"raw_location\":\"Seattle, Washington, 98108, USA, United States\"},\"destination_address\":{\"country\":\"USA\",\"state\":\"CA\",\"postal_code\":\"92019\",\"raw_location\":\"El Cajon, California, 92019, USA, United States\"},\"weight\":{\"unit\":\"kg\",\"value\":1},\"package_count\":1,\"pickup_time\":\"2021-07-01 15:00:00\"},{\"slug\":\"dpd-sk\",\"service_type_name\":\"{service_type_name}\",\"origin_address\":{\"country\":\"USA\",\"state\":\"WA\",\"postal_code\":\"98108\",\"raw_location\":\"Seattle, Washington, 98108, USA, United States\"},\"destination_address\":{\"country\":\"USA\",\"state\":\"California\",\"postal_code\":\"92019\",\"raw_location\":\"El Cajon, California, 92019, USA, United States\"},\"weight\":null,\"package_count\":null,\"estimated_pickup\":{\"order_time\":\"2021-07-01 15:04:05\",\"order_cutoff_time\":\"20:00:00\",\"business_days\":[1,2,3,4,5,6,7],\"order_processing_time\":{\"unit\":\"day\",\"value\":0}}}]}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/tracking/2024-04/estimated-delivery-date/predict-batch"))
.method("POST", HttpRequest.BodyPublishers.ofString("{\"estimated_delivery_dates\":[{\"slug\":\"dpd-sk\",\"service_type_name\":\"{service_type_name}\",\"origin_address\":{\"country\":\"USA\",\"state\":\"WA\",\"city\":\"Seattle\",\"postal_code\":\"98108\",\"raw_location\":\"Seattle, Washington, 98108, USA, United States\"},\"destination_address\":{\"country\":\"USA\",\"state\":\"CA\",\"postal_code\":\"92019\",\"raw_location\":\"El Cajon, California, 92019, USA, United States\"},\"weight\":{\"unit\":\"kg\",\"value\":1},\"package_count\":1,\"pickup_time\":\"2021-07-01 15:00:00\"},{\"slug\":\"dpd-sk\",\"service_type_name\":\"{service_type_name}\",\"origin_address\":{\"country\":\"USA\",\"state\":\"WA\",\"postal_code\":\"98108\",\"raw_location\":\"Seattle, Washington, 98108, USA, United States\"},\"destination_address\":{\"country\":\"USA\",\"state\":\"California\",\"postal_code\":\"92019\",\"raw_location\":\"El Cajon, California, 92019, USA, United States\"},\"weight\":null,\"package_count\":null,\"estimated_pickup\":{\"order_time\":\"2021-07-01 15:04:05\",\"order_cutoff_time\":\"20:00:00\",\"business_days\":[1,2,3,4,5,6,7],\"order_processing_time\":{\"unit\":\"day\",\"value\":0}}}]}"))
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.post('https://api.aftership.com/tracking/2024-04/estimated-delivery-date/predict-batch', headers=headers, json={"estimated_delivery_dates":[{"slug":"dpd-sk","service_type_name":"{service_type_name}","origin_address":{"country":"USA","state":"WA","city":"Seattle","postal_code":"98108","raw_location":"Seattle, Washington, 98108, USA, United States"},"destination_address":{"country":"USA","state":"CA","postal_code":"92019","raw_location":"El Cajon, California, 92019, USA, United States"},"weight":{"unit":"kg","value":1},"package_count":1,"pickup_time":"2021-07-01 15:00:00"},{"slug":"dpd-sk","service_type_name":"{service_type_name}","origin_address":{"country":"USA","state":"WA","postal_code":"98108","raw_location":"Seattle, Washington, 98108, USA, United States"},"destination_address":{"country":"USA","state":"California","postal_code":"92019","raw_location":"El Cajon, California, 92019, USA, United States"},"weight":null,"package_count":null,"estimated_pickup":{"order_time":"2021-07-01 15:04:05","order_cutoff_time":"20:00:00","business_days":[1,2,3,4,5,6,7],"order_processing_time":{"unit":"day","value":0}}}]}){
"meta": {
"code": 200
},
"data": {
"estimated_delivery_dates": [
{
"slug": "dpd-sk",
"service_type_name": "{service_type_name}",
"origin_address": {
"country": "USA",
"state": "WA",
"postal_code": "98108",
"raw_location": "Seattle, Washington, 98108, USA, United States",
"city": null
},
"destination_address": {
"country": "USA",
"state": "CA",
"postal_code": "92019",
"raw_location": "El Cajon, California, 92019, USA, United States",
"city": null
},
"weight": {
"unit": "kg",
"value": 1
},
"package_count": 1,
"pickup_time": "2021-07-01 15:00:00",
"estimated_pickup": null,
"estimated_delivery_date": "2021-07-04",
"estimated_delivery_date_min": "2021-07-03",
"estimated_delivery_date_max": "2021-07-04"
},
{
"slug": "dpd-sk",
"service_type_name": "{service_type_name}",
"origin_address": {
"country": "USA",
"state": "WA",
"postal_code": "98108",
"raw_location": "Seattle, Washington, 98108, USA, United States",
"city": null
},
"destination_address": {
"country": "USA",
"state": "CA",
"postal_code": "92019",
"raw_location": "El Cajon, California, 92019, USA, United States",
"city": null
},
"weight": null,
"package_count": null,
"pickup_time": null,
"estimated_pickup": {
"order_time": "2021-07-01 15:04:05",
"order_cutoff_time": "20:00:00",
"business_days": [
1,
2,
3,
4,
5,
6,
7
],
"order_processing_time": {
"unit": "day",
"value": 0
},
"pickup_time": "2021-07-01 20:00:00"
},
"estimated_delivery_date": "2021-07-03",
"estimated_delivery_date_min": "2021-07-02",
"estimated_delivery_date_max": "2021-07-04"
}
]
}
}DPD Slovakia Rate API
We currently do not support this API. If you are interested in this API, please request for an integration .
DPD Slovakia Label API
We currently do not support this API. If you are interested in this API, please request for an integration .
DPD Slovakia Manifest API
We currently do not support this API. If you are interested in this API, please request for an integration .
DPD Slovakia Cancel Label API
We currently do not support this API. If you are interested in this API, please request for an integration .
DPD Slovakia Pickup API
We currently do not support this API. If you are interested in this API, please request for an integration .
DPD Slovakia Cancel Pickup API
We currently do not support this API. If you are interested in this API, please request for an integration .
DPD Slovakia Shipper Account API
Create a shipper account
This endpoint allows you to create your shipper account via API. You can integrate our API with your system and manage the shipper account according to your needs.
Please ensure that your account credentials are correct. Different carriers have different requirements for account credentials, you can refer to Shipper account's credetials for more details.
Parameters
slugstringdpd-skdescriptionstringtimezonestringcredentialsobject
Please refer to Shipper account's credetialsaddressAddress
Address object: the description of address informationstreet1string required
address_line1 of addresscountrystring required
Country in ISO 3166-1 alpha 3 codecontact_namestring required
contact_name of address
Returns
metaMeta
Meta data object.codeinteger required
Code of Metamessagestring required
Message of Metadetailsarray[Error]
Details of Metaretryableboolean
Whether this request will be retryable or not
dataShipperAccount
ShipperAccount object: the description of shipper account informationidstring
Shipper Account IDaddressAddress
Address object: the description of address information
curl --request POST \
--url https://api.aftership.com/postmen/v3/shipper-accounts \
--header 'Content-Type: application/json'\
--data '{"slug":"dhl","address":{"city":"Salt Lake City","state":"UT","phone":"123456789","email":"[email protected]","street1":"230 W 200 S LBBY","country":"USA","postal_code":"84101","contact_name":"AfterShip Shipping","company_name":"AfterShip Shipping"},"timezone":"Asia/Hong_Kong","description":"My Shipper Account","credentials":{"site_id":"******","password":"******","account_number":"******"}}'const url = 'https://api.aftership.com/postmen/v3/shipper-accounts';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: "{\"slug\":\"dhl\",\"address\":{\"city\":\"Salt Lake City\",\"state\":\"UT\",\"phone\":\"123456789\",\"email\":\"[email protected]\",\"street1\":\"230 W 200 S LBBY\",\"country\":\"USA\",\"postal_code\":\"84101\",\"contact_name\":\"AfterShip Shipping\",\"company_name\":\"AfterShip Shipping\"},\"timezone\":\"Asia/Hong_Kong\",\"description\":\"My Shipper Account\",\"credentials\":{\"site_id\":\"******\",\"password\":\"******\",\"account_number\":\"******\"}}"
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/postmen/v3/shipper-accounts"
payload := strings.NewReader("{\"slug\":\"dhl\",\"address\":{\"city\":\"Salt Lake City\",\"state\":\"UT\",\"phone\":\"123456789\",\"email\":\"[email protected]\",\"street1\":\"230 W 200 S LBBY\",\"country\":\"USA\",\"postal_code\":\"84101\",\"contact_name\":\"AfterShip Shipping\",\"company_name\":\"AfterShip Shipping\"},\"timezone\":\"Asia/Hong_Kong\",\"description\":\"My Shipper Account\",\"credentials\":{\"site_id\":\"******\",\"password\":\"******\",\"account_number\":\"******\"}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/postmen/v3/shipper-accounts"))
.method("POST", HttpRequest.BodyPublishers.ofString("{\"slug\":\"dhl\",\"address\":{\"city\":\"Salt Lake City\",\"state\":\"UT\",\"phone\":\"123456789\",\"email\":\"[email protected]\",\"street1\":\"230 W 200 S LBBY\",\"country\":\"USA\",\"postal_code\":\"84101\",\"contact_name\":\"AfterShip Shipping\",\"company_name\":\"AfterShip Shipping\"},\"timezone\":\"Asia/Hong_Kong\",\"description\":\"My Shipper Account\",\"credentials\":{\"site_id\":\"******\",\"password\":\"******\",\"account_number\":\"******\"}}"))
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.post('https://api.aftership.com/postmen/v3/shipper-accounts', headers=headers, json={"slug":"dhl","address":{"city":"Salt Lake City","state":"UT","phone":"123456789","email":"[email protected]","street1":"230 W 200 S LBBY","country":"USA","postal_code":"84101","contact_name":"AfterShip Shipping","company_name":"AfterShip Shipping"},"timezone":"Asia/Hong_Kong","description":"My Shipper Account","credentials":{"site_id":"******","password":"******","account_number":"******"}}){
"meta": {
"code": 200,
"message": "OK",
"details": []
},
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"slug": "dpd-sk",
"type": "default",
"status": "enabled",
"address": {
"fax": "+1 206-654-3100",
"city": "Lai Chi Kok",
"type": "business",
"phone": "11111111",
"email": "[email protected]",
"state": null,
"tax_id": null,
"country": "HKG",
"street1": "Workshop A, 10/F, Wah Shing Industrial Building",
"street2": "18 Cheung Shun Street, Lai Chi Kok",
"street3": null,
"postal_code": null,
"contact_name": "Sir Foo",
"company_name": "Foo Store"
},
"timezone": "Asia/Hong_Kong",
"created_at": "2016-02-12T10:30:50+00:00",
"updated_at": "2016-09-23T04:56:26+00:00",
"description": "My Shipper Account"
}
}Get a shipper account
This endpoint allows you get a specific shipper account details by shipper account id.
Parameters
idstring required
Shipper account id
Returns
metaMeta
Meta data object.codeinteger required
Code of Metamessagestring required
Message of Metadetailsarray[Error]
Details of Metaretryableboolean
Whether this request will be retryable or not
dataShipperAccount
ShipperAccount object: the description of shipper account informationidstring
Shipper Account IDaddressAddress
Address object: the description of address information
curl --request GET \
--url https://api.aftership.com/postmen/v3/shipper-accounts/id \
--header 'Content-Type: application/json'const url = 'https://api.aftership.com/postmen/v3/shipper-accounts/id';
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
body: undefined
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/postmen/v3/shipper-accounts/id"
req, _ := http.NewRequest("GET", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/postmen/v3/shipper-accounts/id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.get('https://api.aftership.com/postmen/v3/shipper-accounts/id', headers=headers){
"meta": {
"code": 200,
"type": "OK",
"message": "Everything worked as expected."
},
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"slug": "dpd-sk",
"type": "default",
"status": "enabled",
"address": {
"fax": "+1 206-654-3100",
"city": "Lai Chi Kok",
"type": "business",
"phone": "11111111",
"email": "[email protected]",
"state": null,
"tax_id": null,
"country": "HKG",
"street1": "Workshop A, 10/F, Wah Shing Industrial Building",
"street2": "18 Cheung Shun Street, Lai Chi Kok",
"street3": null,
"postal_code": null,
"contact_name": "Sir Foo",
"company_name": "Foo Store"
},
"timezone": "Asia/Hong_Kong",
"created_at": "2016-02-12T10:30:50+00:00",
"updated_at": "2016-09-23T04:56:26+00:00",
"description": "My Shipper Account"
}
}DPD Slovakia Address Validation (Beta) API
Create an address validation
Create an address validation
Parameters
addressAddress
Address object: the description of address informationstreet1string required
address_line1 of addresscountrystring required
Country in ISO 3166-1 alpha 3 codecontact\_namestring required
contact_name of address
Returns
metaMeta
Meta data object.codeinteger required
Code of Metamessagestring required
Message of Metadetailsarray[Error]
Details of Metaretryableboolean
Whether this request will be retryable or not
dataShipperAccount
ShipperAccount object: the description of shipper account informationidstring
Shipper Account IDaddressAddress
Address object: the description of address information
curl --request POST \
--url https://api.aftership.com/postmen/v3/address-validations \
--header 'Content-Type: application/json'\
--data '{"address":{"city":"Salt Lake City","state":"UT","phone":"123456789","email":"[email protected]","street1":"230 W 200 S LBBY","country":"USA","postal_code":"84101","contact_name":"AfterShip Shipping","company_name":"AfterShip Shipping"}}'const url = 'https://api.aftership.com/postmen/v3/address-validations';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: "{\"address\":{\"city\":\"Salt Lake City\",\"state\":\"UT\",\"phone\":\"123456789\",\"email\":\"[email protected]\",\"street1\":\"230 W 200 S LBBY\",\"country\":\"USA\",\"postal_code\":\"84101\",\"contact_name\":\"AfterShip Shipping\",\"company_name\":\"AfterShip Shipping\"}}"
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aftership.com/postmen/v3/address-validations"
payload := strings.NewReader("{\"address\":{\"city\":\"Salt Lake City\",\"state\":\"UT\",\"phone\":\"123456789\",\"email\":\"[email protected]\",\"street1\":\"230 W 200 S LBBY\",\"country\":\"USA\",\"postal_code\":\"84101\",\"contact_name\":\"AfterShip Shipping\",\"company_name\":\"AfterShip Shipping\"}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.aftership.com/postmen/v3/address-validations"))
.method("POST", HttpRequest.BodyPublishers.ofString("{\"address\":{\"city\":\"Salt Lake City\",\"state\":\"UT\",\"phone\":\"123456789\",\"email\":\"[email protected]\",\"street1\":\"230 W 200 S LBBY\",\"country\":\"USA\",\"postal_code\":\"84101\",\"contact_name\":\"AfterShip Shipping\",\"company_name\":\"AfterShip Shipping\"}}"))
.header("Content-Type", "application/json")
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());import requests
headers = {
'Content-Type': 'application/json',
}
response = requests.post('https://api.aftership.com/postmen/v3/address-validations', headers=headers, json={"address":{"city":"Salt Lake City","state":"UT","phone":"123456789","email":"[email protected]","street1":"230 W 200 S LBBY","country":"USA","postal_code":"84101","contact_name":"AfterShip Shipping","company_name":"AfterShip Shipping"}}){
"meta": {
"code": 200,
"type": "OK",
"message": "Everything worked as expected."
},
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"status": "valid",
"address": {
"city": "New York",
"type": "residential",
"state": "New York",
"phone": "1-123-456-5496",
"email": "[email protected]",
"street1": "This is the first streeet",
"street2": "This is the second streeet",
"country": "USA",
"postal_code": "10001",
"contact_name": "AfterShip Shipping"
},
"created_at": "2022-02-11T08:10:47+00:00",
"updated_at": "2022-02-11T08:10:47+00:00",
"recommended_address": {
"city": "New York",
"type": "residential",
"state": "New York",
"phone": "1-123-456-5496",
"email": "[email protected]",
"street1": "This is the first streeet",
"street2": "This is the second streeet",
"country": "USA",
"postal_code": "10001",
"contact_name": "AfterShip Shipping"
}
}
}