REST API - Flex

The REST API supports creating Flex orders.
If an optional list of addresses is provided, address labels are created.
When succesfull an email will be send with the tender pdf and the optional address labels pdf.

Endpoint

/flex/order

Headers

A valid JWT token in the request is needed along with the version number to authenticate and authorize the request.
Replace ACCESS_TOKEN with a valid access token.

Authorization: Bearer ACCESS_TOKEN
Api-Version: 3.0
Content-Type: application/json

Create Order

Create a Flex order for the specified product.

Method: POST
Response: 200 OK

Order Request

Parameter Type Required Comment
ProductCode string Yes Code of the product. Can be obtained by the List Products endpoint
Quantity int Yes Quantity of the bulk
Weight int Yes Based on the weight type: The total weight of the bulk in grams or per piece in grams
WeightType int Yes 1 = Total weight, 2 = Weight per piece
Destination int Yes 1 = NL, 2 = Europe, 3 = World
SendDate date Yes Date when the bulk will be tendered at the carrier. Not in weekends and holidays.
CostCenter int No --
ReturnAddress Address Yes Single Address objects
Addresses Address No Array of multiple Address objects

Address

Field Type Required Comment
Company string No Company or Contact required
Contact string No Company or Contact required
Street string No Required for NL, BE, DE
Number string No --
NumberSuffix string No --
ExtraAddress string No --
ZipCode string Yes --
City string Yes --
CountryCode char Yes 2 letter ISO Code

Below you can find a request for creating a Flex order.

{
    "productCode": "2821",
    "quantity": 125,
    "weight": 58,
    "weightType": 2,
    "destination": 1,
    "sendDate": "2022-09-09",
    "costCenter": 1,
    "returnAddress":
    {
        "street": "Avelingen West",
        "number": "9",
        "zipCode": "4202MS",
        "city": "Gorinchem",
        "countryCode": "NL"
    }
}

Below you can find a request for creating a Flex order with addresses.

{
    "productCode": "2821",
    "quantity": 125,
    "weight": 58,
    "weightType": 2,
    "destination": 1,
    "sendDate": "2022-09-09",
    "returnAddress":
    {
        "street": "Avelingen West",
        "number": "9",
        "zipCode": "4202MS",
        "city": "Gorinchem",
        "countryCode": "NL"
    }
    "addresses": 
    [
        {
            "company": "Quadient Netherlands",
            "street": "Avelingen West",
            "number": "9",
            "numberSuffix": "A",
            "zipCode": "4202MS",
            "city": "Gorinchem",
            "countryCode": "NL"
        },
        {
            "contact": "Jan Janssen",
            "street": "Avelingen West",
            "number": "9",
            "extraAdrress": "Verdieping 2",
            "zipCode": "4202MS",
            "city": "Gorinchem",
            "countryCode": "NL"
        }
    ]
}

Order Response

The response format is a JSON body with http code 200 OK.
If an error occurred an Error response will be generated.

{
  "flexId": 10001
}