Generate a warehouse announcement as a carrier

Descrip­tion of cre­at­ing a ware­house announce­ment as a car­ri­er who pos­sess­es a pur­chase order num­ber

Scenario

  • Car­ri­er and ship­per are both present on Trans.eu plat­form
  • Shipper’s Pur­chase Order Num­ber is stored in Carrier’s exter­nal TMS/ERP and can be sent via API
  • A time win­dow has been assigned to the Car­ri­er by the Ship­per in the Sched­ules mod­ule

Authorize access

Before it is pos­si­ble to send any request, user needs to autho­rize access.

  • client app was reg­is­tered using reg­is­tra­tion form
  • exter­nal app was grant­ed api keys (client_id and client_secret)
  • autho­riza­tion process has been imple­ment­ed in exter­nal app

Step 1 — Filter out Time Windows to find proper timeWindowId

Each time win­dow con­sists of a timeWin­dowId, which is required to find the prop­er time slot for sched­ul­ing a ware­house announce­ment. Using the “search” query para­me­ter, it is pos­si­ble to nar­row the search result to a time win­dow con­tain­ing a spe­cif­ic pur­chase order num­ber.

Endpoint

GET https://api.platform.trans.eu/dock-scheduler-api/v1/warehouse/timeWindow

Example of use:

https://api.platform.trans.eu/dock-scheduler-api/v1/warehouse/timeWindow?filter={"search":"PO-API-999"}

Response:

{
    "content": [
        {
            "id": 114054,
            "status": "AVAILABLE",
            "route": {
                "loading_place": {
                    "coordinates": {
                        "latitude": 50.40502,
                        "longitude": 16.51226
                    },
                    "description": null,
                    "name": "10 minute warehouse",
                    "street": "Zdrojowa",
                    "number": "5",
                    "locality": "Polanica-Zdrój",
                    "postal_code": "57-320",
                    "country": "pl"
                },
                "unloading_place": {
                    "coordinates": {
                        "latitude": 37.984385,
                        "longitude": 23.727456
                    },
                    "description": null,
                    "name": "Ateny",
                    "street": null,
                    "number": null,
                    "locality": "Ateny",
                    "postal_code": null,
                    "country": "gr"
                }
            },
            "carrier": {
                "id": 1079413,
                "type": "REGISTERED",
                "subcontractor": null,
                "legal_name": "(P3DT) TFC Carrier Test"
            },
            "shipper": {
                "id": 1079411,
                "legal_name": "(P3DT) CargoON Test"
            },
            "warehouse": {
                "id": 23706,
                "name": "10 minute warehouse",
                "is_active": true,
                "is_locked": false,
                "address": {
                    "coordinates": {
                        "latitude": 50.40502,
                        "longitude": 16.51226
                    },
                    "street": "Zdrojowa",
                    "number": "5",
                    "locality": "Polanica-Zdrój",
                    "postal_code": "57-320",
                    "country": "pl",
                    "remarks": null,
                    "id": 23844
                },
                "operation_time": 10,
                "operation_type": "any",
                "time_zone": {
                    "id": "Europe/Warsaw",
                    "offset": "+02:00",
                    "offset_minutes": 120
                },
                "announcement_template": {
                    "id": 3807
                }
            },
            "remarks": null,
            "forward": null,
            "transport": null,
            "billable": false,
            "reference_number": "DS/F9DF9E5",
            "external_number": "REF-321777",
            "created_at": "2026-05-11T12:47:01",
            "valid_from": "2026-07-23",
            "valid_to": "2026-07-23",
            "start_time": "12:00:00",
            "end_time": "15:00:00",
            "range_type": "CYCLE",
            "is_expired": false,
            "operation_type": "loading",
            "operation_time": "PT10M",
            "freight_order": {
                "freight_id": null,
                "freight_reference_number": null,
                "publication_id": null,
                "order_id": null,
                "order_reference_number": null,
                "external_reference_number": null
            },
            "forward_permissions": {
                "allow": true,
                "disallow": null,
                "require_carrier_data": true
            },
            "purchase_order": {
                "id": 114054,
                "number": "PO-API-999"
            },
            "recurrence_config": null
        }
    ],
    "total_items": null,
    "offset": 0,
    "limit": 25,
    "last": true
}

Step 2 — Get list of available time windows

With the timeWin­dowId pro­vid­ed in the response:

{
    "content": [
        {
            "id": 114054,
...

as well as the valid­i­ty dates pro­vid­ed in the response:

            "valid_from": "2026-07-23",
            "valid_to": "2026-07-23",

it is now pos­si­ble to ver­i­fy avail­able time slots with­in this time win­dow.

Endpoint:

GET https://api.platform.trans.eu/ext/dock-scheduler-api/v2/time-window/{id}/possible

The valid­i­ty dates from the pre­vi­ous step must be sup­plied as the date_from and date_to query para­me­ters. The max­i­mum allowed peri­od between them is 3 days.

Example of use:

https://api.platform.trans.eu/ext/dock-scheduler-api/v2/time-window/{114054}/possible?date_from=07.23.2026&date_to=07.23.2026 

Response:

{
    "time_windows": {
        "0": {
            "2026-07-23": [
                {
                    "start_time": "12:00:00",
                    "end_time": "12:10:00",
                    "ramp_id": 28744
                },
                {
                    "start_time": "12:10:00",
                    "end_time": "12:20:00",
                    "ramp_id": 28744
                }
            ]
        },
        "28744": {
            "2026-07-23": [
                {
                    "start_time": "12:00:00",
                    "end_time": "12:10:00",
                    "ramp_id": 28744
                },
                {
                    "start_time": "12:10:00",
                    "end_time": "12:20:00",
                    "ramp_id": 28744
                }
            ]
        }
    },
    "ramps": {
        "28744": {
            "id": 28744,
            "is_locked": false,
            "is_active": true,
            "time_zone": "Europe/Warsaw",
            "operation_type": "any",
            "name": "Rampa 1",
            "ramp_type": "RAMP"
        }
    },
    "quantity": 2
}

Once it has been decid­ed which time slot is prefer­able, it is now pos­si­ble to add a ware­house book­ing as a car­ri­er.

For the full ref­er­ence of this method, see Get time slots with time win­dow id.

Step 3 — Create the announcement as a carrier

Once you have decid­ed which time slot is prefer­able, cre­ate the ware­house announce­ment.

Endpoint:

POST https://api.platform.trans.eu/ext/dock-scheduler-api/v2/announcement

The end­point requires the def­i­n­i­tion of the fol­low­ing in the request body:

  • Start date & time of the announce­ment (date_from)
  • End date & time of the announce­ment (date_to) — or, alter­na­tive­ly, the oper­a­tion time / dura­tion (operation_time)
  • Alter­na­tive­ly to the end date & time, it is pos­si­ble to add the oper­a­tion time (dura­tion) of the book­ing
  • Oper­a­tion type (operation_type) — allowed val­ues: load­ing, unload­ing (low­er­case)
  • timeWin­dowId

You can also add up to 25 addi­tion­al pur­chase order num­bers to the announce­ment as a car­ri­er.

Con­sol­i­dat­ing mul­ti­ple time win­dows and adding pur­chase orders: this end­point can com­bine sev­er­al time win­dows into one announce­ment and attach addi­tion­al pur­chase orders. The dis­tinc­tion between pur­chase orders car­ried in by a time win­dow and those passed in additional_purchase_orders, along with the val­i­da­tion rules for con­sol­i­da­tion, is doc­u­ment­ed in full in Add announce­ment with addi­tion­al pur­chase orders using time win­dow id.

Request body example:

{
  "additional_purchase_orders": [
    {
      "number": "PO-19960225420"
    }
  ],
  "date_from": "2026-07-23T12:00:00Z",
  "date_to": "2026-07-23T12:10:00Z",
  "operation_type": "loading",
  "time_windows": [
    {
      "id": 114054
    }
  ]
}

Response example:

{
    "id": 121723,
    "status": "INITIAL",
    "stage": null,
    "vehicle": null,
    "ramp": {
        "warehouse": {
            "id": 23706,
            "name": "10 minute warehouse",
            "configurations": [
                {
                    "slot": 10,
                    "id": 26210,
                    "valid_from": "2025-12-16",
                    "valid_until": null,
                    "quantity_of_slots": 1
                }
            ],
            "address": {
                "coordinates": {
                    "latitude": 50.40502,
                    "longitude": 16.51226
                },
                "street": "Zdrojowa",
                "number": "5",
                "locality": "Polanica-Zdrój",
                "postal_code": "57-320",
                "country": "pl",
                "remarks": null,
                "id": 23844
            },
            "is_active": true,
            "is_locked": false,
            "operation_type": "any",
            "slot": 10,
            "quantity_of_slots": 1,
            "time_zone": {
                "id": "Europe/Warsaw",
                "offset": "+02:00",
                "offset_minutes": 120
            },
            "rules_file_id": null,
            "rules_file_name": null,
            "rules_file_original_name": null
        },
        "id": 28744,
        "name": "Rampa 1",
        "is_active": true,
        "ramp_type": "RAMP",
        "is_locked": false,
        "operation_type": "any"
    },
    "carrier": {
        "id": 1079413,
        "telephone": "(0048) 6014338379",
        "email": "aromkowska3@trans.eu",
        "address": {
            "coordinates": null,
            "street": "Testowa 3",
            "locality": "Warszawa",
            "postal_code": "00-001",
            "country": "PL"
        },
        "type": "REGISTERED",
        "legal_name": "(P3DT) TFC Carrier Test"
    },
    "shipper": {
        "id": 1079411,
        "telephone": "(0048) 4253032299",
        "email": "test113@trans.eu",
        "address": {
            "coordinates": null,
            "street": "Szkoleniowa 1",
            "locality": "Poznań",
            "postal_code": "56-739",
            "country": "PL"
        },
        "legal_name": "(P3DT) CargoON Test"
    },
    "route": {
        "spots": [
            {
                "order": 1,
                "operations": [
                    {
                        "order": 1,
                        "operation_type": "loading",
                        "time_window_id": null
                    }
                ],
                "address": {
                    "coordinates": {
                        "latitude": 50.40502,
                        "longitude": 16.51226
                    },
                    "description": null,
                    "name": "10 minute warehouse",
                    "street": "Zdrojowa",
                    "number": "5",
                    "locality": "Polanica-Zdrój",
                    "postal_code": "57-320",
                    "country": "pl"
                }
            }
        ]
    },
    "forward": null,
    "transport": null,
    "date_from": "2026-07-23T12:00:00",
    "date_to": "2026-07-23T12:10:00",
    "operation_time": "PT10M",
    "operation_type": "loading",
    "driver": null,
    "second_driver": null,
    "reference_number": "DS/F9DF9E5/1",
    "template_parameters": [
        {
            "group": "VEHICLE",
            "name": "TRUCK_PLATE_NUMBER",
            "is_mandatory": true,
            "default_value": null
        },
        {
            "group": "VEHICLE",
            "name": "TRAILER_PLATE_NUMBER",
            "is_mandatory": false,
            "default_value": null
        },
        {
            "group": "DRIVER",
            "name": "DRIVER_NAME",
            "is_mandatory": true,
            "default_value": null
        },
        {
            "group": "WEIGHT",
            "name": "ENTRANCE_LEAVE_WEIGHTS",
            "is_mandatory": true,
            "default_value": null
        },
        {
            "group": "WEIGHT",
            "name": "CARGO_WEIGHT",
            "is_mandatory": true,
            "default_value": null
        }
    ],
    "external_reference_number": "REF-321777",
    "freight_order": null,
    "trans_task": null,
    "forward_permissions": {
        "allow": true,
        "disallow": null,
        "require_carrier_data": true
    },
    "time_windows": [
        []
    ],
    "additional_purchase_orders": [
        []
    ]
}