1. Overview
The ParcelPanel for WooCommerce Tracking API (referred to as API) is an interface that allows you to create, retrieve, and delete shipment tracking information in orders.
2. Get the API key
ParcelPanel verifies a user's request by adding a PP-Api-Key
in the header. To obtain your API key, follow these steps:
Step 1: Go to the ParcelPanel Integration page.
Step 2: Navigate to the API Keys section.
3. Basic Information
For a list of supported carriers by ParcelPanel, please visit this link or retrieve it through the [Get couriers list] API.
4. Request
All requests and responses use JSON strings.
5. Protocol
All requests to the API can be sent over HTTP or HTTPS.
API Endpoint
https://wp-api.parcelpanel.com/api/v1/tracking
Request Headers
All requests must include the following header:
•PP-Api-Key: The value of this header should be the API key generated by the system.
•Content-Type: The value of this header should be application/json
. The Content-Type
header also provides the UTF-8 character set parameter by default. Other encoding formats are not supported (e.g., ISO-8859-1).
Example
PP-Api-Key: 0123abc
Content-Type: application/json
6. Status Codes
Code | Type | Message |
---|---|---|
200 | Success | Request response is successful. |
203 | Payment Required | 0 quota available or deduction failed. |
204 | No Content | No Content |
400 | Bad Request | Invalid request, e.g. using an unsupported HTTP methodRequest type error. Please check the API documentation for the request type of this API. |
401 | Unauthorized | Authentication or permission error, e.g. Invalid API keys. |
403 | Forbidden | The request has been refused or access is not allowed, e.g. Current plan doesn't have permission to access. |
404 | Not Found | Requests to resources that don't exist or are missing. |
429 | Too Many Requests | Exceeded API request limits. Please try again later. Check API documentation for limits. |
500 | Internal Server Error | Server error. Please contact us: [email protected]. |
4101 | Bad Request | Tracking No. already exists. |
4102 | Bad Request | Tracking_number is required. Order_number is required. |
4103 | Bad Request | Invalid tracking_number. Invalid order_id. |
4104 | Bad Request | All items of this type of product are shipped. |
4105 | Bad Request | Import failed. |
7. API Endpoints
Create Trackings
Endpoint
POST /api/v1/tracking/create
Description
1. Import ≤40 tracking numbers at once.
2. The API request frequency limit is 3 requests/sec.
Request Parameters
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
order_id | Yes | number | 1234 | Unique identifier for the order. >= 1 characters. |
tracking_number | Yes | string | 92055901755477000271990251 | Tracking number of a shipment. Duplicated tracking numbers, tracking numbers with invalid tracking number format will not be accepted. We only accept tracking numbers with length from 4 to 100. We currently support the following characters in a tracking number: A - Z 0 - 9- (Hyphen) . (Period) _ (Underscore) / (Slash) >= 1 characters |
courier_code | No | string | usps | Unique code of courier. Get courier codes here. If the code is empty, the system will automatically match it based on our matching rules. |
date_shipped | No | string | 2022-11-12 18:02:00 | Date when the package was shipped – default to the date/time that the tracking was added via the API. |
status_shipped | No | number | 1 | Leave blank or input 1 to mark order as Completed Input 0 won't change current status Input 2 to mark order as Partially Shipped Input 3 to mark order as Shipped |
sku | No | string | woo-tshirt | Line item (product) SKU. |
qty | No | number | 2 | Line item (product) quantity. |
Request Example 1: Create a tracking
curl --request POST
--url https://wp-api.parcelpanel.com/api/v1/tracking/create
--header 'Content-Type: application/json'
--header 'PP-Api-Key: 0123abc'
--data '{
"shipments": [
{
"order_id": 1234,
"tracking_number": "92055901755477000271990251",
"courier_code": "usps",
"date_shipped": "2022-11-12 18:02:00",
"status_shipped": 1
}
]
}'
Request Example 2: Create multiple tracking
curl --request POST
--url https://wp-api.parcelpanel.com/api/v1/tracking/create
--header 'Content-Type: application/json'
--header 'PP-Api-Key: 0123abc'
--data '{
"shipments": [
{
"order_id": 1234,
"tracking_number": "92055901755477000271990251",
"courier_code": "usps",
"date_shipped": "2022-11-12 18:02:00",
"status_shipped": 1
},
{
"order_id": "1235",
"tracking_number": "YT2315921266046217",
"courier_code": "yunexpress",
"date_shipped": "2022-11-12 18:02:00",
"status_shipped": "1"
}
]
}'
Request Example 3: Create tracking with different items
e.g. If you receive an order #1234 with with 3 items:
T-shirt (woo-tshirt) x 1
Beanie (woo-beanie) x 2
If you ship the t-shirt and beanie as a set, put the rest in another package
curl --request POST
--url https://wp-api.parcelpanel.com/api/v1/tracking/create
--header 'Content-Type: application/json'
--header 'PP-Api-Key: 0123abc'
--data '{
"shipments": [
{
"order_id": 1234,
"tracking_number": "11111111",
"courier_code": "usps",
"date_shipped": "2022-11-12 18:02:00",
"status_shipped": 1,
"line_items": [
{
"sku": "woo-tshirt",
"qty": 1
},
{
"sku": "woo-beanie",
"qty": 1
}
]
},
{
"order_id": 1234,
"tracking_number": "22222222",
"courier_code": "usps",
"date_shipped": "2022-11-12 18:02:00",
"status_shipped": 1,
"line_items": [
{
"sku": "woo-beanie",
"qty": 1
}
]
}
]
}'
Response Example
{
"code": 200,
"msg": "The request was successful",
"time": 1686729885,
"data": {
"success": [
{
"order_id": 1234,
"tracking_number": "92055901755477000271990251",
"courier_code": "usps",
"message": "Successful"
}
],
"error": [
{
"code": "4104",
"type": "Bad Request",
"order_id": 1235,
"tracking_number": "YT2315921266046217",
"courier_code": "yunexpress",
"message": "All items of this type of product are shipped."
}
],
"success_count": 1,
"fail_count": 1
}
}
Response Parameters
Parameter | Description |
---|---|
order_id | Unique identifier for the order. >= 1 characters |
tracking_number | Tracking number of a shipment. |
courier_code | Unique code of the courier. If the code is empty, the system will automatically match it based on our matching rules. |
message | Description or additional information related to the business status code. |
Delete Trackings
Endpoint
POST /api/v1/tracking/delete
Description
1. Import up to 40 tracking numbers at once.
2. The API request frequency limit is 3 requests per second.
Request Parameters
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
order_id | No | number | 1234 | Unique identifier for the order. >= 1 characters. |
tracking_number | No | string | 92055901755477000271990251 | Tracking number of a shipment. Duplicated tracking numbers, tracking numbers with invalid tracking number format will not be accepted. We only accept tracking numbers with length from 4 to 100. We currently support the following characters in a tracking number: A - Z 0 - 9- (Hyphen) . (Period) _ (Underscore) / (Slash) >= 1 characters |
Request Example
•If you only provide the order_id, it will delete all tracking numbers associated with that order.
•If you provide both order_id and tracking_number, it will delete the specific tracking number for that order.
•If you only provide the tracking_number, it will delete that tracking number regardless of the associated order.
curl --request POST
--url https://wp-api.parcelpanel.com/api/v1/tracking/delete
--header 'Content-Type: application/json'
--header 'PP-Api-Key: 0123abc'
--data '{
"shipments": [
{
"order_id": 1927,
"tracking_number": "399605817216"
}
]
}
Response Example
Response Example
{
"code": 200,
"type": "Success",
"msg": "The request was successful",
"time": 1686826374,
"data": {
"success": [
{
"order_id": 1927,
"tracking_number": "399605817216",
"message": "Delete successfully"
}
]
}
}
Response Parameters
Parameter | Description |
---|---|
order_id | Unique identifier for the order. >= 1 characters |
tracking_number | Tracking number of a shipment. |
message | Description or additional information related to the business status code. |
Get Tracking Details
Endpoint
POST /api/v1/tracking/list
Description
1. Import up to 40 tracking numbers at once.
2. The API request frequency limit is 3 requests per second.
Request Parameters
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
order_id | Yes | number | 1234 | Unique identifier for the order. >= 1 characters. |
Request Example
curl --request POST
--url https://wp-api.parcelpanel.com/api/v1/tracking/list
--header 'Content-Type: application/json'
--header 'PP-Api-Key: 0123abc'
--data '{
"orders": [
{
"order_id": 1927
}
]
}
Response Example
{
"code": 200,
"type": "Success",
"msg": "The request was successful",
"time": 1686818496,
"data": [
{
"order_id": 1927,
"number": "1927",
"status": "completed",
"date_created": "2023-06-15 02:56:57",
"date_created_gmt": "2023-06-15 02:56:57",
"billing": {
"first_name": "Parcel",
"last_name": "Panel",
"email": "[email protected]",
"phone": "11111111111"
},
"shipping": {
"first_name": "Parcel",
"last_name": "Panel",
"company": "ParcelPanel",
"address_1": "1149 Williams Avenue",
"address_2": "",
"city": "NEW YORK",
"state": "NY",
"postcode": "10026",
"country": "US",
"phone": "11111111111"
},
"line_items": [
{
"id": 2523,
"name": "Album",
"product_id": 27,
"variation_id": 0,
"quantity": 1,
"sku": "woo-album"
},
{
"id": 2524,
"name": "Beanie",
"product_id": 19,
"variation_id": 0,
"quantity": 1,
"sku": "woo-beanie"
}
],
"shipments": [
{
"tracking_number": "420358029305510944102208787258",
"carrier": {
"name": "USPS",
"code": "usps",
"tel": "+1 800-275-8777",
"url": "https://www.usps.com/",
"img": "https://cdn.parcelpanel.com/assets/common/images/express/usps.png"
},
"status": "delivered",
"date_fulfillment_at": "2023-06-15 08:34:35",
"line_items": [
{
"id": 2523,
"name": "Album",
"product_id": 27,
"variation_id": 0,
"quantity": 1,
"sku": "woo-album"
},
{
"id": 2524,
"name": "Beanie",
"product_id": 19,
"variation_id": 0,
"quantity": 1,
"sku": "woo-beanie"
}
],
"origin_country_code": "US",
"origin_weblink": "",
"origin_phone": "",
"destination_country_code": "",
"destination_weblink": "",
"destination_phone": "",
"track_info": [
{
"date": "2023-06-12 18:21:00",
"status_description": "Delivered, In/At Mailbox. Your item was delivered in or at the mailbox at 6:21 pm on June 12, 2023 in HUNTSVILLE, AL 35802.",
"details": "HUNTSVILLE,AL,35802",
"checkpoint_status": "delivered"
},
{
"date": "2023-06-12 06:10:00",
"status_description": "Out for Delivery",
"details": "HUNTSVILLE,AL,35802",
"checkpoint_status": "pickup"
},
{
"date": "2023-06-12 04:23:00",
"status_description": "Arrived at Post Office",
"details": "HUNTSVILLE,AL,35802",
"checkpoint_status": "transit"
},
{
"date": "2023-06-12 03:05:00",
"status_description": "Arrived at USPS Facility",
"details": "HUNTSVILLE,AL,35802",
"checkpoint_status": "transit"
},
{
"date": "2023-06-12 02:40:00",
"status_description": "Departed USPS Regional Facility",
"details": "HUNTSVILLE AL DISTRIBUTION CENTER",
"checkpoint_status": "transit"
},
{
"date": "2023-06-11 00:00:00",
"status_description": "In Transit to Next Facility",
"details": "",
"checkpoint_status": "transit"
},
{
"date": "2023-06-10 11:52:00",
"status_description": "Arrived at USPS Regional Facility",
"details": "HUNTSVILLE AL DISTRIBUTION CENTER",
"checkpoint_status": "transit"
},
{
"date": "2023-06-10 11:02:00",
"status_description": "In Transit to Next Facility",
"details": "",
"checkpoint_status": "transit"
},
{
"date": "2023-06-10 09:42:00",
"status_description": "Departed USPS Regional Facility",
"details": "BIRMINGHAM AL DISTRIBUTION CENTER ANNEX",
"checkpoint_status": "transit"
},
{
"date": "2023-06-10 06:12:00",
"status_description": "Arrived at USPS Regional Facility",
"details": "BIRMINGHAM AL DISTRIBUTION CENTER ANNEX",
"checkpoint_status": "transit"
},
{
"date": "2023-06-10 02:04:00",
"status_description": "Departed USPS Regional Facility",
"details": "MONTGOMERY AL DISTRIBUTION CENTER",
"checkpoint_status": "transit"
},
{
"date": "2023-06-10 01:23:00",
"status_description": "Arrived at USPS Regional Facility",
"details": "MONTGOMERY AL DISTRIBUTION CENTER",
"checkpoint_status": "transit"
},
{
"date": "2023-06-09 23:19:00",
"status_description": "Departed USPS Regional Facility",
"details": "ATLANTA-PEACHTREE GA DISTRIBUTION CENTER",
"checkpoint_status": "transit"
},
{
"date": "2023-06-09 11:10:00",
"status_description": "Arrived at USPS Regional Facility",
"details": "ATLANTA-PEACHTREE GA DISTRIBUTION CENTER",
"checkpoint_status": "transit"
},
{
"date": "2023-06-09 03:43:00",
"status_description": "Departed USPS Regional Origin Facility",
"details": "ATLANTA NORTH METRO DISTRIBUTION CENTER",
"checkpoint_status": "transit"
},
{
"date": "2023-06-09 03:12:00",
"status_description": "Arrived at USPS Regional Origin Facility",
"details": "ATLANTA NORTH METRO DISTRIBUTION CENTER",
"checkpoint_status": "transit"
},
{
"date": "2023-06-09 01:57:00",
"status_description": "Accepted at USPS Origin Facility",
"details": "ATLANTA,GA,30309",
"checkpoint_status": "transit"
},
{
"date": "2023-06-08 00:00:00",
"status_description": "Pre-Shipment Info Sent to USPS, USPS Awaiting Item",
"details": "",
"checkpoint_status": "info_received"
}
]
}
]
}
]
}
Get couriers list
Endpoint
GET /api/v1/tracking/couriers
Description
1. Import up to 40 tracking numbers at once.
2. The API request frequency limit is 3 requests per second.
Request Example
curl --request GET
--url https://wp-api.parcelpanel.com/api/v1/tracking/couriers
--header 'Content-Type: application/json'
--header 'PP-Api-Key: 0123abc'
Response Example
{
"code": 200,
"type": "Success",
"msg": "The request was successful",
"time": 1686818861,
"data": [
{
"courier_name": "Yun Express",
"courier_code": "yunexpress",
"courier_phone": "4000-2621-26",
"courier_type": "express",
"country_code": "CN",
"courier_url": "http://www.yunexpress.com/",
"courier_logo": "https://cdn.parcelpanel.com/assets/common/images/express/yunexpress.png"
},
{
"courier_name": "FlashExpress PH",
"courier_code": "flashexpress-ph",
"courier_phone": "(02) 8539-4002",
"courier_type": "express",
"country_code": "PH",
"courier_url": "https://www.flashexpress.ph/",
"courier_logo": "https://cdn.parcelpanel.com/assets/common/images/express/flashexpress-ph.png"
},
...
]
}
Postman example
Here's an example of a Postman request for the [Create Trackings] API:
1. Set the API key in the Headers:
- •Key: PP-Api-Key
- •Value: [Your API key]
2. Set the request details in the Body:
- •Select "Raw" as the body format.
- •Choose JSON as the language.
Before:
After: