HomeAPI Reference4. Data Types

4. Data Types

Our API defines its own data types.

array

Array of elements. Can contain all other data types.

Pattern*
Examples []

boolean

Boolean value

Allowed values 0
1

platform

Platform name

Allowed values myparcel
flespakket
belgie

carrier

Carrier id

Allowed values 1
2
3
4
5
8
Examples 1 (PostNL)
2 (bpost. Only available on sendmyparcel.be)
3 (CheapCargo/pallets)
4 (DPD. Only available on sendmyparcel.be)
5 (Instabox. Only available on MyParcel.nl)
8 (UPS. Only available on MyParcel.nl)

coordinates

Latitude or longitude.

Pattern/[-+]?[\d]{1,2}.\d+/
Examples 52.192150633052

country_code

ISO3166-1 alpha2 country code.

Pattern/[A-Z]{2}/
Examples NL
BE
CW

currency

ISO 4217 currency code. Currently, only 'EUR' is supported.

Pattern/[A-Z]{3}/
Examples EUR

date

Date.

Pattern/\d{4}-\d{2}-\d{2}/
Examples 2022-04-21

delivery_type

Delivery type.

Allowed values 1
2
3
4
Examples 1. morning
2. standard
3. evening
4. pickup

description

Delivery type.

Pattern/.{0,255}/
Examples Zending bezorgd

eori_number

Economic Operators Registration and Identification. This field is required for

carrier undefined shipments to the United Kingdom. In this field you can enter the EORI number of the sender in case of a B2C shipment and the EORI number of the recipient in case of a B2B shipment.
Pattern/[A-Z]{2}\d{9,12}/
Examples NL012345678

integer

Numeric value.

Pattern/\d+/
Examples 20
5

float

Numeric value with decimal fractions.

Pattern/\d+\.\d+/
Examples 1.1248

isic_code

International Standard Industry Classification. This is mandatory for the customs form when shipping outside EU. Codes can be found on the Douane website.

Pattern/\d{1,4}/
Examples 9609 (Pencils)

label_position

The position of the label on the paper.

Allowed values 1
2
3
4
Examples 1. (top-left)
2. (top-right)
3. (bottom-left)
4. (bottom-right)

main

All statuses are divided into 5 main "categories". Only the last status in a category gets this attribute, meaning if there are consecutive duplicate statuses still only the most recent status gets the main attribute. Other statuses get the value null.

Pattern/[a-z]/
Examples registered
handed_to_carrier
sorting
distribution
delivered

month_digit

The month in digit preceded by a zero for single digit months

Pattern/[0-1]{1}[1-9]{1}/
Examples 01 (Jan)
02 (Feb)

order_status

Order status

Pattern/[a-z]+/
Examples open
partially_processed
processed
cancelled

package_contents

The package contents are only needed in case of shipping outside EU, this is mandatory info for customs form.

The content type of a package.

Allowed values 1
2
3
4
5
Examples 1. commercial goods
2. commercial samples
3. documents
4. gifts
5. return shipment

package_type

The different shipments you can create. For SendMyParcel only package-type undefined (package) is allowed.

Allowed values 1
2
3
4
Examples 1. package
2. mailbox package
3. letter
4. digital stamp

paper_size

The size of a paper as specified in ISO216.

Allowed values a4
a6

price

Composite type containing integer and currency. The amount is without decimal separators (in cents).

Pattern{"amount": integer, "currency": currency }
Examples {"amount": 10000
"currency": "EUR"}

shipment_status

Shipment status.

Pattern/\d+/
Examples 1 pending - concept
2 pending - registered
3 enroute - handed to carrier
4 enroute - sorting
5 enroute - distribution
6 enroute - customs
7 delivered - at recipient
8 delivered - ready for pickup
9 delivered - package picked up
10 delivered - return shipment ready for pickup
11 delivered - return shipment package picked up
12 printed - letter
13 inactive - credited
14 printed - digital stamp
30 inactive - concept
31 inactive - registered
32 inactive - enroute - handed to carrier
33 inactive - enroute - sorting
34 inactive - enroute - distribution
35 inactive - enroute - customs
36 inactive - delivered - at recipient
37 inactive - delivered - ready for pickup
38 inactive - delivered - package picked up

sort_order

Sort order.

Allowed values ASC
DESC

string

Any alphanumeric value up to 255 characters unless specified otherwise.

Pattern/.{0,255}/
Examples 3SMYPA123456789
Antareslaan 31
Nederland

text

Any character up to a limit of 2048 characters.

Pattern/.{0,2048}/
Examples This is a test text.

time

A timestamp.

Pattern/\d{2}:\d{2}:\d{2}/
Examples 08:00:00

timestamp

A date with timestamp.

Pattern/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:.\d{6})?/
Examples 2022-04-21 12:30:00
2022-04-21 13:00:00.000000

uuid

A 128-bit identifier.

Pattern/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/
Examples ead3bb07-347d-4858-9c22-2e46fdec7ddc

vat_number

This field is required for DPD shipments to the United Kingdom. In this field you can enter the VAT number of the sender in case of a B2C shipment and the VAT number of the recipient in case of a B2B shipment.

Pattern/.*{,15}/
Examples NL000099998B57

webhook_status

A webhook status.

Pattern/[a-z]+/
Examples success
failed

weekday_digit

Weekday digit. Note our weekdays start on Sunday.

Pattern/[0-6]/
Examples 0 (Sunday)
1 (Monday)

weekday_string

Weekday in string. Note our weekdays start on Sunday.

Allowed values sunday
monday
tuesday
wednesday
thursday
friday
saturday
Edit this page
Last updated: 
Contributors Richard Perdaan