List of archived orders created

Allows to access list of created 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-created
  • 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": "2020-08-10T10:42:34.669Z",
            "attachments": [],
            "created_at": "2019-09-06T09:33:10.865Z",
            "driver": {
                "account_id": 754221,
                "contact_phone": null,
                "family_name": "Kierowca",
                "full_name": "Test Kierowca",
                "given_name": "Test"
            },
            "freight": {
                "carrier": {
                    "assignee": {
                        "account_id": 749989,
                        "family_name": "Nowak",
                        "given_name": "Adam",
                        "trans_id": "1007374-1"
                    },
                    "legal_name": "Test company",
                    "vat_id": "PL11111111111"
                },
                "id": "24dc2802-5189-48f4-a0d8-6a7a1c4c0b1c",
                "reference_number": "FR/2019/09/06/0BSR",
                "shipper": {
                    "assignee": {
                        "account_id": 750005,
                        "family_name": "Kowalski",
                        "given_name": "Jan",
                        "trans_id": "1007386-1"
                    },
                    "legal_name": "Test shipper",
                    "vat_id": "PL22222222222"
                },
                "spots": [
                    {
                        "description": null,
                        "name": "Początek",
                        "operations": [
                            {
                                "loads": [],
                                "operation_order": 1,
                                "time_window": null,
                                "time_window_reason": null,
                                "timespans": {
                                    "begin": "2019-09-09T10:00:00.000Z",
                                    "end": "2019-09-09T10:00:00.000Z"
                                },
                                "type": "loading"
                            }
                        ],
                        "place": {
                            "address": {
                                "country": "pl",
                                "description": null,
                                "locality": "Mirosławiec",
                                "number": null,
                                "postal_code": "78-650",
                                "street": null
                            },
                            "coordinates": {
                                "latitude": 53.34071,
                                "longitude": 16.08793
                            }
                        },
                        "spot_order": 1
                    },
                    {
                        "description": null,
                        "name": "Koniec",
                        "operations": [
                            {
                                "loads": [],
                                "operation_order": 1,
                                "time_window": null,
                                "time_window_reason": null,
                                "timespans": {
                                    "begin": "2019-09-10T10:00:00.000Z",
                                    "end": "2019-09-10T10:00:00.000Z"
                                },
                                "type": "unloading"
                            }
                        ],
                        "place": {
                            "address": {
                                "country": "pl",
                                "description": null,
                                "locality": "Kołobrzeg",
                                "number": null,
                                "postal_code": "78-100",
                                "street": null
                            },
                            "coordinates": {
                                "latitude": 54.17565,
                                "longitude": 15.58342
                            }
                        },
                        "spot_order": 2
                    }
                ]
            },
            "id": "24dc2802-5189-48f4-a0d8-6a7a1c4c0b1c",
            "invoice": null,
            "legacy_freight_id": 208051,
            "monitoring": {
                "providers": [
                    "trans_task"
                ],
                "required": true
            },
            "number": "2019/09/06/17",
            "payment": {
                "days": 12,
                "price": {
                    "currency": "pln",
                    "protected": true,
                    "type": "route",
                    "value": 333
                }
            },
            "source": null,
            "status": {
                "comment": null,
                "value": "archived"
            },
            "vehicle": {
                "semi_trailer": null,
                "truck": {
                    "dispatcher_id": 22075,
                    "id": 219179,
                    "registration_plate_number": "PL1111111",
                    "revision": 2
                }
            }
        },

{/next order},
],

"page": 3,

    "page_count": 3

}