Skip to content

Editing a freight offer

Description

Using this method, you can edit a freight offer.

URL structure

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

List of parameters

Name Description Parameter transfer type Required(+)/Default(value)
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 Publication date 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 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. Request body parameter
waypointListTarget Delivery locations, array of "Collection location in requests" structures. Request body parameter
cargoBodyTypeProperties Body characteristics, enumerated type. DOUBLE_DECK, JUMBO, MEGA 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/cargo/published/350203659" \
-d '{
    "cargoBodyTypeIds": [
        69,
        28,
        30,
        63
    ],
    "loadTypes": [
        24,
        25
    ],
    "paymentForms": [
        {
            "id": 10,
            "vat": true
        }
    ],
    "cargoPackaging": [
        {
            "id": 10,
            "count": 12
        }
    ],
    "note": "",
    "cmr": false,
    "sizeMass": 19,
    "waypointListSource": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 23,
            "townId": 137
        }
    ],
    "waypointListTarget": [
        {
            "address": "уточнение адреса",
            "countrySign": "UA",
            "areaId": 34,
            "townId": 69
        }
    ],
    "cargoBodyTypeProperties": [
        "MEGA", "JUMBO"
    ]         
}'

Sample response

{
    "result": "OK"
}