Skip to content

Editing a vehicle offer

Description

Using this method, you can edit a vehicle offer.

URL structure

PUT /v2/proposals/my/lorry/{status}/{id}

List of parameters

Name Description Parameter transfer type Required(+)/Default(значение)
language Localization language. Usage details. Query string parameter ru
status Enumeration "Offer status". The status specifies ID. For example, if the offer was published, some other status will display a "Not found" error. Path parameter +
id Offer id. Path parameter +
publishDate Date of publication of the offer, timestamp. If the status parameter do not have the "prepared" value, the publishDate value will be ignored. Request body parameter
contactId ID of user's subordinate contact. Request body parameter
dateFrom Loading date, "yyyy-MM-dd". Request body parameter
dateTo Unloading date, "yyyy-MM-dd". Request body parameter
paymentPrice Delivery price. Request body parameter
paymentCurrencyId Currency id from the Directory. Request body parameter
paymentUnitId Payment unit id from the Directory. Request body parameter
paymentTypeId Payment type id from the Directory. Request body parameter
paymentMomentId Payment moment id from the Directory. Request body parameter
paymentPrepay Percentage of prepayment of the total cost. Request body parameter
paymentDelay Deferred payment, days. Request body parameter
paymentVat VAT, if any. Request body parameter
bodyTypeId Truck type id from the Directory. Request body parameter
bodyGroupId ID of a group of truck types from the Directory. Request body parameter
refrigeratorRegime Temperature range. Request body parameter
refrigeratorRegimeFrom Temperature range from. Request body parameter
refrigeratorRegimeTo Temperature range to. Request body parameter
loadTypes Array of loading type ids from the Directory. Request body parameter
adr ADR class. Request body parameter
cmr CMR consignment note. Request body parameter
cmrInsurance CMR insurance. Request body parameter
groupage LTL shipment option. Request body parameter
t1 T1 transit declaration. Request body parameter
tir TIR Carnet. Request body parameter
lorryAmount Required number of vehicles. Request body parameter
note Note. Request body parameter
autoparkId The id of one of the vehicle fleet objects that the user wants to associate with this offer. If this parameter is specified, then the following offer parameters will be taken from the corresponding vehicle fleet object: bodyTypeId, bodyGroupId, loadTypes, adr, cmr, t1, tir ekmt, trailer, and all parameters beginning with size-. Request body parameter
ekmt CEMT. Request body parameter
trailer Trailer indicator. If you want to specify any parameters of the trailer (begin with sizeTrailer-), specify this parameter. Request body parameter
sizeBodyMass Body payload capacity. Request body parameter
sizeBodyVolume Body volume. Request body parameter
sizeBodyLength Body length. Request body parameter
sizeBodyWidth Body width. Request body parameter
sizeBodyHeight Body height. Request body parameter
sizeTrailerMass Trailer payload capacity. Request body parameter
sizeTrailerVolume Trailer volume. Request body parameter
sizeTrailerLength Trailer length. Request body parameter
sizeTrailerWidth Trailer width. Request body parameter
sizeTrailerHeight Trailer height. Request body parameter
waypointListSource Collection locations, array of "Collection location in requests" structures. The array cannot be empty. Request body parameter
waypointListTarget Delivery locations, array of "Collection location in requests" structures. The array cannot be empty. Request body parameter

Note:

If any parameter of the offer does not need changing, do not include it in the request;

Results

Successful result

Structure "Successful result".

Results with errors

Validation error

Structure "Offer validation error".

Error with the code

Structure "Error with the code"

Sample request

BASH
curl -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: 3WQ1EQ465C4005000130" \
"https://api.lardi-trans.com/v2/proposals/my/lorry/published/350203659" \
-d '{
    "dateFrom": "2021-08-25",
    "dateTo": "2021-08-27",
    "loadTypes": [
        24,
        25
    ],
    "note": "",
    "cmr": false,
    "sizeBodyMass": 19,
    "sizeBodyVolume": 0,
    "waypointListSource": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 23,
            "townId": 137
        }
    ],
    "waypointListTarget": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 34,
            "townId": 69
        }
    ]
}'

Sample response

{
    "result": "OK"
}