Allows to negotiate conditions of received offer

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • Endpoint: /ext/freights-api/v1/freights/offers/{offer-id}/negotiate
  • Method: PATCH

Headers:

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

Authorization

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.

For accessing freights API no additional scopes are set, therefore the scope parameter can be left empty.

Usage

Once the carrier response has been received it is possible to negotiate received conditions with own offer.

Each offer contains of:

Field Type Example Description
payment int 8 Id of offer
price Object Pricing conditions
price.currency string eur Currency of received offer
price.value int 1000 Price value
requirements string Additional requirements Requirements and conditions for the offer
version string 7 Valid thru
carrier_decision_date datetime 2020-04-24T08:24:36+02:00 Date and time for carrier to accept or reject the offer

 

Conditions:

  • currency must be the same as in published freight
  • version must be one greater than the received
  • carrier_decision_date must be greater than now

Json example:

{
  "payment": {
    "price": {
      "value": 200,
      "currency": "pln"
    }
  },
  "requirements": "some comment",
  "version": 7,
  "carrier_decision_date": "2019-12-13T13:38:18+02:00"
}