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 start date, "yyyy-MM-dd". Request body parameter
dateTo Loading date, "yyyy-MM-dd". Request body parameter
paymentValue Delivery price. Request body parameter +
paymentCurrencyId Currency id from the Directory. Request body parameter +
paymentUnitId Payment unit 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
bodyGroupId ID of a group of truck types from the Directory (deprecated). Request body parameter
transBodyTypeId Truck type id from the Directory. Request body parameter
paymentForms[].id Payment type id from the Directory. Request body parameter
paymentForms[].vat VAT, if any. 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. Request body parameter
waypointListTarget Delivery locations, array of "Collection location in requests" structures. Request body parameter
transBodyTypeProperties Body characteristics, enumerated type. DOUBLE_DECK, JUMBO, MEGA Request body parameter
transBodyTypeCategory Vehicle category identifier from Directory. 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
    ],
    "paymentForms": [
        {
            "id": 10,
            "vat": true
        }
    ],
    "note": "",
    "cmr": false,
    "sizeBodyMass": 19,
    "sizeBodyVolume": 0,
    "waypointListSource": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 23,
            "townId": 137
        }
    ],
    "waypointListTarget": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 34,
            "townId": 69
        }
    ],
    "transBodyTypeProperties": [
        "MEGA", "JUMBO"
    ],
    "transBodyTypeCategory": 5        
}'

Sample response

{
    "result": "OK"
}