Skip to content

Creating a freight offer

Description

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

URL structure

POST /v2/proposals/my/add/cargo

List of parameters

Name Description Parameter transfer type Required(+)/Default(value)
language Localization language. Usage details. Query string parameter ru
contactId ID of user's subordinate contact. Request body parameter
publishDate Date of the offer publication, 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 end 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 time id from the Directory. Request body parameter
paymentPrepay Prepayment percentage 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
cargoBodyTypeIds Array of truck type IDs from the Directory. Request body parameter +
cargoPackaging[].id Cargo package id from the Directory. Request body parameter
cargoPackaging[].count Number of package. 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
contentName Arbitrary load name. Use this parameter if you cannot determine or get contentId. One of the two parameters: contentName, contentId - must be specified. Request body parameter
contentId Load name from the Directory. One of the two parameters: contentName, contentId - must be specified. Request body parameter
medicalRecords Medical records. Request body parameter
customsControl Whether the shipment is under customs control. Request body parameter
loadingFrequencyId Loading frequency id from the Directory. Request body parameter
sizeMass Load weight, t. Request body parameter +
sizeVolume Load volume, m3. Request body parameter
sizeLength Load length, m. Request body parameter
sizeWidth Load width, m. Request body parameter
sizeHeight Load height, m. 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 +
cargoBodyTypeProperties Body characteristics, enumerated type. DOUBLE_DECK, JUMBO, MEGA 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/cargo" \
-d '{
    "dateFrom": "2021-08-27",
    "dateTo": "2021-08-30",
    "contentId": 18,
    "cargoBodyTypeIds": [
        69,
        28,
        30,
        63
    ],
    "loadTypes": [
        24,
        25,
        26,
        27
    ],
    "paymentForms": [
        {
            "id": 10,
            "vat": true
        }
    ],
    "cargoPackaging": [
        {
            "id": 10,
            "count": 12
        }
    ],
    "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,
    "medicalRecords": true,
    "customsControl": true,
    "sizeMass": 24,
    "sizeVolume": 30,
    "sizeLength": 10.1,
    "sizeWidth": 2.5,
    "sizeHeight": 3,
    "waypointListSource": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 23,
            "townId": 137
        }
    ],
    "waypointListTarget": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 34,
            "townId": 69
        }
    ],
    "cargoBodyTypeProperties": [
        "MEGA", "JUMBO"
    ]        
}'

Sample response

{
    "id": 298243420
}