---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
vcsPath: motorway/magacg/support/docs/src/ru-x-ai/methods/post-api-bet-create-v1.md
alternate:
  - href: https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md
    type: text/markdown
    title: Markdown version
  - href: https://yamagistrali.ru/docs/ru-x-ai/llms.txt
    rel: describedby
---
<div class="openapi">

# Сделать ставку

<!-- markdownlint-disable-file -->

[Порядок работы для агента](https://yamagistrali.ru/docs/ru-x-ai/concepts/agent-workflow.md) · [Методы API и схема OpenAPI](https://yamagistrali.ru/docs/ru-x-ai/methods/index.md).

## Назначение

Передайте `data.demandId`, `data.executorId` и цену с валютой в `data.price`. Метод может сразу принять заказ, например при достижении цены выкупа, в режиме «кто первый» или при прямом назначении. Если такой исход возможен или условия торгов неизвестны, до вызова получите подтверждение готовности принять заказ за эту цену. Укажите исходную цену `base`, валюту `currency` и признак `data.price.isVatPayer`. Для плательщика заполните в цене `vatAmount` (сумма НДС) и `subTotalPrice` (итоговая цена с учётом НДС). Сохраните `data.id` и перечитайте заказ, чтобы отличить ставку от принятия заказа.

> Блоки запроса и ответов ниже сгенерированы из OpenAPI. Подстановки вроде `example` показывают структуру JSON. Для вызова возьмите значения из сценария, справочников или предыдущих ответов API.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://partner-test-yamagistrali.ru/api/bet/create/v1
```

</div>

Тестовый стенд

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "data": {
    "betMultimodal": {
      "isPriceByArc": true,
      "route": [
        {}
      ]
    },
    "comment": "example",
    "condition": "example",
    "demandId": "example",
    "executorId": "example",
    "extId": "example",
    "notVatPayer": true,
    "price": {
      "base": "100.18",
      "currency": "RUB",
      "isVatPayer": false,
      "subTotalPrice": "122.21",
      "vat": "22",
      "vatAmount": "22.03"
    },
    "tariffMatrix": {
      "tariffMatrixId": "example"
    },
    "useMultimodal": true,
    "useTariffMatrix": true
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_data_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [BetCreateV1Request](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-BetCreateV1Request)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "betMultimodal": {
    "isPriceByArc": true,
    "route": [
      {
        "addressFrom": "example",
        "addressTo": "example",
        "comment": "example",
        "price": {}
      }
    ]
  },
  "comment": "example",
  "condition": "example",
  "demandId": "example",
  "executorId": "example",
  "extId": "example",
  "notVatPayer": true,
  "price": null,
  "tariffMatrix": {
    "tariffMatrixId": "example"
  },
  "useMultimodal": true,
  "useTariffMatrix": true
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### TaxablePriceIO {#entity-TaxablePriceIO}

#|
|| **Name** | **Description** ||
||

_base_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string &#124; null

Цена исходная

_Pattern:_{.json-schema-reset .json-schema-assertion} `^[1-9][0-9]*(\.[0-9]*[1-9])?$`

_Example:_{.json-schema-reset .json-schema-example} `100.18`
{.table-cell}
||
||

_currency_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

ISO 4217 код валюты

_Example:_{.json-schema-reset .json-schema-example} `RUB`
{.table-cell}
||
||

_isVatPayer_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Признак плательщика НДС. Для плательщика укажите ставку vat или сумму vatAmount.

_Default:_{.json-schema-reset .json-schema-value} `false`
{.table-cell}
||
||

_subTotalPrice_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string &#124; null

Итоговая цена с учётом НДС

_Pattern:_{.json-schema-reset .json-schema-assertion} `^[1-9][0-9]*(\.[0-9]*[1-9])?$`

_Example:_{.json-schema-reset .json-schema-example} `122.21`
{.table-cell}
||
||

_vat_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string &#124; null

Ставка НДС (в % от 0 до 100)

_Pattern:_{.json-schema-reset .json-schema-assertion} `^[1-9][0-9]*(\.[0-9]*[1-9])?$`

_Example:_{.json-schema-reset .json-schema-example} `22`
{.table-cell}
||
||

_vatAmount_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string &#124; null

Сумма НДС (ВАЖНО может быть без указания ставки НДС!!!)

_Pattern:_{.json-schema-reset .json-schema-assertion} `^[1-9][0-9]*(\.[0-9]*[1-9])?$`

_Example:_{.json-schema-reset .json-schema-example} `22.03`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "base": "100.18",
  "currency": "RUB",
  "isVatPayer": false,
  "subTotalPrice": "122.21",
  "vat": "22",
  "vatAmount": "22.03"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### BetCreateV1BetMultimodalRoteArc {#entity-BetCreateV1BetMultimodalRoteArc}

#|
|| **Name** | **Description** ||
||

_addressFrom_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_addressTo_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_comment_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_price_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [TaxablePriceIO](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-TaxablePriceIO)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "base": "100.18",
  "currency": "RUB",
  "isVatPayer": false,
  "subTotalPrice": "122.21",
  "vat": "22",
  "vatAmount": "22.03"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "addressFrom": "example",
  "addressTo": "example",
  "comment": "example",
  "price": {
    "base": "100.18",
    "currency": "RUB",
    "isVatPayer": false,
    "subTotalPrice": "122.21",
    "vat": "22",
    "vatAmount": "22.03"
  }
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### BetCreateV1BetMultimodal {#entity-BetCreateV1BetMultimodal}

#|
|| **Name** | **Description** ||
||

_isPriceByArc_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_route_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [BetCreateV1BetMultimodalRoteArc](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-BetCreateV1BetMultimodalRoteArc)[] &#124; null

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "addressFrom": "example",
    "addressTo": "example",
    "comment": "example",
    "price": {
      "base": "100.18",
      "currency": "RUB",
      "isVatPayer": false,
      "subTotalPrice": "122.21",
      "vat": "22",
      "vatAmount": "22.03"
    }
  }
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "isPriceByArc": true,
  "route": [
    {
      "addressFrom": "example",
      "addressTo": "example",
      "comment": "example",
      "price": {
        "base": "100.18",
        "currency": "RUB",
        "isVatPayer": false,
        "subTotalPrice": "122.21",
        "vat": "22",
        "vatAmount": "22.03"
      }
    }
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### BetCreateV1TariffMatrix {#entity-BetCreateV1TariffMatrix}

#|
|| **Name** | **Description** ||
||

_tariffMatrixId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "tariffMatrixId": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### BetCreateV1Request {#entity-BetCreateV1Request}

#|
|| **Name** | **Description** ||
||

_comment_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_condition_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_demandId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_executorId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_extId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_notVatPayer_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_price_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [TaxablePriceIO](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-TaxablePriceIO)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "base": "100.18",
  "currency": "RUB",
  "isVatPayer": false,
  "subTotalPrice": "122.21",
  "vat": "22",
  "vatAmount": "22.03"
}
```

{% endcut %}
{.table-cell}
||
||

_useMultimodal_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_useTariffMatrix_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_betMultimodal_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Any of 2 types**" %}{.json-schema-combinators data-marker=or}

- **Type**: [BetCreateV1BetMultimodal](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-BetCreateV1BetMultimodal)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "isPriceByArc": true,
    "route": [
      {
        "addressFrom": "example",
        "addressTo": "example",
        "comment": "example",
        "price": {
          "base": "100.18",
          "currency": "RUB",
          "isVatPayer": false,
          "subTotalPrice": "122.21",
          "vat": "22",
          "vatAmount": "22.03"
        }
      }
    ]
  }
  ```

  {% endcut %}

- **Type**: object &#124; null

  _Const:_{.json-schema-reset .json-schema-value} `null`

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {}
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "isPriceByArc": true,
  "route": [
    {
      "addressFrom": "example",
      "addressTo": "example",
      "comment": "example",
      "price": {
        "base": "100.18",
        "currency": "RUB",
        "isVatPayer": false,
        "subTotalPrice": "122.21",
        "vat": "22",
        "vatAmount": "22.03"
      }
    }
  ]
}
```

{% endcut %}
{.table-cell}
||
||

_tariffMatrix_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Any of 2 types**" %}{.json-schema-combinators data-marker=or}

- **Type**: [BetCreateV1TariffMatrix](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-BetCreateV1TariffMatrix)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "tariffMatrixId": "example"
  }
  ```

  {% endcut %}

- **Type**: object &#124; null

  _Const:_{.json-schema-reset .json-schema-value} `null`

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {}
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "tariffMatrixId": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "betMultimodal": {
    "isPriceByArc": true,
    "route": [
      {
        "addressFrom": "example",
        "addressTo": "example",
        "comment": "example",
        "price": {}
      }
    ]
  },
  "comment": "example",
  "condition": "example",
  "demandId": "example",
  "executorId": "example",
  "extId": "example",
  "notVatPayer": true,
  "price": null,
  "tariffMatrix": {
    "tariffMatrixId": "example"
  },
  "useMultimodal": true,
  "useTariffMatrix": true
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "data": {
    "id": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_data_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [BetCreateV1Response](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-BetCreateV1Response)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### BetCreateV1Response {#entity-BetCreateV1Response}

#|
|| **Name** | **Description** ||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example"
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Bad Request

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": {
    "info": {},
    "message": "example",
    "message_code": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_error_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Error](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-Error)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "info": {},
  "message": "example",
  "message_code": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### Error {#entity-Error}

#|
|| **Name** | **Description** ||
||

_info_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: object

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "info": {},
  "message": "example",
  "message_code": "example"
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__403">

## 403 Forbidden

Forbidden

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": {
    "info": {},
    "message": "example",
    "message_code": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_error_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Error](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-Error)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "info": {},
  "message": "example",
  "message_code": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__500">

## 500 Internal Server Error

Internal Server Error

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": {
    "info": {},
    "message": "example",
    "message_code": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_error_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Error](https://yamagistrali.ru/docs/ru-x-ai/methods/post-api-bet-create-v1.md#entity-Error)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "info": {},
  "message": "example",
  "message_code": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.