Parties
This guide explains the concept of parties for shipments and how to use them.
If you are using the deprecated address objects (i.e. sender
), please refer to the migration guide after you've read this guide.
Introduction
A party refers to someone (company or person) that is a part of the shipment in some way. This could be sender or receiver, but also the freight payer.
The party includes information like name, address, contact information and other data that relates to the specific party.
Not all party types are required and are only provided when relevant.
Structure
Parties are given in the parties
array in the root of the request.
Each party following the same structure:
{
"type": "sender",
"name": "Min Virksomhed ApS",
"attention": "Lene Hansen",
"address1": "Hvilehøjvej 25",
"address2": null,
"postal_code": "5220",
"city": "Odense SØ",
"state": null,
"country_code": "DK",
"email": "info@minvirksomhed.dk",
"phone": "70400407",
"attributes": []
}
The following section will highlight specific fields of the party object. Please refer to the API Reference for more specific details on each field of the party.
Types
type
define which party the information relates to. The following types are available:
sender
- Sender of the shipment
receiver
- Receiver of the shipment
pickup
- Where the shipment should be picked if not from the sender
importer
- Importer of the shipment, if it is not the receiver
freight_payer
- Freight payer of the shipment, if is not the agreement used to book the shipment
service_point
- Service point the shipment should be sent to
return
- Where the shipment should be returned, if not able to be delivered
Attributes
Certain data may only be available for specific parties and are therefore stores as dynamic attributes in the attributes
array.
These objects simply include a name
and value
. Examples of these attributes are:
vat_no
voec
gb_eori
ioss
access_code
service_point_id
{
"name": "vat_no",
"value": "DK12345678"
}
What attributes are avaiable depends on aspects like carrier, product and whether its a shipment with customs declaration.
Example
{
"parties": [
{
"type": "sender",
"name": "Min Virksomhed ApS",
"attention": "Lene Hansen",
"address1": "Hvilehøjvej 25",
"postal_code": "5220",
"city": "Odense SØ",
"country_code": "DK",
"email": "info@minvirksomhed.dk",
"phone": "70400407",
"attributes": [
{
"name": "vat_no",
"value": "DK12345678"
},
{
"name": "voec",
"value": "1234567"
}
]
},
{
"type": "receiver",
"name": "John Smith",
"address1": "3200 Whitehaven St.",
"postal_code": "20008",
"city": "Washington",
"state": "DC",
"country_code": "US",
"email": "john@email.com",
"phone": "+12021234567",
"attributes": [
{
"name": "access_code",
"value": "1234"
}
]
}
]
}