Data Model
The data model covers the foundational elements of a tracking and order record in the parcelLab system via our API v4 Enhanced (preview).
Overview
The most basic record in parcelLab is a tracking. A tracking can represent a parcel or a pallet, or anything else that is identified by a unique tracking number. You can submit tracking information for one or more parcels with a corresponding order number.
Please use PUT v4/track/orders
as the default endpoint to create new trackings and orders in the API v4 Enhanced (preview).
Keys for Trackings
The tracking details can be sent with the corresponding order in the tracking array in the mutations of the /v4/track/orders
endpoint.
The following table lists the keys that can be used to create a tracking.
tracking_number
String
Unique tracking number.
courier
Carrier code
Short code of the carrier (see below).
recipient_postal_code
String
Postal (zip) code.
destination_country_iso3
Destination country (for example: DEU
), if different from order destination country.
The following list contains some carrier codes. If you need a carrier code that is not on this list, please contact your Implementation Manager for the specific carrier codes required.
Special Keys for Trackings
The following table lists special keys that alter how the system handles trackings.
is_return
Boolean
If true
, the delivery is handled as a return. Dispatch delays will not be monitored and the tracking will not be considered for general reporting.
cancelled_date
String
The date/time when the order was cancelled.
cancelled_reason
String
The reason for cancelling an order. This can be customer
, inventory
, payment
, other
.
notifications_inactive
Boolean
If true
, communication to the customer is stopped immediately.
Creating Orders
Orders can be explicitly created in parcelLab using the v4/track/orders
endpoint. To group trackings into an order, an order number needs to be supplied. This order number then links all trackings together and consolidates communications (for example: email, SMS, and so on) and the Order Status page.
account
Integer
parcelLab user ID associated with the order.
order_number
String
Order number.
recipient_email
String
Email address of recipient.
Multi-Shop Setup
If several shops (for example: shops with multiple domains, dedicated shops for specific countries, or otherwise individual corporate identity) are used within one account in the parcelLab App, each tracking is assigned to a shop using the client_key
field.
client_key
String
Client/shop of the tracking in internal encoding.
The values in the client_key
field can be copied from internal systems and can be any string. Each client is implicitly linked to a shop in the parcelLab system and is the easiest way to assign a sender name, domain, and email template.
Keys for Notifications
The following table lists the keys that can be used for notifications that are sent from parcelLab.
recipient_name
String
Optional
Name of the recipient used in notifications (including salutation).
recipient_email
String
Required
Email address of recipient.
address_line
String
Required
Street address of delivery.
postal_code
String
Required
Postal (zip) code of delivery.
city
String
Required
City of delivery.
phone
String
Optional
Phone number of recipient.
delivery_number
String
Optional
Delivery number of shipment in order.
customer_number
String
Optional
Customer number (for example: from the retailer).
identifiers_consignment
String
Optional
Consignment number identifying the parcel.
weight
String
Optional
Weight of the package.
courier_service_level
String
Optional; Required for Promise
Product or service level from carrier.
warehouse
String
Optional; Required for Promise
Warehouse from which the delivery was shipped.
channel
String
Optional; Required for Marketplace Support
Marketplace used for sale.
complete
Boolean
Optional
Whether the shipment is complete.
upgrade
Boolean
Optional
Whether the shipment has an upgrade or individualization.
cash_on_delivery
Number
Optional
The cash on delivery (COD) amount.
branch_delivery
Boolean
Optional
Whether the shipment is a branch delivery.
status_link
String
Optional
Link to track the status of the delivery.
order_date
Date/DateTime
Optional
Date of ordering by customer.
announced_send_date
Date/DateTime
Optional
Announced dispatch date or send date
announced_delivery_date
Date
Optional; Required for Trending Late
Announced delivery date.
Billing Address
The following table lists the fields that can be used to store all related billing information for the customer billing address in the optional billing_address
property.
first_name
String
Optional
First name of the billing recipient.
last_name
String
Optional
Last name of the billing recipient.
company_name
String
Optional
Company name of the billing recipient.
address_line
String
Required
Street and house number of the billing recipient.
address_line_extra
String
Optional
Additional address line of the billing recipient.
postal_code
String
Required
Postal (zip) code of the billing recipient.
city
String
Required
City of the billing recipient.
phone
String
Optional
Phone number of the billing recipient.
Article List
A list of articles allows you to specify the detailed contents of an order by defining for each item in the list the quantity, article number, and article name in the optional articles_order
property.
The following table lists the required and optional keys for article lists.
version
String
Optional
Possible values v1
or v2
.
line_item_id
String
Required
Retailer ID of the article.
SKU
String
Optional
Stock Keeping Unit (SKU) of the article.
product_id
String
Optional
Product ID of the article in the retailer’s system, if different from the SKU.
order_item_id
String
Required
Article ID in the order.
article_name
String
Required
Article name.
article_category
String
Optional; Required for Category-Based Return Reasons
Article category.
article_store_url
String
Optional; Required for Product Recommendations
URL to the product page.
article_image_url
String
Optional; Required for Product Recommendations
Full URL to the product image.
article_brand
String
Optional
Brand of the article.
size
String
Optional
Article size.
color
String
Optional
Article color.
width
Numeric
Optional
Article width.
height
Numeric
Optional
Article height.
length
Numeric
Optional
Article length.
length_unit
String
Optional
Article length unit of measurement.
weight
Numeric
Optional
Article weight.
weight_unit
String
Optional
Article weightt unit of measurement.
unit_price
Numeric
Optional; Required for:
Returns Portal
Customer Segmentation
Article price.
quantity
Numeric
Optional; Required for:
Returns Portal
Customer Segmentation
Product Recommendations
Amount of the purchased product.
amount_invoiced
Numeric
Optional
Amount invoiced for the article.
origin_country_iso3
Optional
Country of origin of the article, might be required based on shipment regulations.
is_bulky
Boolean
Optional
Whether the article is bulky.
tags
String
Optional
Tags for the article (for example: category:home-apparel).
additional_attributes
Object
Optional
Additional attributes for the article. Requires a key
and optional value
for the additional attribute.
status
String
Optional
Order status of the article. Can be shipped
, pending
, processing
, cancelled
, returned
.
A list of articles looks like this:
[
{
"line_item_id": "retailer ID of article" (String), // required
"order_item_id": "article ID" (String), // optional
"article_name": "article name" (String), // optional
"article_category": "article category" (String), // optional
"article_store_url": "url to the product page" (String), // optional
"article_image_url": "full url to image" (String), // optional
"size": "article size" (String), // optional
"color": "article color" (String), // optional
"quantity": "amount of purchased item" (Numeric)", // optional
},
...
]
Custom Fields
Custom fields can be used to add additional content to the notifications that does not fit in any other field. These are written in additional_fields
in the tracking array in the mutations of the /v4/track/orders
endpoint. Custom fields can be set individually but must be coordinated with parcelLab. Multiple custom fields can be submitted as a list of custom fields.
Keys of additional_fields
are arbitrary but must be of String
type. Key values can be of any data type. An example of individual custom fields can look like this.
"mutations": [
{
"type": "add_tracking",
"tracking": {
"tracking_number": "0035999222335558TEST",
"courier": "postnord",
"courier_service_level": "STANDARD",
"additional_fields": {
"locationCode": "012"
"pickupBoxCabinNo": "48"
}
}
}
]
Tags
Tags can be used to identify specific information in trackings in order to easily find them via filters and in exports.
Tags are an array of String
type. An example of individual tags for a tracking can look like this:
Sample JSON Payload
A sample JSON payload can be found here as demonstration of the data structure.
Last updated
Was this helpful?