Оферты

Создание одиночной оферты

post
Authorizations
Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Body
statusstring · enumRequired

В каком статусе создается оферта. На данный момент допускается только создание оферт в статусе не опубликовано (not_published)

Possible values:
typestring · enumRequired

Тип оферты (транспорт/груз). Также определяет требования для запроса

Possible values:
is_publicbooleanRequired

Оферта публикуется на публичной бирже

is_privatebooleanRequired

Оферта публикуется на приватной бирже

is_all_private_partnersbooleanOptional

Оферту в приватной бирже получат все партнеры компании-владельца. Поле отображается только в собственных офертах

private_partnersstring · UUID[]Optional

Идентификаторы компаний-партнеров, которые получат приватную оферту. Поле отображается только в собственных офертах

descriptionstringOptional

Дополнительное описание в оферте

transportation_requirementall ofOptional

Требования к транспортировке (только для грузовой оферты)

transportall ofOptional

Описание транспорта (только для транспортной оферты)

Responses
200
Успешное выполнение запроса
application/json
post
POST /public-api/v1/exchange/offer HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
Content-Length: 1127

{
  "status": "not_published",
  "type": "transport",
  "is_public": true,
  "is_private": true,
  "is_all_private_partners": true,
  "private_partners": [
    "text"
  ],
  "description": "text",
  "payment": {
    "quote_is_vat": true,
    "is_prepay": true,
    "bid_is_vat": true,
    "bid_is_no_vat": true,
    "bid_is_not_unique": true,
    "currency": "text",
    "payment_condition": "text",
    "payment_method": "text",
    "bid_mode": "text",
    "quote": 1,
    "extra_quote": 1,
    "quote_mileage": 1,
    "bid_auction_step": 1,
    "vat": 1,
    "mileage_format": "text",
    "prepay_percent": 1,
    "payment_period": 1,
    "bid_confirm_timeframe": 1
  },
  "route": [],
  "cargo_units": [],
  "transportation_requirement": {
    "is_trailer_interchange": true,
    "shipping_mode": "any",
    "type": "any",
    "body": [
      "curtainside"
    ],
    "equipment": [
      "text"
    ],
    "quantity": "text"
  },
  "transport": {
    "is_trailer_interchange": true,
    "type": "any",
    "temperature_min_c": 1,
    "temperature_max_c": 1,
    "available_weight": 1,
    "available_volume": 1,
    "length": 1,
    "width": 1,
    "height": 1,
    "shipping_mode": [
      "any"
    ],
    "adr_class": [
      "no"
    ],
    "body": [],
    "equipment": "text",
    "loading_type": [
      "rear"
    ]
  },
  "publication_lifetime": {
    "lifetime": 1,
    "is_first_bid": true
  },
  "bid_privacy": {
    "allow_view_bidder": true,
    "allow_view_quote": true,
    "allow_view_comment": true
  }
}
{
  "offer": {
    "id": "text",
    "name": "text",
    "type": "cargo",
    "status": "not_published",
    "creation_method": "manual",
    "is_public": true,
    "is_private": true,
    "is_public_duplicate": true,
    "is_partners_selection": true,
    "company_id": "text",
    "description": "text",
    "assignee_users": [],
    "is_autoclosed": true,
    "is_publication_autocanceled": true,
    "publication_autocancel_type": "text",
    "publication_autocancel_at": "Y-m-dTHH:mm:ss.SSSZ",
    "status_changed_at": "Y-m-dTHH:mm:ss.SSSZ",
    "published_at": "Y-m-dTHH:mm:ss.SSSZ",
    "closed_at": "Y-m-dTHH:mm:ss.SSSZ",
    "autoclose_at": "Y-m-dTHH:mm:ss.SSSZ",
    "is_all_private_partners": true,
    "private_partners": [
      "text"
    ],
    "payment": {
      "is_prepay": true,
      "currency": "text",
      "quote_is_vat": true,
      "quote": 1,
      "extra_quote": 1,
      "vat": 1,
      "quote_mileage": 1,
      "prepay_amount": 1,
      "prepay_percent": 1,
      "payment_period": 1,
      "mileage_format": "text",
      "payment_condition": "text",
      "payment_method": "text",
      "bid_mode": "text",
      "bid_is_vat": true,
      "bid_is_no_vat": true,
      "bid_auction_step": 1,
      "bid_is_auto_accept": true,
      "bid_is_not_unique": true,
      "bid_confirm_timeframe": 1,
      "allow_first_bid_no_step": true
    },
    "route": [],
    "route_way": {
      "total_length": 1,
      "total_dur": 1
    },
    "transportation_requirement": {
      "is_trailer_interchange": true,
      "shipping_mode": "any",
      "type": "any",
      "body": [
        "curtainside"
      ],
      "equipment": "text",
      "quantity": "text"
    },
    "cargo_units": [],
    "transport": {
      "is_trailer_interchange": true,
      "type": "any",
      "temperature_min_c": 1,
      "temperature_max_c": 1,
      "available_weight": 1,
      "available_volume": 1,
      "length": 1,
      "width": 1,
      "height": 1,
      "shipping_mode": [
        "any"
      ],
      "adr_class": [
        "no"
      ],
      "body": [],
      "equipment": "text",
      "loading_type": [
        "rear"
      ]
    },
    "publication_lifetime": {
      "is_first_bid": true,
      "lifetime": 1,
      "formatted_lifetime": "text",
      "is_late_bid_prolong": true,
      "prolong_step": 1,
      "formatted_prolong_step": "text",
      "prolong_times": 1
    },
    "bid_privacy": {
      "allow_view_bidder": true,
      "allow_view_quote": true,
      "allow_view_comment": true
    },
    "created_at": "Y-m-dTHH:mm:ss.SSSZ",
    "updated_at": "Y-m-dTHH:mm:ss.SSSZ"
  }
}

Метод создания оферты разрешает создание оферты только в статусе not_published. Чтобы опубликовать оферту на бирже, используйте метод обновления статуса одиночной оферты по уникальному индентификатору.

Обновление статуса одиночной оферты по уникальному идентификатору

patch
Authorizations
Path parameters
idstringRequired

Уникальный идентификатор оферты

Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Body
statusstringOptionalExample: not_published
Responses
200
Успешное выполнение запроса
application/json
Responseobject
patch
PATCH /public-api/v1/exchange/offer/{id}/status HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
Content-Length: 26

{
  "status": "not_published"
}
{}

Удаление одиночной оферты по уникальному идентификатору

delete
Authorizations
Path parameters
idstringRequired

Уникальный идентификатор оферты

Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Responses
204
Успешное выполнение запроса
delete
DELETE /public-api/v1/exchange/offer/{id} HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*

No content

Получение пагинированного списка входящих оферт в приватной бирже

get
Authorizations
Query parameters
limitinteger · min: 1 · max: 50Optional

Лимит количества оферт, выдаваемых за итерацию пагинации

Default: 25
offsetintegerOptional

Смещение пагинированной выборки оферт относительно ранее полученных

Default: 0
Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Responses
200
Успешное выполнение запроса
application/json
get
GET /public-api/v1/exchange/company/offers/incoming HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
{
  "total": 1,
  "count": 1,
  "offers": []
}

Получение пагинированного списка собственных оферт

get
Authorizations
Query parameters
limitinteger · min: 1 · max: 50Optional

Лимит количества оферт, выдаваемых за итерацию пагинации

Default: 25
offsetintegerOptional

Смещение пагинированной выборки оферт относительно ранее полученных

Default: 0
offers_statusstring · enumOptional

Выборка оферт определенного статуса (кроме удаленных)

Possible values:
offers_typestring · enumOptional

Выборка оферт определенного типа

Possible values:
Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Responses
200
Успешное выполнение запроса
application/json
get
GET /public-api/v1/exchange/company/offers HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
{
  "total": 1,
  "count": 1,
  "offers": []
}

Получение одиночной оферты по уникальному идентификатору

get
Authorizations
Path parameters
idstringRequired

Уникальный идентификатор оферты

Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Responses
200
Успешное выполнение запроса
application/json
get
GET /public-api/v1/exchange/offer/{id} HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
{
  "offer": {
    "id": "text",
    "name": "text",
    "type": "cargo",
    "status": "not_published",
    "creation_method": "manual",
    "is_public": true,
    "is_private": true,
    "is_public_duplicate": true,
    "is_partners_selection": true,
    "company_id": "text",
    "description": "text",
    "assignee_users": [],
    "is_autoclosed": true,
    "is_publication_autocanceled": true,
    "publication_autocancel_type": "text",
    "publication_autocancel_at": "Y-m-dTHH:mm:ss.SSSZ",
    "status_changed_at": "Y-m-dTHH:mm:ss.SSSZ",
    "published_at": "Y-m-dTHH:mm:ss.SSSZ",
    "closed_at": "Y-m-dTHH:mm:ss.SSSZ",
    "autoclose_at": "Y-m-dTHH:mm:ss.SSSZ",
    "is_all_private_partners": true,
    "private_partners": [
      "text"
    ],
    "payment": {
      "is_prepay": true,
      "currency": "text",
      "quote_is_vat": true,
      "quote": 1,
      "extra_quote": 1,
      "vat": 1,
      "quote_mileage": 1,
      "prepay_amount": 1,
      "prepay_percent": 1,
      "payment_period": 1,
      "mileage_format": "text",
      "payment_condition": "text",
      "payment_method": "text",
      "bid_mode": "text",
      "bid_is_vat": true,
      "bid_is_no_vat": true,
      "bid_auction_step": 1,
      "bid_is_auto_accept": true,
      "bid_is_not_unique": true,
      "bid_confirm_timeframe": 1,
      "allow_first_bid_no_step": true
    },
    "route": [],
    "route_way": {
      "total_length": 1,
      "total_dur": 1
    },
    "transportation_requirement": {
      "is_trailer_interchange": true,
      "shipping_mode": "any",
      "type": "any",
      "body": [
        "curtainside"
      ],
      "equipment": "text",
      "quantity": "text"
    },
    "cargo_units": [],
    "transport": {
      "is_trailer_interchange": true,
      "type": "any",
      "temperature_min_c": 1,
      "temperature_max_c": 1,
      "available_weight": 1,
      "available_volume": 1,
      "length": 1,
      "width": 1,
      "height": 1,
      "shipping_mode": [
        "any"
      ],
      "adr_class": [
        "no"
      ],
      "body": [],
      "equipment": "text",
      "loading_type": [
        "rear"
      ]
    },
    "publication_lifetime": {
      "is_first_bid": true,
      "lifetime": 1,
      "formatted_lifetime": "text",
      "is_late_bid_prolong": true,
      "prolong_step": 1,
      "formatted_prolong_step": "text",
      "prolong_times": 1
    },
    "bid_privacy": {
      "allow_view_bidder": true,
      "allow_view_quote": true,
      "allow_view_comment": true
    },
    "created_at": "Y-m-dTHH:mm:ss.SSSZ",
    "updated_at": "Y-m-dTHH:mm:ss.SSSZ"
  }
}

Last updated

Was this helpful?