Skip to content

Creating a tender

Description

Using this method, you can add your own tender.

URL structure

POST /v2/tender

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 parameter
tender Identity of the tender. "Tender" structure Request body parameter +

Results

Structure "Response to a tender creating request".

Results with errors

Validation error

Structure "Tender validation error".

Error with the code

Structure "Error with the code".

Sample request

BASH
curl --location --request POST 'http://localhost:8081/v2/tender' \
--header 'Authorization: 2UL4BXx01wU000000025' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "BIDS",
    "cargoHeight": 0,
    "cargoId": 0,
    "cargoLength": 0,
    "cargoName": "Name",
    "cargoPhotos": [
        "string"
    ],
    "cargoVolume": 0,
    "cargoWeight": 10,
    "cargoWidth": 0,
    "dateLoad": Date.now() + (1 * 1 * 16 * 60 * 1000),
    "description": "string",
    "directionFrom": {
        "address": "string",
        "lat": 0.3,
        "lon": 0.5,
        "townId": 933
    },
    "directionTo": {
        "address_": "string",
        "lat": 0.8,
        "lon": 0,
        "townId": 255
    },
    "documents": [
        "string"
    ],
    "paymentBidStep": 20,
    "paymentCurrencyId": 2,
    "paymentFormId": 0,
    "paymentValue": 100,
    "paymentVat": true,
    "tenderEnd": Date.now() + (1 * 1 * 16 * 60 * 1000),
    "tenderStart": Date.now() + (1 * 1 * 1 * 60 * 1000),
    "truckBodyType": 69,
    "truckBodyTypeGroup": 2,
    "truckCount": 0,
    "truckLoadTypes": [
        "top"
    ],
    "truckPeriodicity": 0
    }'

Sample response

JSON
  {
    "id": 51,
    "dateCreate": 1651656219000,
    "dateEdit": 1651656219000,
    "type": "BIDS",
    "status": "PREPARED",
    "tenderStatusDate": 1651656219000,
    "tenderStatusReason": "",
    "tenderVerificationStart": null,
    "tenderVerificationEnd": null,
    "dateLoad": 1651622400000,
    "tenderStart": 1651656279000,
    "tenderEnd": 1651657179000,
    "directionFrom": {
      "countrySign": {
        "id": 1,
        "name": "Украина",
        "sign": "UA"
      },
      "area": null,
      "town": {
        "id": 933,
        "name": "Милан"
      },
      "name": "Милан",
      "postCode": "",
      "address": "string",
      "lat": 0.3,
      "lon": 0.5
    },
    "directionTo": {
      "countrySign": {
        "id": 1,
        "name": "Украина",
        "sign": "UA"
      },
      "area": {
        "id": 130,
        "name": "Гродненская обл."
      },
      "town": {
        "id": 255,
        "name": "Ошмяны"
      },
      "name": "Ошмяны",
      "postCode": "23",
      "address": "",
      "lat": 0.8,
      "lon": 0.0
    },
    "distance": {
      "value": 0.0,
      "time": 0
    },
    "cargo": {
      "content": {
        "id": 0,
        "name": "name"
      },
      "length": 0.00,
      "width": 0.00,
      "height": 0.00,
      "weight": 10.000,
      "volume": 0.000,
      "photos": [
        "string"
      ]
    },
    "truck": {
      "bodyType": {
        "id": 69,
        "name": "truck"
      },
      "bodyTypeGroup": {
        "id": 2,
        "name": "Открытая"
      },
      "loadTypes": [
        {
          "id": 24,
          "name": "верхняя"
        }
      ],
      "count": 0,
      "periodicity": 0
    },
    "payment": {
      "value": 100.00,
      "bidStep": 10.00,
      "currencyId": {
        "id": 2,
        "name": "грн."
      },
      "formId": {
        "id": 2,
        "name": "нал."
      },
      "vat": true
    },
    "documents": [
      "string"
    ],
    "description": "string",
    "owner": {
      "refId": 10270310400,
      "ownershipType": "ENTREPRENEUR",
      "active": true,
      "deleted": false,
      "regDate": 1642067358000,
      "regProject": null,
      "firmCode": "4564564569",
      "lang": "RU",
      "contact": {
        "contactId": 0,
        "name": "Ivanov Ivan Ivanovich",
        "nameWithoutBrand": "Ivanov Ivan Ivanovich",
        "nameWithBrand": "Ivanov Ivan Ivanovich",
        "nameLang": "RU",
        "face": "Ivanov Ivan Ivanovich",
        "phoneItem1": {
          "phone": "+380(45)4564545",
          "messengerTypes": []
        },
        "phoneItem2": {
          "phone": "",
          "messengerTypes": []
        },
        "phoneItem3": {
          "phone": "",
          "messengerTypes": []
        },
        "phoneItem4": {
          "phone": "",
          "messengerTypes": []
        },
        "skype": "",
        "email": "gmai@gmail.test",
        "avatarUrls": {
          "url40x40": null,
          "url100x100": null
        },
        "logoUrls": {
          "url40x40": null,
          "url60x60": null,
          "url72x72": null,
          "url100x100": null,
          "url170x132": null,
          "url340x340": null
        }
      },
      "address": {
        "town": {
          "id": 69,
          "name": "Харьков"
        },
        "country": {
          "id": 1,
          "name": "Украина",
          "sign": "UA"
        },
        "area": {
          "id": 34,
          "name": "Харьковская обл."
        }
      },
      "rating": {
        "goodResponseCount": 0,
        "badResponseCount": 0,
        "ball": 0.0
      },
      "flags": {
        "premium": false,
        "shipper": false,
        "carrier": false,
        "carrierGps": false,
        "approvedProfile": false,
        "approvedContacts": false,
        "topBrand": false,
        "vip": false,
        "lardiClient": true,
        "autoRepeat": true,
        "hideAds": false
      }
    },
    "bidSummary": {
      "best": null,
      "worst": null,
      "total": 0,
      "winner": null
    }
  }