Create or replace a shipment
Preview. Shipments is a first version.
Fields and endpoints can still change.
With one request you create a shipment and its deliveries, including the goods items.
You can also replace the shipment later with the same request.
This article lists all fields.
How shipments and deliveries work in general is in the article Shipments Overview.
Endpoints
| Method and path | What it does | Success |
POST {base-url}/api/shipments |
Creates a shipment with its deliveries. | 201 |
PUT {base-url}/api/shipments/{shipmentReferenceId} |
Replaces the shipment and its list of deliveries. | 200 |
Replace {base-url} with the URL of your product and environment:
| Product and environment | {base-url} |
| Stratech Shipment – Test | https://test-{prefix}.shipment-stratech.nl |
| Stratech Shipment – Production | https://{prefix}.stratechshipment.nl |
| Beurtvaartadres ShipmentManager – Test | https://{prefix}.accshipmentmanager.eu |
| Beurtvaartadres ShipmentManager – Production | https://{prefix}.shipmentmanager.eu |
[VERIFY: is {base-url} the same as for the other modules?]
Authentication is OAuth 2.0 with the scope erpservice, the same Client ID, Client Secret and token as for the other modules.
See the article Authentication (OAuth 2.0).
Send Content-Type: application/json.
Deliveries in the request
Each item in shipment.deliveries has a deliveryReferenceId and, optionally, a delivery object:
| Situation | POST | PUT |
New deliveryReferenceId |
Shipment creates the delivery from delivery. The object is required (otherwise HTTP 422). |
Same as POST. |
Existing deliveryReferenceId with delivery |
Shipment links the delivery and ignores the object. | Shipment replaces the data of the delivery with the object. |
Existing deliveryReferenceId without delivery |
Shipment links the delivery unchanged. | Shipment links the delivery unchanged. |
| Delivery of the shipment not in the request | – | Shipment removes it from the shipment. The delivery is not deleted. |
Replace with PUT
- PUT replaces the whole shipment.
An optional field you leave out becomes empty.
So always send the complete shipment. - The
shipmentReferenceIdin the body must be the same as in the URL. Otherwise you get HTTP 400.
Shipment and delivery data
Many fields exist on both levels, for example the consignee or the Incoterms.
Put the common data on the shipment.
Only send a field on the delivery when that delivery is different.
When both have a value, the value of the delivery wins.
Structure
{
"shipmentReferenceId": "ERP-SHP-1001",
"shipment": {
"shipmentNumber": "1001",
"consignor": { "code": "STRATECH" },
"deliveries": [
{
"deliveryReferenceId": "ERP-DEL-A",
"delivery": { "deliveryNumber": "A", "goodsItem": [ { "hsCode": "34025090" } ] }
}
]
}
}
How to read the tables
The column Req. shows what the API requires: ✓ means the request is rejected without the field.
Paths are relative to the object named above each table. [] means an array.
Request
| JSON field | Type | Req. | Description |
shipmentReferenceId |
string(250) |
✓ | Your technical reference of the shipment. Use it to find the shipment again, for example to replace it. |
shipment |
object |
✓ | The shipment. The tables below. |
Shipment
Path: shipment
General
| JSON field | Type | Req. | Description |
shipmentNumber |
string(100) |
✓ | Your shipment number. Must be unique. In Shipment: Referenties (References). |
userFullName |
string(100) |
Full name of the user who sends the shipment from your ERP. Does not need to be a user in Shipment. Used in the audit trail. | |
guarantorType |
string(4) |
Type of guarantee. Code list TC29. | |
isContainerShipment |
boolean |
true for a container shipment. In Shipment: Container. |
|
communicationLanguageAtDeparture |
string |
Language for communication at departure. Values: en, nl. In Shipment: Algemene gegevens (General details). |
|
destinationCountry |
string(2) |
Country of destination. 2 letters. Code list CL008. In Shipment: Bestemming (Destination). | |
bookingReferenceNumber |
string(35) |
Booking reference number. Needed to submit a Portbase MED. In Shipment: Referenties (References). | |
terminal |
string(15) |
Terminal (e-Balie). In Shipment: Bestemming/Terminal (Destination/Terminal). | |
exitOfficeCode |
string(8) |
Customs office of exit. In Shipment: Kantoren (Offices). | |
dateOfDispatch |
string |
Date of dispatch. Date, for example 2026-11-11. In Shipment: Planning. |
|
timeOfDispatch |
string |
Time of dispatch. Time, for example 15:40:54Z. |
|
totalGrossWeight |
number |
Total gross weight in kg. [VERIFY: unit] Up to 16 digits, of which 6 decimals. In Shipment: Waarden en maten (Values and measures). | |
divergentTotalPackagesAmount |
integer |
Total number of packages, when it differs from the sum of the goods items. [VERIFY] | |
deliveries[] |
object[] |
The deliveries. See Deliveries in the shipment below. Maximum 99 items. |
Afzender (Consignor)
Path: consignor.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the consignor in the address book. The consignor always comes from the address book; there is no one-time address. |
Geadresseerde (Consignee)
Path: consignee.
Send either code (address book) or oneTimeAddress, not both.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the consignee in the address book. | |
oneTimeAddress.name |
string(70) |
Name. | |
oneTimeAddress.streetName |
string(59) |
Street name. In a DVA declaration, street and house number together have at most 70 characters. | |
oneTimeAddress.streetNumber |
string(11) |
House number. | |
oneTimeAddress.postcode |
string(17) |
Postal code. | |
oneTimeAddress.city |
string(35) |
City. | |
oneTimeAddress.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeAddress.country.name |
string(46) |
Country name. | |
oneTimeAddress.eoriNumber |
string(17) |
EORI number. |
Vervoerder (Carrier)
Path: carrier.
Send either code (address book) or oneTimeAddress, not both.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the carrier in the address book. | |
oneTimeAddress.name |
string(182) |
Name. | |
oneTimeAddress.streetName |
string(65) |
Street name. | |
oneTimeAddress.streetNumber |
string(11) |
House number. | |
oneTimeAddress.postcode |
string(10) |
Postal code. | |
oneTimeAddress.city |
string(35) |
City. | |
oneTimeAddress.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeAddress.country.name |
string(46) |
Country name. | |
oneTimeAddress.eoriNumber |
string(17) |
EORI number. | |
oneTimeAddress.vatNumber |
string(14) |
VAT number. |
Zekerhedensteller (Guarantor)
Path: guarantor[]. Maximum 2 items.
Send either code (address book) or oneTimeAddress, not both.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the guarantor in the address book. | |
oneTimeAddress.name |
string(182) |
Name. | |
oneTimeAddress.streetName |
string(65) |
Street name. | |
oneTimeAddress.streetNumber |
string(11) |
House number. | |
oneTimeAddress.postcode |
string(10) |
Postal code. | |
oneTimeAddress.city |
string(50) |
City. | |
oneTimeAddress.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeAddress.country.name |
string(46) |
Country name. | |
oneTimeAddress.exciseNumber |
string(13) |
Excise number. | |
oneTimeAddress.vatNumber |
string(14) |
VAT number. |
Transportorganisator (Transport arranger)
Path: transportArranger.
Send either code (address book) or oneTimeAddress, not both.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the transport arranger in the address book. | |
oneTimeAddress.name |
string(182) |
Name. | |
oneTimeAddress.streetName |
string(65) |
Street name. | |
oneTimeAddress.streetNumber |
string(11) |
House number. | |
oneTimeAddress.postcode |
string(10) |
Postal code. | |
oneTimeAddress.city |
string(50) |
City. | |
oneTimeAddress.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeAddress.country.name |
string(46) |
Country name. | |
oneTimeAddress.vatNumber |
string(14) |
VAT number. |
Leveringsvoorwaarden (Terms of delivery)
Path: termsOfDelivery.
| JSON field | Type | Req. | Description |
incoTerms.code |
string(3) |
Incoterms code. Exactly 3 characters. Code list CL090. | |
incoTerms.countryCode |
string(2) |
Country of the Incoterms place. 2 letters. Code list CL199. | |
incoTerms.place |
string(35) |
Incoterms place. | |
incoTerms.description |
string(512) |
Additional description. | |
paymentMethodCode |
string(1) |
Method of payment of the transport charges. 1 letter. Code list CL116. | |
transactionNatureCode |
string(2) |
Nature of transaction. 1 or 2 digits. Code list CL091. |
Vervoersdocumenten (Transport documents)
Path: transportDocuments[]. Maximum 99 items.
| JSON field | Type | Req. | Description |
type |
string(4) |
Type of transport document. Exactly 4 characters. Code list CL754. | |
identification |
string(70) |
Number of the transport document. |
Financiële gegevens (Financial data)
Path: financialData.
| JSON field | Type | Req. | Description |
amountToBeCoveredCurrency |
string(3) |
Currency of the amount to be covered. Exactly 3 characters. Code list CL352. | |
amountToBeCovered |
number |
Amount to be covered by the guarantee. Up to 16 digits, of which 2 decimals. | |
refundCurrency |
string(3) |
Currency of the refund amount. 3 letters. Code list CL352. | |
refundAmount |
number |
Refund amount. Up to 16 digits, of which 2 decimals. | |
totalInvoiceAmount |
number |
Total invoice amount. Up to 16 digits, of which 2 decimals. | |
totalInvoiceCurrency |
string(3) |
Currency of the total invoice amount. 3 letters. Code list CL352. |
Container
Path: transportEquipment[]. Maximum 99 items.
| JSON field | Type | Req. | Description |
sequenceNumber |
integer |
✓ | Sequence number of the container. Goods items refer to it. 0 to 99. |
containerNumber |
string(17) |
Container number. | |
seals[].sealNumber |
string(20) |
Seal number. | |
carrierType |
string(2) |
Carrier type (e-Balie). 2 letters. Code list: Ebalie codetable CarrierType. | |
transportType |
string(500) |
Type of transport equipment. Used for NVWA. | |
equipmentGrossWeight |
number |
Gross weight of the container. Up to 8 digits, of which 3 decimals. |
Transportgegevens (Transport details)
Path: departureTransportMeans.
| JSON field | Type | Req. | Description |
transportModeCode |
string(1) |
Mode of transport at departure. 1 digit. Code list CL018. | |
transportIdentity[].type |
string(2) |
✓ | Type of identification of the means of transport. 2 digits. Code list CL750. |
transportIdentity[].identification |
string(35) |
✓ | Identity of the means of transport, for example the licence plate. |
transportIdentity[].nationality |
string(2) |
✓ | Nationality of the means of transport. 2 letters. Code list CL165. |
Grensoverschrijdend (Border)
Path: borderTransportMeans.
| JSON field | Type | Req. | Description |
transportModeCode |
string(1) |
Mode of transport at the border. 1 digit. Code list CL018. | |
transportIdentity.type |
string(2) |
Type of identification of the means of transport at the border. 2 digits. Code list CL750. | |
transportIdentity.identification |
string(35) |
Identity of the means of transport at the border. | |
transportIdentity.nationality |
string(2) |
Nationality of the means of transport at the border. 2 letters. Code list CL165. |
Route
Path: route[]. Maximum 99 items.
| JSON field | Type | Req. | Description |
countryCode |
string(2) |
✓ | Country of routing, in the order of the route. 2 letters. Code list CL008. |
Locatie van de goederen (Location of the goods)
Path: goodsLocation.
| JSON field | Type | Req. | Description |
locationCode |
string(80) |
Code of a location of the consignor in the address book. | |
provinceName |
string(10) |
Province. Used for NVWA. |
Plaats van laden (Place of loading)
Path: placeOfLoading.
| JSON field | Type | Req. | Description |
unLoccode |
string(17) |
UN/LOCODE of the place of loading. Code list CL244. |
Plaats van verzending (Place of dispatch)
Path: placeOfDispatch.
| JSON field | Type | Req. | Description |
locationCode |
string(80) |
✓ | Code of a location of the consignor in the address book. |
Plaats van levering (Place of delivery)
Path: deliveryPlace.
Send either locationCode (address book) or oneTimeLocation, not both.
| JSON field | Type | Req. | Description |
locationCode |
string(80) |
Code of a location of the consignee in the address book. | |
oneTimeLocation.name |
string(182) |
Name. | |
oneTimeLocation.streetName |
string(65) |
Street name. | |
oneTimeLocation.streetNumber |
string(11) |
House number. | |
oneTimeLocation.postcode |
string(10) |
Postal code. | |
oneTimeLocation.city |
string(50) |
City. | |
oneTimeLocation.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeLocation.country.name |
string(46) |
Country name. | |
oneTimeLocation.exciseNumber |
string(13) |
Excise number. Format: ^[A-Z]{2}[a-zA-Z0-9]{11}$. |
|
oneTimeLocation.identificationNumber |
string(16) |
Identification number. |
Deliveries in the shipment
Path: shipment.deliveries[]. Maximum 99 items.
| JSON field | Type | Req. | Description |
deliveryReferenceId |
string(250) |
✓ | Your technical reference of the delivery. |
delivery |
object |
The data of the delivery. Required for a new delivery. See Deliveries in the request above. |
Delivery
Path: shipment.deliveries[].delivery
A delivery in a shipment has no userFullName: that is on the shipment.
Containers are defined on the shipment; the delivery only refers to them with transportEquipment[].sequenceNumber.
General
| JSON field | Type | Req. | Description |
deliveryNumber |
string(100) |
✓ | Your delivery number. Must be unique. In Shipment: Referenties (References). |
guarantorType |
string(4) |
Type of guarantee. Code list TC29. | |
isContainerShipment |
boolean |
true for a container shipment. |
|
dateOfDispatch |
string |
Date of dispatch. Date, for example 2026-11-11. In Shipment: Planning. |
|
timeOfDispatch |
string |
Time of dispatch. Time, for example 15:40:54Z. |
|
bookingReferenceNumber |
string(35) |
Booking reference number. In Shipment: Referenties (References). | |
totalGrossWeight |
number |
Total gross weight in kg. [VERIFY: unit] Up to 16 digits, of which 6 decimals. | |
divergentTotalPackagesAmount |
integer |
Total number of packages, when it differs from the sum of the goods items. [VERIFY] | |
goodsItem[] |
object[] |
Goods items of the delivery. All fields are in the article Goods items. Maximum 999 items. |
Afzender (Consignor)
Path: consignor.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the consignor in the address book. The consignor always comes from the address book; there is no one-time address. |
Geadresseerde (Consignee)
Path: consignee.
Send either code (address book) or oneTimeAddress, not both.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the consignee in the address book. | |
oneTimeAddress.name |
string(70) |
Name. | |
oneTimeAddress.streetName |
string(59) |
Street name. In a DVA declaration, street and house number together have at most 70 characters. | |
oneTimeAddress.streetNumber |
string(11) |
House number. | |
oneTimeAddress.postcode |
string(17) |
Postal code. | |
oneTimeAddress.city |
string(35) |
City. | |
oneTimeAddress.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeAddress.country.name |
string(46) |
Country name. | |
oneTimeAddress.eoriNumber |
string(17) |
EORI number. |
Vervoerder (Carrier)
Path: carrier.
Send either code (address book) or oneTimeAddress, not both.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the carrier in the address book. | |
oneTimeAddress.name |
string(182) |
Name. | |
oneTimeAddress.streetName |
string(65) |
Street name. | |
oneTimeAddress.streetNumber |
string(11) |
House number. | |
oneTimeAddress.postcode |
string(10) |
Postal code. | |
oneTimeAddress.city |
string(35) |
City. | |
oneTimeAddress.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeAddress.country.name |
string(46) |
Country name. | |
oneTimeAddress.eoriNumber |
string(17) |
EORI number. | |
oneTimeAddress.vatNumber |
string(14) |
VAT number. |
Zekerhedensteller (Guarantor)
Path: guarantor[]. Maximum 2 items.
Send either code (address book) or oneTimeAddress, not both.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the guarantor in the address book. | |
oneTimeAddress.name |
string(182) |
Name. | |
oneTimeAddress.streetName |
string(65) |
Street name. | |
oneTimeAddress.streetNumber |
string(11) |
House number. | |
oneTimeAddress.postcode |
string(10) |
Postal code. | |
oneTimeAddress.city |
string(50) |
City. | |
oneTimeAddress.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeAddress.country.name |
string(46) |
Country name. | |
oneTimeAddress.exciseNumber |
string(13) |
Excise number. | |
oneTimeAddress.vatNumber |
string(14) |
VAT number. |
Transportorganisator (Transport arranger)
Path: transportArranger.
Send either code (address book) or oneTimeAddress, not both.
| JSON field | Type | Req. | Description |
code |
string(100) |
Code of the transport arranger in the address book. | |
oneTimeAddress.name |
string(182) |
Name. | |
oneTimeAddress.streetName |
string(65) |
Street name. | |
oneTimeAddress.streetNumber |
string(11) |
House number. | |
oneTimeAddress.postcode |
string(10) |
Postal code. | |
oneTimeAddress.city |
string(50) |
City. | |
oneTimeAddress.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeAddress.country.name |
string(46) |
Country name. | |
oneTimeAddress.vatNumber |
string(14) |
VAT number. |
Leveringsvoorwaarden (Terms of delivery)
Path: termsOfDelivery.
| JSON field | Type | Req. | Description |
incoTerms.code |
string(3) |
Incoterms code. Exactly 3 characters. Code list CL090. | |
incoTerms.countryCode |
string(2) |
Country of the Incoterms place. 2 letters. Code list CL199. | |
incoTerms.place |
string(35) |
Incoterms place. | |
incoTerms.description |
string(512) |
Additional description. | |
paymentMethodCode |
string(1) |
Method of payment of the transport charges. 1 letter. Code list CL116. | |
transactionNatureCode |
string(2) |
Nature of transaction. 1 or 2 digits. Code list CL091. |
Vervoersdocumenten (Transport documents)
Path: transportDocuments[]. Maximum 99 items.
| JSON field | Type | Req. | Description |
type |
string(4) |
Type of transport document. Exactly 4 characters. Code list CL754. | |
identification |
string(70) |
Number of the transport document. |
Financiële gegevens (Financial data)
Path: financialData.
| JSON field | Type | Req. | Description |
amountToBeCoveredCurrency |
string(3) |
Currency of the amount to be covered. Exactly 3 characters. Code list CL352. | |
amountToBeCovered |
number |
Amount to be covered by the guarantee. Up to 16 digits, of which 2 decimals. | |
refundCurrency |
string(3) |
Currency of the refund amount. 3 letters. Code list CL352. | |
refundAmount |
number |
Refund amount. Up to 16 digits, of which 2 decimals. | |
totalInvoiceAmount |
number |
Total invoice amount. Up to 16 digits, of which 2 decimals. | |
totalInvoiceCurrency |
string(3) |
Currency of the total invoice amount. 3 letters. Code list CL352. | |
invoice[].invoiceNumber |
string(35) |
Invoice number. | |
invoice[].invoiceDate |
string |
Invoice date. Date and time, for example 2026-11-11T15:40:54Z. |
Container
Path: transportEquipment[]. Maximum 99 items.
| JSON field | Type | Req. | Description |
sequenceNumber |
integer |
✓ | Sequence number of a container on shipment level. 0 to 99. |
Transportgegevens (Transport details)
Path: departureTransportMeans.
| JSON field | Type | Req. | Description |
transportModeCode |
string(1) |
Mode of transport at departure. 1 digit. Code list CL018. | |
transportIdentity[].type |
string(2) |
✓ | Type of identification of the means of transport. 2 digits. Code list CL750. |
transportIdentity[].identification |
string(35) |
✓ | Identity of the means of transport, for example the licence plate. |
transportIdentity[].nationality |
string(2) |
✓ | Nationality of the means of transport. 2 letters. Code list CL165. |
Locatie van de goederen (Location of the goods)
Path: goodsLocation.
| JSON field | Type | Req. | Description |
locationCode |
string(80) |
Code of a location of the consignor in the address book. | |
provinceName |
string(10) |
Province. Used for NVWA. |
Plaats van laden (Place of loading)
Path: placeOfLoading.
| JSON field | Type | Req. | Description |
unLoccode |
string(17) |
UN/LOCODE of the place of loading. Code list CL244. |
Plaats van verzending (Place of dispatch)
Path: placeOfDispatch.
| JSON field | Type | Req. | Description |
locationCode |
string(80) |
✓ | Code of a location of the consignor in the address book. |
Plaats van levering (Place of delivery)
Path: deliveryPlace.
Send either locationCode (address book) or oneTimeLocation, not both.
| JSON field | Type | Req. | Description |
locationCode |
string(80) |
Code of a location of the consignee in the address book. | |
oneTimeLocation.name |
string(182) |
Name. | |
oneTimeLocation.streetName |
string(65) |
Street name. | |
oneTimeLocation.streetNumber |
string(11) |
House number. | |
oneTimeLocation.postcode |
string(10) |
Postal code. | |
oneTimeLocation.city |
string(50) |
City. | |
oneTimeLocation.country.code |
string(2) |
Country code. 2 letters. Code list CL248. | |
oneTimeLocation.country.name |
string(46) |
Country name. | |
oneTimeLocation.exciseNumber |
string(13) |
Excise number. Format: ^[A-Z]{2}[a-zA-Z0-9]{11}$. |
|
oneTimeLocation.identificationNumber |
string(16) |
Identification number. |
Response
The response has the shipmentReferenceId and one result per delivery in deliveries:
| Field | Description |
deliveries[].deliveryReferenceId |
Reference of the delivery. |
deliveries[].result |
created: Shipment created a new delivery. updated: Shipment replaced the data of an existing delivery (PUT only). linked: Shipment linked an existing delivery without changing its data. |
unlinkedDeliveryReferenceIds |
PUT only. Deliveries that Shipment removed from the shipment. Shipment does not delete them. |
{
"shipmentReferenceId": "ERP-SHP-1001",
"deliveries": [
{ "deliveryReferenceId": "ERP-DEL-A", "result": "created" },
{ "deliveryReferenceId": "ERP-DEL-B", "result": "linked" }
]
}
HTTP codes for POST
| HTTP code | Meaning |
201 |
Shipment created. |
400 |
Validation failed. |
401 |
Not authenticated. |
403 |
The token does not have the scope or role. |
409 |
shipmentReferenceId or shipmentNumber exists, deliveryNumber of a new delivery exists, or an existing delivery is in another shipment. |
422 |
A new deliveryReferenceId has no delivery object. |
HTTP codes for PUT
| HTTP code | Meaning |
200 |
Shipment replaced. |
400 |
Validation failed, or the body shipmentReferenceId is not equal to the path value. |
401 |
Not authenticated. |
403 |
The token does not have the scope or role. |
404 |
The shipment does not exist. |
409 |
shipmentNumber or deliveryNumber is used by another resource, or a delivery is in another shipment. |
422 |
A new deliveryReferenceId has no delivery object. |
Errors
Errors come back as problem details (RFC 9457) with Content-Type: application/problem+json. The field errors has the validation errors per field.
For errors about deliveries, deliveryReferenceIds lists the deliveries that caused the error.
{
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"shipment.shipmentNumber": ["The shipmentNumber field is required."]
}
}
[VERIFY: example error text]