Data Model
The data model covers the foundational elements of a tracking and order record in the parcelLab system via our API v2 LTS.
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.
Individual fields have no character length limit.
Embedding of large base64 values is discouraged, and if those are transmitted they are automatically replaced by an URL to our file storage, so cannot be directly retrieved from our API.
The maximum permitted payload size is 1 MB, larger payloads will be rejected by the API.
Required Keys for Trackings
The following table lists the required keys that must be supplied for every tracking
.
courier
Carrier code
Short code of the carrier (see below).
tracking_number
String
Unique tracking number.
zip_code
String
Postal code.
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.
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
Boolean
If true
, delivery is cancelled (that is: no communication is sent to the set recipient
). All monitoring and reporting is disabled.
notificationsInactive
Boolean
If true
, communication to the customer is stopped immediately.
Creating Orders
Orders can be explicitly created in parcelLab using the order
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.
orderNo
String
Order number.
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.
client
String
Client (Mandant in German) of the tracking in internal encoding.
The values in the client
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.
Required Keys for Notifications
The following table lists the required keys that should be supplied for notifications that are sent from parcelLab.
recipient_notification
String
Name of the recipient used in notifications (including salutation).
recipient
String
Name of the recipient used in the parcelLab App.
String
Email address of recipient.
street
String
Street address of delivery.
city
String
City of delivery.
phone
String
Phone number of recipient.
Optional Keys for Notifications
The following table lists additional keys that can be used to further individualize notifications.
deliveryNo
String
Optional
Internal delivery number.
customerNo
String
Optional
Internal customer number.
consignmentNo
String
Optional
Consignment number identifying the parcel.
weight
String
Optional
Weight of the package.
courierServiceLevel
String
Optional; Required for Promise
Product or service level from carrier.
warehouse
String
Optional; Required for Promise
Warehouse from which the delivery was shipped.
market
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.
cashOnDelivery
Number
Optional
The cash on delivery (COD) amount.
branchDelivery
Boolean
Optional
Whether the shipment is a branch delivery.
statuslink
String
Optional
Alternative status link.
order_date
Date / DateTime
Optional
Date of ordering by customer.
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_info
property.
name
String
Full name of the billing recipient.
phone
String
Phone number of the billing recipient.
String
Email address of the billing recipient.
street
String
Street of the billing recipient.
city
String
City of the billing recipient.
zip_code
String
Postal code of the billing recipient.
region
String
State of the billing recipient.
country_iso3
String
Country of the billing recipient.
Article List
A list of articles allows you to specify the detailed contents of a delivery by defining for each item in the list the quantity, article number, and article name. It is written into the articles
field.
The following table lists the required and optional keys for article lists.
articleNo
String
Required
Article number.
articleName
String
Required
Article name.
articleCategory
String
Optional; Required for Category-Based Return Reasons
Article category.
articlePrice
Numeric
Optional; Required for:
Returns Portal
Customer Segmentation
articleUrl
String
Optional; Required for Product Recommendations
URL to the product page.
articleImageUrl
String
Optional; Required for Product Recommendations
Full URL to the product image
size
String
Optional
Article size.
color
String
Optional
Article color.
quantity
Numeric
Optional; Required for:
Returns Portal
Customer Segmentation
Product Recommendations
Amount of the purchased product.
returnableQuantity
Numeric
Optional; Required for Already Returned Items feature
Quantity eligible for return.
A list of articles looks like this:
[
{
"articleNo": "article number (String)", // required
"articleName": "article name (String)", // required
"articleCategory": "article category (String)", // optional
"articleUrl": "url to the product page (String)", // optional
"articleImageUrl": "full url to image (String)", // optional
"size": "article size (String)", // optional
"color": "article color (String)", // optional
"quantity": Integer, // 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 into the sub-object in customFields
. 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 customFields
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:
{
"courier": "ups",
"tracking_number": "1Z0...01",
...
"customFields": {
"sample_string": "Any String", // Any key name and any data type, e.g. String
"sampleNumber": "1234", // ... or number ...
"anyboolean": "true", // ... or bool ...
"mylist": [{ a: 1 }], // ... or even an array.
... // Add any other keys as well.
}
}
Any added custom field can immediately be used as a placeholder like this: {{sample_string/customField}}
. If a placeholder is used and the custom field is not set, the placeholder will show an empty string.
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?