Skip to content

Creating a vehicle offer

Description

Using this method, you can add a new vehicle offer.

URL structure

POST /v2/proposals/my/add/lorry

List of parameters

Name Description Parameter transfer type Required(+)/Default(значение)
language Localization language. Usage details. Query string parameter ru
contactId ID of user's subordinate contact. Request body parameter
publishDate Date of publication of the offer, timestamp. If the date is specified, an offer will be created with the prepared status and transferred to published at the specified time. Up to this moment, the parameter can be changed. 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
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. 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 +
transBodyTypeProperties Body characteristics, enumerated type. DOUBLE_DECK, JUMBO, MEGA Request body parameter
transBodyTypeCategory Vehicle category identifier from Directory. Request body parameter

Results

Successful result

Structure "Response with ID".

Results with errors

Validation error

Structure "Offer validation error".

Error with the code

Structure "Error with the code"

Sample request

BASH
curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: 3WQ1EQ465C4005000130" \
"https://api.lardi-trans.com/v2/proposals/my/add/lorry" \
-d '{
    "dateFrom": "2021-08-27",
    "dateTo": "2021-08-30",
    "transBodyTypeId": 63,
    "bodyGroupId": 2,
    "loadTypes": [
        24,
        25,
        26,
        27
    ],
    "paymentForms": [
        {
            "id": 10,
            "vat": true
        }
    ],
    "adr": 3,
    "cmr": true,
    "cmrInsurance": true,
    "groupage": true,
    "t1": true,
    "tir": true,
    "lorryAmount": 2,
    "note": "some useful note",
    "paymentPrice": 1000,
    "paymentCurrencyId": 2,
    "paymentUnitId": 2,
    "paymentMomentId": 4,
    "paymentPrepay": 10,
    "paymentDelay": 5,
    "ekmt": true,
    "trailer": true,
    "sizeBodyMass": 20,
    "sizeBodyVolume": 40,
    "sizeBodyLength": 8,
    "sizeBodyWidth": 2.5,
    "sizeBodyHeight": 3,
    "sizeTrailerMass": 15,
    "sizeTrailerVolume": 32,
    "sizeTrailerLength": 8,
    "sizeTrailerWidth": 2.5,
    "sizeTrailerHeight": 3,
    "waypointListSource": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 23,
            "townId": 137
        }
    ],
    "waypointListTarget": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 34,
            "townId": 69
        }
    ],
    "transBodyTypeProperties": [
        "MEGA", "JUMBO"
    ],
    "transBodyTypeCategory": 5        
}'

Sample response

{
    "id": 298243420
}