Withdrawal of own offer in the freight negotiation process.
An offer may be withdrawn until a participant in the negotiations submits their own proposal.
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 withdraws 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}/withdraw
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}/withdraw 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 | 1013865–1 | No | User’s Trans ID. Designating a person whose offer is being withdrawn. |
| 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 | 474325c3-c743-4c53-b986-157bce61ca6b | Negotiation 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 withdraw
{
"detail": "Active offer was not made by negotiation owner",
"status": 422,
"title": "Unprocessable Entity",
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}Example error 2
Negotiation already finished
{
"detail": "Auction is already canceled",
"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"
}