Endpoint Information
| Category | API calls |
|---|---|
| Description | Create a shipment |
| Endpoint | https://accept.api.rm-nl.nl/api/rm/shipment |
| Method | POST |
Request Headers
| Type | Parameter | Required | Default | Example | Description |
|---|---|---|---|---|---|
| string | Content-Type | Required | application/json | - | The type of content present in the request payload. |
| string | Authorization | Required | - | Bearer your-access-token | The bearer token used for authentication. |
Request Body Parameters
| Type | Parameter | Required | Default | Example | Description | Carrier |
|---|---|---|---|---|---|---|
| string |
messageIdentifier
messageIdentifier |
Required | - | 9f7638a0-c2c9-4c70-b073-8848be8a1d21 | Each shipment request has its own unique ID. Can be used as a shipment number by the carrier if they can't create their own shipment numbers. | |
| integer |
messageVersion
messageVersion |
Required | - | 1 | Internal to RM; at some point, we might need to make changes to our request. We aim to maintain backward compatibility with older versions. | |
| object |
references
references |
Required | - | - | Any additional reference information related to the shipment. | |
| string |
references.shipmentReference
shipmentReference |
Required | - | ABC12345 | We highly recommend our customers to make it unique for each shipment, but we cannot guarantee that for all customers and shipments. | |
| string |
references.receiverReference
receiverReference |
Optional | - | DEF12345 | Reference for the receiver | |
| object |
labelSpecs
labelSpecs |
Required | - | - | Preferred specifications for the shipment label to be printed. | |
| string |
labelSpecs.preferredLabelFormat
preferredLabelFormat |
Required | ZPL | ZPL | The preferred format for the label to be printed for the shipment. | |
| string |
labelSpecs.preferredLabelSize
preferredLabelSize |
Required | 4x6 | 4x6 | The preferred label size for printing the shipment is 4x6 inches, as this size can also be printed on larger labels, whereas the reverse is not possible. However, this is not a strict requirement, as the 'default' label size may vary depending on the carrier's origin or country. Example values: 4x6, 10x15, 10x19, 10x21, etc. The value(s) should be defined by the carrier. | |
| string |
labelSpecs.preferredPageOrientation
preferredPageOrientation |
Optional | portrait | portrait | Defines the orientation of the label on the printer (portrait or landscape), determining how the label is physically printed | PostNL |
| string |
labelSpecs.preferredResolution
preferredResolution |
Optional | 200 | 200 | Indicates the printer’s resolution in DPI (200, 300, or 600), which determines the level of detail and sharpness of the printed label. | PostNL |
| object |
shipmentCustomsInfo
shipmentCustomsInfo |
Optional | - | - | An object containing all customs information at the shipment level. |
|
| float |
shipmentCustomsInfo.shipmentValue
shipmentValue |
Optional | - | 12.34 | Value of the shipment for customs or insurance purposes. We automatically calculate the total if the customer has added articleCustomsInfo lines to the shipment request. The calculation is done by multiplying the 'quantity' by the 'unitValue' for each line and summing the results of all lines. | |
| string |
shipmentCustomsInfo.shipmentCurrency
shipmentCurrency |
Optional | - | EUR | Currency of the shipmentValue. | |
| array |
addons
addons |
Optional | - | - | An array containing addon information. Addons represent extra services that can be booked in addition to a standard service. Addons are optional, but if available, we always output the addonDescription and addonCode1. | |
| string |
addons[].addonDescription
addonDescription |
Required | - | Stated address only | The name and description of the requested addon. | |
| string |
addons[].addonCode1
addonCode1 |
Required | - | statedAddressOnly | The first shortcode of the requested addon. | |
| string |
addons[].addonCode2
addonCode2 |
Optional | - | true | The second shortcode of the requested addon, optional in most cases. | |
| object |
senderAddress
senderAddress |
Optional | - | - | The address of the sender or shipper in the case of outbound shipments. Note that we swap the sender and receiver in the case of return services. In such cases, the person returning the shipment becomes the sender, and the warehouse becomes the receiver. |
|
| string |
senderAddress.contact
contact |
Required | - | John Doe | Used as first and last name if the shipment is B2B, empty or equal to name1 if the shipment is B2C. | |
| string |
senderAddress.language
language |
Optional | NL | NL | The language for communication purposes. | PostNL |
| string |
senderAddress.name1
name1 |
Required | - | RM Netherlands | Used as the company name if the shipment is B2B. Used as the first and last name if the shipment is B2C. | |
| string |
senderAddress.department
department |
Optional | - | - | PostNL | |
| string |
senderAddress.street1
street1 |
Required | - | Containerweg 2 | Street 1, house number, and extension (if available). | |
| string |
senderAddress.street2
street2 |
Optional | - | 3rd floor | The secondary street address of the shipment destination. | |
| string |
senderAddress.city
city |
Required | - | Waddinxveen | The city of the shipment destination. | |
| string |
senderAddress.zip
zip |
Required | - | 2742 RA | The postal code of the shipment destination. | |
| string |
senderAddress.countryCode
countryCode |
Required | - | NL | The ISO A2 country code of the shipment destination. | |
| string |
senderAddress.state
state |
Optional | - | NB | The state or region of the shipment destination. | |
| string |
senderAddress.phone
phone |
Optional | - | +31703075666 | The (mobile) phone number of the shipment recipient or receiver. | |
| string |
senderAddress.email
|
Optional | - | rm-transport@rm-nl.nl | The email address of the shipment recipient or receiver. There is no validation for the email address. Only one email address should be supplied here. | |
| string |
senderAddress.vatNumber
vatNumber |
Optional | - | NL1234567890 | The Value Added Tax (VAT) number associated with the shipment. | |
| string |
senderAddress.eoriNumber
eoriNumber |
Optional | - | NL1234567890 | The Economic Operator Registration and Identification (EORI) number assigned to the shipment. | |
| string |
senderAddress.voecNumber
voecNumber |
Optional | - | VOEC12345 | The Voucher of Electronic Compliances (VOEC) number linked to the shipment. | |
| boolean |
senderAddress.isBusiness
isBusiness |
Optional | true | - | DHL | |
| object |
receiverAddress
receiverAddress |
Required | - | - | The address of the shipment recipient or receiver. Note that we swap the sender and receiver in the case of return services. In such cases, the person returning the shipment becomes the sender, and the warehouse becomes the receiver. | |
| string |
receiverAddress.contact
contact |
Required | - | John Doe | The contact information of the shipment recipient or receiver. | |
| string |
receiverAddress.language
language |
Optional | NL | NL | The language for communication purposes. | PostNL |
| string |
receiverAddress.name1
name1 |
Required | - | RM Netherlands | The name of the shipment recipient or receiver. | |
| string |
receiverAddress.department
department |
Optional | - | - | PostNL | |
| string |
receiverAddress.street1
street1 |
Required | - | Containerweg 1 | The first line of the street address where the shipment will be delivered. | |
| string |
receiverAddress.street2
street2 |
Optional | - | 3rd floor | The second line of the street address where the shipment will be delivered. | |
| string |
receiverAddress.city
city |
Required | - | Waddinxveen | The city where the shipment will be delivered. | |
| string |
receiverAddress.zip
zip |
Required | - | 2742 RA | The postal code or ZIP code of the delivery location. | |
| string |
receiverAddress.countryCode
countryCode |
Required | - | NL | The country code of the delivery location. | |
| string |
receiverAddress.state
state |
Optional | - | NB | The state or region where the shipment will be delivered. | |
| string |
receiverAddress.phone
phone |
Optional | - | +31703075666 | The phone number of the shipment recipient or receiver. | |
| string |
receiverAddress.email
|
Optional | - | rm-transport@rm-nl.nl | The email address of the shipment recipient or receiver. | |
| string |
receiverAddress.vatNumber
vatNumber |
Optional | - | NL1234567890 | The Value Added Tax (VAT) number associated with the shipment. | |
| string |
receiverAddress.eoriNumber
eoriNumber |
Optional | - | NL1234567890 | The Economic Operator Registration and Identification (EORI) number assigned to the shipment. | |
| string |
receiverAddress.voecNumber
voecNumber |
Optional | - | VOEC12345 | The Voucher of Electronic Compliances (VOEC) number linked to the shipment. | |
| boolean |
receiverAddress.isBusiness
isBusiness |
Optional | true | - | DHL | |
| array |
packages
packages |
Required | - | - | An array that describes all relevant information at the package and line level. | |
| integer |
packages[].lineNo
lineNo |
Required | - | 1 | The line number associated with the shipment. Each additional line will be incremented sequentially. | |
| string |
packages[].lineDescription
lineDescription |
Optional | - | These packages contain clothing | Content description of the line. | |
| integer |
packages[].quantity
quantity |
Required | - | 2 | A line can contain more than one package. All packages in a specific line share the same specifications. | |
| string |
packages[].packageDescription
packageDescription |
Required | - | Carton box | Name and description of the packaging type. | |
| object |
packages[].measurements
measurements |
Required | - | - | The measurements of the package or line (e.g. dimensions and UOM). | |
| float |
packages[].measurements.length
length |
Required | - | 20.1 | The length of the package in CM. Max 1 decimal. | |
| float |
packages[].measurements.width
width |
Required | - | 20.2 | The width of the package in CM. Max 1 decimal. | |
| float |
packages[].measurements.height
height |
Required | - | 20.3 | The height of the package in CM. Max 1 decimal. | |
| float |
packages[].measurements.weight
weight |
Required | - | 20.123 | The weight of the package in KG. Max 3 decimals. | |
| string |
packages[].measurements.linearUom
linearUom |
Required | - | CM | Always CM. We don't support other linear UOMs. | |
| string |
packages[].measurements.massUom
massUom |
Required | - | KG | Always KG. We don't support other mass UOMs. | |
| array |
packages[].articleCustomsInfo
articleCustomsInfo |
Optional | - | - | An array containing article and customs information related to this line or package(s). It can be used to support a "paperless invoicing" solution. Optional by default. |
|
| integer |
packages[].articleCustomsInfo[].line
line |
Required | - | 1 | Each article in the customs line has its own ID, starting from 1 and incrementing by 1 per line. We count the total number of lines in the shipment, and not the per package or individual line. | |
| float |
packages[].articleCustomsInfo[].unitValue
unitValue |
Required | - | 11.23 | The value of the article is listed per unit, not as a total sum. The carrier can calculate the total value per line by multiplying the "unitValue" by the "quantity". | |
| string |
packages[].articleCustomsInfo[].countryOfOrigin
countryOfOrigin |
Required | - | NL | The country ISO A2 code where the articles originate from. | |
| integer |
packages[].articleCustomsInfo[].quantity
quantity |
Required | - | 3 | The number of units of the goods being shipped. | |
| float |
packages[].articleCustomsInfo[].grossWeight
grossWeight |
Required | - | 1.234 | Specifies the gross weight of a single unit of the goods, including packaging. This field should represent the weight per piece, not the total weight of all items combined. The weight is always provided in kilograms (KG). Max 3 decimals. | |
| float |
packages[].articleCustomsInfo[].nettWeight
nettWeight |
Required | - | 0.987 | Specifies the weight of the goods excluding packaging. This field should represent the weight per piece, not the total weight of all items combined. The weight is always provided in kilograms (KG). Max 3 decimals. | |
| string |
packages[].articleCustomsInfo[].weightUom
weightUom |
Required | KG | KG | Specifies the unit of measurement for the weight of the goods. This field is used to denote the measurement unit associated with the gross and net weight values. Value is always “KG”. | |
| string |
packages[].articleCustomsInfo[].commodityCode
commodityCode |
Required | - | 62034240 | The harmonized system (HS) code for the goods. This code is used for identifying products in international trade and is required for customs declarations. | |
| string |
packages[].articleCustomsInfo[].goodsDescription
goodsDescription |
Required | - | Jeans Boys Size M A01 | Provides a detailed description of the goods being declared. This field should include sufficient detail to accurately identify the items for customs purposes. Example: “T-Shirts Blue Size L Brand X”. | |
| string |
packages[].articleCustomsInfo[].sku
sku |
Optional | - | 11111111 | A unique identifier for the product, typically used for inventory tracking and order management. |
Response: 200
OK
| Type | Parameter | Default | Example | Description |
|---|---|---|---|---|
| boolean |
success
|
- | OK | Indicates if the shipment creation was successful. |
| string |
shipmentTrackingLink
|
- | - | We support tracking at the shipment or package level. Either the shipment, the package, or both should have a tracking link. |
| string |
shipmentNumber
|
- | - | If not supplied in the response, we will use the first package number as the shipment. This value will be used if you support return data/statuses at the shipment level. |
| array |
packageLabels
packageLabels |
- | - | |
| integer |
packageLabels[].sequence
sequence |
- | - | Order of the package label in the shipment. |
| string |
packageLabels[].labelFormat
labelFormat |
- | - | PDF or ZPL (uppercase), depending on the type of label returned. A carrier may return a ZPL string even if the customer requested a PDF string. We can convert the labels on our end. Note that in order to do this, it is required to specify the format of the returned label. Example: don't return a base64 PDF label string and set the labelFormat to "ZPL"; these should match. The value can be hardcoded on the carrier's side if they decide to support only one format. |
| string |
packageLabels[].labelData
labelData |
- | - | It is required to Base64 encode the label strings before sending them back to us in the response. |
| string |
packageLabels[].packageNumber
packageNumber |
- | - |
Response: 400
Bad Request
| Type | Parameter | Default | Example | Description |
|---|---|---|---|---|
| boolean |
success
|
false | - | Indicates if the shipment creation was successful. |
| array |
errors
errors |
- | - | A list of errors encountered during the shipment creation process. |
| string |
errors[].errorCode
errorCode |
- | - | The error code associated with the response. Codes to be defined by the carrier. |
| string |
errors[].errorDescription
errorDescription |
- | - | The description of the error encountered. Descriptions to be defined by the carrier. |
Request Example
{
"messageIdentifier": "9f7638a0-c2c9-4c70-b073-8848be8a1d21",
"messageVersion": "1",
"references": {
"shipmentReference": "ABC12345",
"receiverReference": "DEF12345"
},
"labelSpecs": {
"preferredLabelFormat": "ZPL",
"preferredLabelSize": "4x6",
"preferredPageOrientation": "portrait",
"preferredResolution": "200"
},
"shipmentCustomsInfo": {
"shipmentValue": "12.34",
"shipmentCurrency": "EUR"
},
"addons": [
{
"addonDescription": "Stated address only",
"addonCode1": "statedAddressOnly",
"addonCode2": "true"
}
],
"senderAddress": {
"contact": "John Doe",
"language": "NL",
"name1": "RM Netherlands",
"department": null,
"street1": "Containerweg 2",
"street2": "3rd floor",
"city": "Waddinxveen",
"zip": "2742 RA",
"countryCode": "NL",
"state": "NB",
"phone": "+31703075666",
"email": "rm-transport@rm-nl.nl",
"vatNumber": "NL1234567890",
"eoriNumber": "NL1234567890",
"voecNumber": "VOEC12345",
"isBusiness": "true"
},
"receiverAddress": {
"contact": "John Doe",
"language": "NL",
"name1": "RM Netherlands",
"department": null,
"street1": "Containerweg 1",
"street2": "3rd floor",
"city": "Waddinxveen",
"zip": "2742 RA",
"countryCode": "NL",
"state": "NB",
"phone": "+31703075666",
"email": "rm-transport@rm-nl.nl",
"vatNumber": "NL1234567890",
"eoriNumber": "NL1234567890",
"voecNumber": "VOEC12345",
"isBusiness": "true"
},
"packages": [
{
"lineNo": "1",
"lineDescription": "These packages contain clothing",
"quantity": "2",
"packageDescription": "Carton box",
"measurements": {
"length": "20.1",
"width": "20.2",
"height": "20.3",
"weight": "20.123",
"linearUom": "CM",
"massUom": "KG"
},
"articleCustomsInfo": [
{
"line": "1",
"unitValue": "11.23",
"countryOfOrigin": "NL",
"quantity": "3",
"grossWeight": "1.234",
"nettWeight": "0.987",
"weightUom": "KG",
"commodityCode": "62034240",
"goodsDescription": "Jeans Boys Size M A01",
"sku": "11111111"
}
]
}
]
}