Update existing order with order conditions

Description

This method allows you to update the auto­mat­i­cal­ly cre­at­ed order from the accept­ed freight with order con­di­tions:
- loads (can be send as emp­ty array)
- spots (is not required)
- pay­ment dead­line (required)
- mon­i­tor­ing require­ment (is not required)

After such oper­a­tion car­ri­er will be able to accept order con­di­tions.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/orders-api/v1/orders/{orderId}
  • Method: PATCH

Headers

  • Con­tent-type: application/json
  • Accept: application/json
  • Autho­riza­tion: Bear­er {access_token}
  • Api-key: {unique_ap­p_api-key}

Authorization and access

Autho­riza­tion process is described here.  Each API request must also con­sist of unique Api-key obtained dur­ing appli­ca­tion reg­is­tra­tion togeth­er with client_id and client_secret.

Update order request

Exam­ple of request for update order.

{
  "freight": {
    "loads": [],
    "spots": []
  },
  "additional_terms": "My additional terms",
  "payment": {
    "days": 30
  },
  "monitoring": {
    "required": true
  }
}

Response

Con­fir­ma­tion of prop­er­ly updat­ed 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
}