Rejecting offer of the participant in the freight negotiation process.
Both participants can still continue the negotiations.
The version and user ID parameters in the request body are optional, but it is recommended to provide them with correct values to ensure that the user who rejects the offer sees its latest version.
The offers-id identification number in request can be taken from the response of Get freight offer details request for publisher’s side or from Get freight proposal by id request for participant’s side of negotiations.
POST
/ext/freights-api/v1/freights/offers/{offer-id}/renouncement
Request Authorization
Every request MUST include a valid access token obtained during the user authorization process, provided using the Bearer token scheme in the Authorization header.
Successful Response
Error Response
Request Header
POST /ext/freights-api/v1/freights/offers/{offer-id}/renouncement HTTP/1.1
Host: api.platform.trans.eu
Content-Type: application/json
Accept: application/json
Authorization: Bearer {access_token)
Api-key: {unique_app_api-key}Request Parameters
| Attribute | Type | Example | Mandatory | Description |
| target_employee_id | String | 1002334–1 | No | User’s Trans ID. Designating a person whose offer is being rejected. |
| version | Int | 4 | No | Current negotiation asking version — the same as returned in Get freight offers list or Get freight offer details (for publisher’s side) or returned in Get freight proposal (for participant’s side) |
Example Request Body
{
"target_employee_id": "1013865-1",
"version": 4
}Response Fields
| Attribute | Type | Example | Description |
| negotiation_id | String | Negotiations id |
Response Body
{
"negotiation_id": "474325c3-c743-4c53-b986-157bce61ca6b"
}Client errors (code 400)
HTTP 4xx status codes indicate client errors, meaning that the request could not be processed due to an issue on the client side. Below is a list of request-specific errors.
Example error 1
Incorrect negotiations status for reject
{
"detail": "Active offer was not made by negotiation participant",
"status": 422,
"title": "Unprocessable Entity",
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}Example error 2
Negotiation have not started
{
"detail": "Initial offer can not be modified",
"status": 422,
"title": "Unprocessable Entity",
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}Example error 3
Incorrect offer-id
{
"detail": "Negotiation read model not found",
"status": 404,
"title": "Not Found",
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}