Overslaan naar inhoud
  • Er zijn geen suggesties want het zoekveld is leeg.

Shipment from existing deliveries

Preview. Shipments is a first version.
Fields and endpoints can still change.

Did you send the deliveries first? Then you can bundle them into a shipment with this request.
The request has only the shipment fields that do not exist on delivery level.
How shipments and deliveries work in general is in the article Shipments Overview.

Endpoint

Method and path What it does Success
POST {base-url}/api/shipments/by-deliveries Creates a shipment from existing deliveries. 201

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.

Rules

  • Every delivery in deliveryReferenceIds must exist.
    You create deliveries with the request in the article Deliveries.
  • A delivery can only be in one shipment.
  • Shipment checks all deliveries first.
    If one delivery is wrong, Shipment creates no shipment at all.
  • To change the shipment later, use PUT from the article Create or replace a shipment.

Structure

{
"shipmentReferenceId": "ERP-SHP-1002",
"shipment": {
"shipmentNumber": "1002",
"destinationCountry": "GB",
"deliveryReferenceIds": [ "ERP-DEL-B", "ERP-DEL-D" ]
}
}

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.
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.
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).
terminal string(15)   Terminal (e-Balie). In Shipment: Bestemming/Terminal (Destination/Terminal).
exitOfficeCode string(8)   Customs office of exit. In Shipment: Kantoren (Offices).
deliveryReferenceIds string(250)[] ✓ References of existing deliveries. Each delivery must exist and must not be in another shipment. No duplicates. Maximum 99 items.

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.

Response

The response is the same as for creating a shipment (see the article Create or replace a shipment).
Every delivery has the result linked.

HTTP code Meaning
201 Shipment created. Each delivery has result 'linked'.
400 Validation failed.
401 Not authenticated.
403 The token does not have the scope or role.
409 shipmentReferenceId or shipmentNumber exists, or a delivery is in another shipment (see deliveryReferenceIds).
422 One or more deliveries do not exist (see deliveryReferenceIds).

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]