List of archived orders received

Allows to access list of received transport orders which have been already archived.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • Endpoint: /ext/orders-api/v1/archive-orders-received
  • Method: GET

Headers:

  • Content-type: application/json
  • Accept: application/json
  • Authorization: Bearer {access_token}
  • Api-key: {unique_app_api-key}

Authorization and access

Authorization process is described here. Each API request must also consist of unique Api-key obtained during application registration together with client_id and client_secret.

Order

Details of order parameters, data range and description can be found here.


Available filters

List of available filters

  • has attachments (?filter={“has_attachments”: true})
  • loading place postal code (?filter={“loading_place.postal_code”: {“$regex”: “5.*”}})
  • loading place city (?filter={“loading_place.locality”: “Wroclaw”})
  • loading place country (?filter={“loading_place.country”: {“$eq”: “PL”}})
  • loading place date (?filter={“loading_place.date”:{“$gte”: “2020-09-16T15:00:00.000Z”, “$lte”: “2020-12-31T15:00:00.000Z”}})
  • unloading place postal code (?filter={“unloading_place.postal_code”: {“$regex”: “53.*”}})
  • unloading place city (?filter={“unloading_place.locality”: {“$regex”: “Wro.*”}})
  • unloading place country (?filter={“unloading_place.country”: {“$eq”: “PL”}})
  • unloading place date (?filter={“unloading_place.date”:{“$gte”: “2020-09-16T15:00:00.000Z”}})

Sort by

  • number (?sortBy=number&order=asc)
  • creation date (?sortBy=created_at&order=asc)
  • archiving date (?sortBy=archived_at&order=desc)

Search

  • freight reference number (?search={“reference_number”:”FR/2021/03/08/IZO8″})

Paging

When calling GET method, page should be added as parameter in the URL, for example: https://api.platform.trans.eu/ext/orders-api/v1/archive-orders-created?page=4

Json example

List of orders containing one entity, each additional entity will repeat similar payload structure

{
"orders-archive": [
        {
            "archived_at": "2021-07-13T00:00:32.327Z",
            "attachments": [],
            "created_at": "2021-03-15T11:35:09.575Z",
            "driver": null,
            "freight": {
                "carrier": {
                    "assignee": null,
                   "legal_name": "Firma Testowa",
                   "vat_id": "11111111111"
                },
                "id": null,
                "reference_number": null,
                "shipper": {
                    "assignee": {
                        "account_id": 749989,
                       "family_name": "Kowalski",
                       "given_name": "Jan",
                        "trans_id": "1007374-1"
                    },
                   "legal_name": "Firma Testowa 2",
                   "vat_id": "22222222222"
                },
                "spots": [
                    {
                        "description": null,
                        "name": null,
                        "operations": [
                            {
                                "loads": [],
                                "operation_order": 1,
                                "time_window": null,
                                "time_window_reason": null,
                                "timespans": {
                                    "begin": "2021-03-18T11:35:07.000Z",
                                    "end": "2021-03-18T13:35:07.000Z"
                                },
                                "type": "loading"
                            }
                        ],
                        "place": {
                            "address": {
                                "country": "pl",
                                "description": null,
                                "locality": "Kraków",
                               "number": "12",
                                "postal_code": "31-008",
                                "street": "Stara"
                            },
                            "coordinates": {
                                "latitude": 50.06143,
                                "longitude": 19.93658
                            }
                        },
                        "spot_order": 1
                    },
                    {
                        "description": null,
                        "name": null,
                        "operations": [
                            {
                                "loads": [],
                                "operation_order": 1,
                                "time_window": null,
                                "time_window_reason": null,
                                "timespans": {
                                    "begin": "2021-03-21T11:35:07.000Z",
                                    "end": "2021-03-21T13:35:07.000Z"
                                },
                                "type": "unloading"
                            }
                        ],
                        "place": {
                            "address": {
                                "country": "pl",
                                "description": null,
                                "locality": "Dąbrowa Środkowa",
                                "number": "34",
                                "postal_code": "59-330",
                                "street": "Średnia"
                            },
                            "coordinates": {
                                "latitude": 51.41828,
                                "longitude": 16.33485
                            }
                        },
                        "spot_order": 2
                    }
                ]
            },
            "id": "5f569a07-19d7-4667-bed6-cefd4a3bb7a1",
            "invoice": null,
            "legacy_freight_id": null,
            "monitoring": {
                "providers": [],
                "required": true
            },
            "number": "2021/03/15/9",
            "payment": {
                "days": 365,
                "price": {
                    "currency": "eur",
                    "protected": false,
                    "type": "km",
                    "value": 100
                }
            },
            "source": null,
            "status": {
                "comment": null,
                "value": "archived"
            },
            "vehicle": null
       },
{/next order},
],
"page": 3,
   "page_count": 3
}