Update existing order with order conditions

Description

This method allows you to update the automatically created order from the accepted freight with order conditions:
– loads
– payment deadline
– monitoring requirement

After such operation carrier will be able to accept order conditions.


Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • Endpoint: /ext/orders-api/v1/orders/:orderId
  • Method: PATCH

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.


Update order request

Example of request for update order.

{
    "freight": {
        "loads": []
    },
    "payment": {
        "days": 30
    },
    "monitoring": {
        "required": true
    }
}

Response

Confirmation of properly updated order.

{
    "additional_terms": null,
    "archived_at": null,
    "attachments": [],
    "can_archive": false,
    "cancellation": null,
    "created_at": "2021-06-21T10:10:14.366Z",
    "driver": null,
    "freight": {
        "carrier": {
            "assignee": {
                "account_id": 759284,
                "email": "test@trans.eu",
                "family_name": "Testowy",
                "fax": null,
                "given_name": "Jan",
                "telephone": "0048 111111111",
                "trans_id": "1111111-1"
            },
            "legal_name": "Firma Testowa Przewoźnik IIT 2",
            "vat_id": "4574663803"
        },
        "id": "3aaae5e8-b313-4dad-bd8d-153143e22da7",
        "reference_number": "FR/2021/06/21/C7Z1",
        "shipper": {
            "assignee": {
                "account_id": 749989,
                "email": "test@trans.eu",
                "family_name": "Testowy2",
                "fax": null,
                "given_name": "Jan",
                "telephone": "0048 111111111",
                "trans_id": "1111111-1"
            },
            "legal_name": "Firma Testowa Spedycja IIT",
            "vat_id": "11111111111"
        },
        "spots": [
            {
                "description": null,
                "name": null,
                "operations": [
                    {
                        "loads": [],
                        "operation_order": 1,
                        "time_window": null,
                        "time_window_reason": null,
                        "timespans": {
                            "begin": "2021-06-24T10:08:49.000Z",
                            "end": "2021-06-24T12:08:49.000Z"
                        },
                        "type": "loading"
                    }
                ],
                "place": {
                    "address": {
                        "country": "pl",
                        "description": null,
                        "locality": "WROCŁAW",
                        "number": null,
                        "postal_code": "12345",
                        "street": null
                    },
                    "coordinates": null
                },
                "spot_order": 1
            },
            {
                "description": null,
                "name": null,
                "operations": [
                    {
                        "loads": [],
                        "operation_order": 1,
                        "time_window": null,
                        "time_window_reason": null,
                        "timespans": {
                            "begin": "2021-06-27T10:08:49.000Z",
                            "end": "2021-06-27T12:08:49.000Z"
                        },
                        "type": "unloading"
                    }
                ],
                "place": {
                    "address": {
                        "country": "de",
                        "description": null,
                        "locality": "WARSZAWA",
                        "number": null,
                        "postal_code": "09876",
                        "street": null
                    },
                    "coordinates": null
                },
                "spot_order": 2
            }
        ]
    },
    "id": "3aaae5e8-b313-4dad-bd8d-153143e22da7",
    "invoice": null,
    "is_archived_permanently": false,
    "legacy_freight_id": 781167,
    "monitoring": {
        "providers": [],
        "required": true
    },
    "number": "2021/06/21/8",
    "payment": {
        "days": 60,
        "period": "deferred",
        "price": {
            "currency": "eur",
            "type": "route",
            "value": 110
        }
    },
    "related": [],
    "source": null,
    "status": {
        "comment": null,
        "value": "proposal-waiting"
    },
    "vehicle": null
}