{"openapi":"3.1.0","info":{"title":"Astrum Shop — партнёрский API","description":"Опт с предоплаченного баланса: каталог, заказы, выдача товара и активации. Ключ — `Authorization: Bearer ask_live_…`, только с сервера.","version":"1"},"servers":[{"url":"https://api.astrum.shop/v1"}],"paths":{"/me":{"get":{"tags":["Ключ"],"summary":"Ключ, лимиты и партнёр","description":"Открытая часть ключа, его области и лимиты, статус партнёра, вебхук без секрета и версия принятых условий.","operationId":"me_me_get","responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":[]}},"/wallet":{"get":{"tags":["Аванс"],"summary":"Аванс, порог алерта, траты за сутки","description":"Баланс аванса в долларах, свой порог алерта, траты за сутки и суточный потолок трат.","operationId":"get_wallet_wallet_get","responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletOut"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":[]},"patch":{"tags":["Аванс"],"summary":"Свой порог алерта «аванс кончается»","description":"Аванс опустился ниже порога — событие `wallet.low_balance`. `null` снимает порог.","operationId":"patch_wallet_wallet_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletPatchIn"}}},"required":true},"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["validation_error"]}},"/ledger":{"get":{"tags":["Аванс"],"summary":"Леджер аванса, новые сверху","description":"Каждое движение аванса: зачисление, списание за заказ, возврат, ручная проводка. Курсор — `cursor`.","operationId":"ledger_ledger_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerPage"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["invalid_cursor"]}},"/deposit-addresses":{"get":{"tags":["Аванс"],"summary":"Именные адреса депозита (новый — через 24 ч после добавления)","description":"Адреса пополнения по сетям (`addresses`) и ещё не открытые (`upcoming`). Адрес берите только отсюда — не из переписки.","operationId":"deposit_addresses_deposit_addresses_get","responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositAddressesOut"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":[]}},"/deposits":{"get":{"tags":["Аванс"],"summary":"Зачисленные переводы, новые сверху","description":"Переводы USDT, зачисленные на аванс: сеть, хеш, сумма в долларах, время подтверждения.","operationId":"deposit_list_deposits_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositsPage"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["invalid_cursor"]}},"/catalog":{"get":{"tags":["Каталог"],"summary":"Каталог опта (кэш 1 мин)","description":"Товары и варианты для опта: оптовая цена, способ выдачи, нужна ли активация, какие данные клиента могут понадобиться, срок подписки и наличие без чисел (`few|ok`).","operationId":"get_catalog_catalog_get","responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogOut"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":[]}},"/orders/quote":{"post":{"tags":["Заказы"],"summary":"Смета по оптовым ценам","description":"Смета того же состава, что заказ: цены строк, итог и наличие. Товар не резервирует.","operationId":"quote_orders_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderQuoteIn"}}},"required":true},"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["product_not_found","not_available_via_api","variant_required","empty_order","new_account_unavailable","rate_unavailable","validation_error"]}},"/orders":{"post":{"tags":["Заказы"],"summary":"Создать и оплатить заказ авансом","description":"Списывает оптовую сумму с аванса и выдаёт товар в той же операции. Товара в ответе нет — только в `GET /v1/orders/{id}`. Повтор с тем же `reseller_ref` и телом возвращает тот же заказ.","operationId":"create_order_orders_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreateIn"}}}},"responses":{"201":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"200":{"description":"Повтор с тем же reseller_ref и телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["insufficient_balance","out_of_stock","price_changed","product_not_found","not_available_via_api","variant_required","new_account_unavailable","empty_order","idempotency_conflict","idempotency_in_progress","daily_cap_reached","rate_unavailable","validation_error"]},"get":{"tags":["Заказы"],"summary":"Заказы партнёра, новые сверху","description":"Список заказов с курсором `cursor` и фильтром `status`.","operationId":"list_orders_orders_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersPage"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["invalid_cursor","validation_error"]}},"/orders/{order_id}":{"get":{"tags":["Заказы"],"summary":"Заказ с товаром","description":"Заказ целиком: товар `goods`, активации и возвраты. Товар храните зашифрованным и не пишите в логи.","operationId":"get_order_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["order_not_found"]}},"/orders/{order_id}/cancel":{"post":{"tags":["Заказы"],"summary":"Отменить неоплаченный заказ","description":"Только заказ в `pending` — у опта почти не бывает: оплата идёт в той же операции.","operationId":"cancel_order_orders__order_id__cancel_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Ключ повтора: печатный ASCII до 128 знаков, живёт 24 ч. Повтор с тем же ключом и телом возвращает прежний ответ; другое тело — 422 idempotency_conflict.","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["order_not_found","invalid_state","idempotency_conflict","idempotency_in_progress","validation_error"]}},"/activations/{activation_id}":{"get":{"tags":["Активации"],"summary":"Состояние активации: что спросить у клиента и что дальше","description":"Что просить у клиента (`credential_kind` и подсказка `hint`), что происходит сейчас и можно ли повторить. Вид данных известен только после выдачи.","operationId":"get_activation_activations__activation_id__get","parameters":[{"name":"activation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Activation Id"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["activation_not_found"]}},"/activations/{activation_id}/credential":{"post":{"tags":["Активации"],"summary":"Передать данные клиента","description":"Формат проверяется до поставщика: неверный — 422 `credential_invalid`, ключ не тронут. Каждая подача тратит попытку на реальном ключе — не зовите в цикле.","operationId":"submit_credential_activations__activation_id__credential_post","parameters":[{"name":"activation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Activation Id"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Ключ повтора: печатный ASCII до 128 знаков, живёт 24 ч. Повтор с тем же ключом и телом возвращает прежний ответ; другое тело — 422 idempotency_conflict.","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialIn"}}}},"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationActionOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["credential_invalid","credential_warning","activation_not_found","invalid_state","idempotency_conflict","idempotency_in_progress","validation_error"]}},"/activations/{activation_id}/retry":{"post":{"tags":["Активации"],"summary":"Повторить на уже переданных данных","description":"Каждый повтор тратит попытку на реальном ключе — не зовите его в цикле.","operationId":"retry_activations__activation_id__retry_post","parameters":[{"name":"activation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Activation Id"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Ключ повтора: печатный ASCII до 128 знаков, живёт 24 ч. Повтор с тем же ключом и телом возвращает прежний ответ; другое тело — 422 idempotency_conflict.","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["activation_not_found","invalid_state","idempotency_conflict","idempotency_in_progress","validation_error"]}},"/activations/{activation_id}/force":{"post":{"tags":["Активации"],"summary":"Включить поверх действующего тарифа клиента","description":"Только по явному согласию клиента: оплаченный им остаток у сервиса сгорает.","operationId":"force_activations__activation_id__force_post","parameters":[{"name":"activation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Activation Id"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Ключ повтора: печатный ASCII до 128 знаков, живёт 24 ч. Повтор с тем же ключом и телом возвращает прежний ответ; другое тело — 422 idempotency_conflict.","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForceIn"}}}},"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["activation_not_found","invalid_state","idempotency_conflict","idempotency_in_progress","validation_error"]}},"/activations/{activation_id}/login-link":{"post":{"tags":["Активации"],"summary":"Ссылка входа из письма вендора — оплата нашей картой","description":"Ссылка из письма сервиса на почту клиента — после события `activation.login_link_requested`.","operationId":"login_link_activations__activation_id__login_link_post","parameters":[{"name":"activation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Activation Id"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Ключ повтора: печатный ASCII до 128 знаков, живёт 24 ч. Повтор с тем же ключом и телом возвращает прежний ответ; другое тело — 422 idempotency_conflict.","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginLinkIn"}}}},"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["login_link_invalid","activation_not_found","invalid_state","idempotency_conflict","idempotency_in_progress","validation_error"]}},"/events":{"get":{"tags":["События"],"summary":"События после курсора (seq)","description":"События по возрастанию `seq` — то же, что приходит вебхуком. Курсор старше срока хранения — 410 `cursor_expired`: начните без `after` и сверьте состояние через `GET`.","operationId":"list_events_events_get","parameters":[{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsPage"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["invalid_cursor","cursor_expired","validation_error"]}},"/webhook":{"get":{"tags":["Вебхук"],"summary":"Настройки и сводка доставки","description":"Адрес, подписка на типы событий и сводка доставки — без секрета подписи.","operationId":"get_webhook_webhook_get","responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":[]},"put":{"tags":["Вебхук"],"summary":"Адрес и подписка","description":"Адрес приёмника и типы событий. Подписаться можно только на события областей ключа.","operationId":"put_webhook_webhook_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}},"required":true},"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Запрос не прошёл проверку: `validation_error` и другие 422 реестра","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["webhook_url_invalid","validation_error"]}},"/webhook/rotate-secret":{"post":{"tags":["Вебхук"],"summary":"Новый секрет (один раз); прежний подписывает ещё 24 ч","description":"Секрет показывается один раз — сохраните его в хранилище секретов сервера.","operationId":"rotate_secret_webhook_rotate_secret_post","responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotateOut"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["webhook_not_configured","idempotency_conflict","idempotency_in_progress","validation_error"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Ключ повтора: печатный ASCII до 128 знаков, живёт 24 ч. Повтор с тем же ключом и телом возвращает прежний ответ; другое тело — 422 idempotency_conflict.","schema":{"type":"string","minLength":1,"maxLength":128}}]}},"/webhook/test":{"post":{"tags":["Вебхук"],"summary":"Тестовое событие на адрес","description":"Подписанное тестовое событие на ваш приёмник — проверка подписи и ответа.","operationId":"test_webhook_webhook_test_post","responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestOut"}}}},"default":{"description":"Отказ — конверт с машинным `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-error-codes":["webhook_not_configured"]}}},"components":{"schemas":{"ActionWarningOut":{"properties":{"code":{"type":"string","title":"Code"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ActionWarningOut","description":"Данные приняты, но формат непривычный — проверьте, что клиент вставил\nнужное значение (`credential_warning`)."},"ActivationActionOut":{"properties":{"id":{"type":"string","title":"Id"},"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"},"item_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Ref"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"state":{"type":"string","title":"State"},"credential_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Kind"},"hint":{"type":"string","title":"Hint"},"full_session":{"type":"boolean","title":"Full Session"},"needs_input":{"type":"boolean","title":"Needs Input"},"needs_new_credential":{"type":"boolean","title":"Needs New Credential"},"waits_for_buyer":{"type":"boolean","title":"Waits For Buyer"},"can_retry":{"type":"boolean","title":"Can Retry"},"can_force":{"type":"boolean","title":"Can Force"},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Code"},"reason_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Text"},"reason_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Until"},"buyer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Note"},"buyer_note_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Note At"},"manual":{"type":"boolean","title":"Manual"},"verification_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Url"},"queue_position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Position"},"new_account":{"type":"boolean","title":"New Account"},"awaiting_login_link":{"type":"boolean","title":"Awaiting Login Link"},"login_link_requested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Link Requested At"},"login_link_received":{"type":"boolean","title":"Login Link Received"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"warning":{"anyOf":[{"$ref":"#/components/schemas/ActionWarningOut"},{"type":"null"}]}},"type":"object","required":["id","order_id","item_ref","product_id","state","credential_kind","hint","full_session","needs_input","needs_new_credential","waits_for_buyer","can_retry","can_force","reason_code","reason_text","reason_until","buyer_note","buyer_note_at","manual","verification_url","queue_position","new_account","awaiting_login_link","login_link_requested_at","login_link_received","updated_at"],"title":"ActivationActionOut","description":"Активация после передачи данных клиента; `warning` — если формат непривычный."},"ActivationOut":{"properties":{"id":{"type":"string","title":"Id"},"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"},"item_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Ref"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"state":{"type":"string","title":"State"},"credential_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Kind"},"hint":{"type":"string","title":"Hint"},"full_session":{"type":"boolean","title":"Full Session"},"needs_input":{"type":"boolean","title":"Needs Input"},"needs_new_credential":{"type":"boolean","title":"Needs New Credential"},"waits_for_buyer":{"type":"boolean","title":"Waits For Buyer"},"can_retry":{"type":"boolean","title":"Can Retry"},"can_force":{"type":"boolean","title":"Can Force"},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Code"},"reason_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Text"},"reason_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Until"},"buyer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Note"},"buyer_note_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Note At"},"manual":{"type":"boolean","title":"Manual"},"verification_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Url"},"queue_position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Position"},"new_account":{"type":"boolean","title":"New Account"},"awaiting_login_link":{"type":"boolean","title":"Awaiting Login Link"},"login_link_requested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Link Requested At"},"login_link_received":{"type":"boolean","title":"Login Link Received"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","order_id","item_ref","product_id","state","credential_kind","hint","full_session","needs_input","needs_new_credential","waits_for_buyer","can_retry","can_force","reason_code","reason_text","reason_until","buyer_note","buyer_note_at","manual","verification_url","queue_position","new_account","awaiting_login_link","login_link_requested_at","login_link_received","updated_at"],"title":"ActivationOut","description":"Активация подписки: что спросить у клиента и кто делает следующий шаг.\n\nТа же форма — в заказе, в `GET /activations/{id}` и в событиях\n`activation.*` (поле `data.activation`)."},"CatalogOut":{"properties":{"products":{"items":{"$ref":"#/components/schemas/CatalogProductOut"},"type":"array","title":"Products"},"generated_at":{"type":"string","title":"Generated At"}},"type":"object","required":["products","generated_at"],"title":"CatalogOut"},"CatalogPositionOut":{"properties":{"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Id"},"delivery_type":{"type":"string","title":"Delivery Type"},"subscription_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Days"},"wholesale_usd":{"type":"string","title":"Wholesale Usd"},"needs_activation":{"type":"boolean","title":"Needs Activation"},"possible_credential_kinds":{"items":{"type":"string"},"type":"array","title":"Possible Credential Kinds"},"new_account_available":{"type":"boolean","title":"New Account Available"},"new_account_fee_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Account Fee Usd"},"in_stock":{"type":"boolean","title":"In Stock"},"stock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock"}},"type":"object","required":["delivery_type","wholesale_usd","needs_activation","possible_credential_kinds","new_account_available","in_stock"],"title":"CatalogPositionOut"},"CatalogProductOut":{"properties":{"product_id":{"type":"string","title":"Product Id"},"slug":{"type":"string","title":"Slug"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"positions":{"items":{"$ref":"#/components/schemas/CatalogPositionOut"},"type":"array","title":"Positions"}},"type":"object","required":["product_id","slug","positions"],"title":"CatalogProductOut"},"CredentialIn":{"properties":{"value":{"type":"string","maxLength":16384,"minLength":1,"title":"Value","description":"Данные клиента того вида, что просит активация (`credential_kind`). При `full_session` сессию не режьте."}},"additionalProperties":false,"type":"object","required":["value"],"title":"CredentialIn"},"DepositAddressOut":{"properties":{"network":{"type":"string","title":"Network"},"address":{"type":"string","title":"Address"},"contract":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract"},"decimals":{"type":"integer","title":"Decimals"},"confirmations":{"type":"integer","title":"Confirmations"},"since":{"type":"string","title":"Since"}},"type":"object","required":["network","address","decimals","confirmations","since"],"title":"DepositAddressOut"},"DepositAddressesOut":{"properties":{"addresses":{"items":{"$ref":"#/components/schemas/DepositAddressOut"},"type":"array","title":"Addresses"},"upcoming":{"items":{"$ref":"#/components/schemas/UpcomingAddressOut"},"type":"array","title":"Upcoming"}},"type":"object","required":["addresses","upcoming"],"title":"DepositAddressesOut"},"DepositOut":{"properties":{"id":{"type":"string","title":"Id"},"network":{"type":"string","title":"Network"},"tx_hash":{"type":"string","title":"Tx Hash"},"log_index":{"type":"integer","title":"Log Index"},"amount_usd":{"type":"string","title":"Amount Usd"},"confirmed_at":{"type":"string","title":"Confirmed At"}},"type":"object","required":["id","network","tx_hash","log_index","amount_usd","confirmed_at"],"title":"DepositOut"},"DepositsPage":{"properties":{"has_more":{"type":"boolean","title":"Has More"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"data":{"items":{"$ref":"#/components/schemas/DepositOut"},"type":"array","title":"Data"}},"type":"object","required":["has_more","data"],"title":"DepositsPage"},"EventOut":{"properties":{"id":{"type":"string","title":"Id"},"seq":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seq"},"type":{"type":"string","title":"Type"},"created_at":{"type":"string","title":"Created At"},"livemode":{"type":"boolean","title":"Livemode"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["id","type","created_at","livemode","data"],"title":"EventOut"},"EventsPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EventOut"},"type":"array","title":"Data"},"has_more":{"type":"boolean","title":"Has More"},"next_cursor":{"type":"string","title":"Next Cursor"}},"type":"object","required":["data","has_more","next_cursor"],"title":"EventsPage"},"ForceIn":{"properties":{"confirm":{"type":"boolean","const":true,"title":"Confirm","description":"Только `true`: клиент согласен потерять оплаченный остаток тарифа у сервиса."}},"additionalProperties":false,"type":"object","required":["confirm"],"title":"ForceIn","description":"Включить поверх действующего тарифа: `confirm: true` подтверждает, что\nклиент согласен потерять остаток тарифа, оплаченного у другого сервиса."},"GoodsOut":{"properties":{"item_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Ref"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Id"},"type":{"type":"string","title":"Type"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw"},"login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"login_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Method"},"mailbox":{"anyOf":[{"$ref":"#/components/schemas/MailboxOut"},{"type":"null"}]}},"type":"object","required":["type"],"title":"GoodsOut","description":"Выданный товар. `key`/`api_key` — `value`; складская учётка `account` —\nстрокой `raw` (двоеточие законно внутри пароля); `new_account` — структурой."},"LedgerEntryOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"amount_usd":{"type":"string","title":"Amount Usd"},"balance_after_usd":{"type":"string","title":"Balance After Usd"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"},"refund_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refund Id"},"deposit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deposit Id"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","kind","amount_usd","balance_after_usd","created_at"],"title":"LedgerEntryOut"},"LedgerPage":{"properties":{"has_more":{"type":"boolean","title":"Has More"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"data":{"items":{"$ref":"#/components/schemas/LedgerEntryOut"},"type":"array","title":"Data"}},"type":"object","required":["has_more","data"],"title":"LedgerPage"},"LoginLinkIn":{"properties":{"value":{"type":"string","maxLength":1024,"minLength":1,"title":"Value","description":"Ссылка входа из письма сервиса на почту клиента."}},"additionalProperties":false,"type":"object","required":["value"],"title":"LoginLinkIn"},"MailboxOut":{"properties":{"email":{"type":"string","title":"Email"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"recovery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recovery"}},"type":"object","required":["email"],"title":"MailboxOut"},"MeKey":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"rate_per_min":{"type":"integer","title":"Rate Per Min"},"ip_allowlist":{"items":{"type":"string"},"type":"array","title":"Ip Allowlist"}},"type":"object","required":["id","name","scopes","rate_per_min","ip_allowlist"],"title":"MeKey"},"MeLimits":{"properties":{"orders_per_min":{"type":"integer","title":"Orders Per Min"},"orders_per_day":{"type":"integer","title":"Orders Per Day"},"max_units_per_order":{"type":"integer","title":"Max Units Per Order"},"daily_spend_usd_cap":{"type":"string","title":"Daily Spend Usd Cap"},"spent_today_usd":{"type":"string","title":"Spent Today Usd"}},"type":"object","required":["orders_per_min","orders_per_day","max_units_per_order","daily_spend_usd_cap","spent_today_usd"],"title":"MeLimits"},"MePartner":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"terms_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Version"}},"type":"object","required":["name","status"],"title":"MePartner"},"MeResponse":{"properties":{"key":{"$ref":"#/components/schemas/MeKey"},"partner":{"$ref":"#/components/schemas/MePartner"},"limits":{"$ref":"#/components/schemas/MeLimits"},"webhook":{"$ref":"#/components/schemas/MeWebhook"}},"type":"object","required":["key","partner","limits","webhook"],"title":"MeResponse"},"MeWebhook":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"}},"type":"object","required":["events"],"title":"MeWebhook"},"OrderCreateIn":{"properties":{"reseller_ref":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[\\x21-\\x7e]+$","title":"Reseller Ref","description":"Ваш номер заказа — печатный ASCII до 64 знаков. Он же ключ повтора: сохраните его до запроса."},"items":{"items":{"$ref":"#/components/schemas/OrderLineIn"},"type":"array","maxItems":50,"title":"Items","description":"Строки заказа, до 50. Пара «товар + вариант» — одна строка: дубль — 422 `duplicate_line`."},"new_account":{"type":"boolean","title":"New Account","description":"«Новый аккаунт от нас» — только для оплаты нашей картой; надбавка — `new_account_fee_usd` в каталоге.","default":false},"max_total_usd":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,13}0*$)\\d{0,10}\\.\\d{0,2}0*$)"},{"type":"null"}],"title":"Max Total Usd","description":"Потолок суммы. Цена выросла выше — 409 `price_changed` с новой суммой, аванс не тронут."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Ваши данные к заказу, до 1 КБ JSON. Возвращаются в заказе и событиях."}},"additionalProperties":false,"type":"object","required":["reseller_ref","items"],"title":"OrderCreateIn","description":"`POST /orders` и `POST /orders/quote` (у сметы `reseller_ref` не нужен)."},"OrderDetailOut":{"properties":{"id":{"type":"string","title":"Id","description":"Номер заказа."},"reseller_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reseller Ref","description":"Ваш номер заказа."},"status":{"type":"string","title":"Status","description":"`pending`, `paid`, `delivered`, `canceled` или `refunded`."},"fulfillment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fulfillment","description":"Что с активациями: `complete`, `awaiting_customer`, `in_progress`, `manual` или `failed`."},"total_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Usd","description":"Списано с аванса."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Ваши данные к заказу."},"lines":{"items":{"$ref":"#/components/schemas/OrderLineOut"},"type":"array","title":"Lines","description":"Строки с ценой за единицу и итогом."},"goods_ready":{"type":"boolean","title":"Goods Ready","description":"Товар можно забрать из `GET /v1/orders/{id}`."},"activations":{"items":{"$ref":"#/components/schemas/ActivationOut"},"type":"array","title":"Activations","description":"Активации, если товару нужны данные клиента."},"refunds":{"items":{"$ref":"#/components/schemas/RefundOut"},"type":"array","title":"Refunds","description":"Возвраты на аванс."},"created_at":{"type":"string","title":"Created At"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"goods":{"items":{"$ref":"#/components/schemas/GoodsOut"},"type":"array","title":"Goods"}},"type":"object","required":["id","status","lines","goods_ready","activations","refunds","created_at","goods"],"title":"OrderDetailOut"},"OrderLineIn":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id","description":"Товар из `GET /v1/catalog`."},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id","description":"Вариант, если их у товара несколько, — иначе 409 `variant_required`."},"quantity":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Quantity","description":"Единиц в строке, до 100."},"item_ref":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[\\x21-\\x7e]+$"},{"type":"null"}],"title":"Item Ref","description":"Ваш номер строки — вернётся у каждой единицы товара."}},"additionalProperties":false,"type":"object","required":["product_id","quantity"],"title":"OrderLineIn"},"OrderLineOut":{"properties":{"item_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Ref"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"delivery_type":{"type":"string","title":"Delivery Type"},"subscription_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Days"},"new_account":{"type":"boolean","title":"New Account"},"quantity":{"type":"integer","title":"Quantity"},"unit_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit Usd"},"line_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Usd"}},"type":"object","required":["delivery_type","new_account","quantity"],"title":"OrderLineOut"},"OrderOut":{"properties":{"id":{"type":"string","title":"Id","description":"Номер заказа."},"reseller_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reseller Ref","description":"Ваш номер заказа."},"status":{"type":"string","title":"Status","description":"`pending`, `paid`, `delivered`, `canceled` или `refunded`."},"fulfillment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fulfillment","description":"Что с активациями: `complete`, `awaiting_customer`, `in_progress`, `manual` или `failed`."},"total_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Usd","description":"Списано с аванса."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Ваши данные к заказу."},"lines":{"items":{"$ref":"#/components/schemas/OrderLineOut"},"type":"array","title":"Lines","description":"Строки с ценой за единицу и итогом."},"goods_ready":{"type":"boolean","title":"Goods Ready","description":"Товар можно забрать из `GET /v1/orders/{id}`."},"activations":{"items":{"$ref":"#/components/schemas/ActivationOut"},"type":"array","title":"Activations","description":"Активации, если товару нужны данные клиента."},"refunds":{"items":{"$ref":"#/components/schemas/RefundOut"},"type":"array","title":"Refunds","description":"Возвраты на аванс."},"created_at":{"type":"string","title":"Created At"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"}},"type":"object","required":["id","status","lines","goods_ready","activations","refunds","created_at"],"title":"OrderOut"},"OrderQuoteIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrderLineIn"},"type":"array","maxItems":50,"title":"Items","description":"Строки заказа, до 50. Пара «товар + вариант» — одна строка: дубль — 422 `duplicate_line`."},"new_account":{"type":"boolean","title":"New Account","description":"«Новый аккаунт от нас» — только для оплаты нашей картой; надбавка — `new_account_fee_usd` в каталоге.","default":false}},"additionalProperties":false,"type":"object","required":["items"],"title":"OrderQuoteIn","description":"`POST /orders/quote` — тот же состав, что у заказа, без ref и денег."},"OrdersPage":{"properties":{"has_more":{"type":"boolean","title":"Has More"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"data":{"items":{"$ref":"#/components/schemas/OrderOut"},"type":"array","title":"Data"}},"type":"object","required":["has_more","data"],"title":"OrdersPage"},"QuoteLineOut":{"properties":{"product_id":{"type":"string","title":"Product Id"},"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Id"},"item_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Ref"},"delivery_type":{"type":"string","title":"Delivery Type"},"quantity":{"type":"integer","title":"Quantity"},"unit_usd":{"type":"string","title":"Unit Usd"},"line_usd":{"type":"string","title":"Line Usd"},"in_stock":{"type":"boolean","title":"In Stock"},"stock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock"}},"type":"object","required":["product_id","delivery_type","quantity","unit_usd","line_usd","in_stock"],"title":"QuoteLineOut"},"QuoteOut":{"properties":{"lines":{"items":{"$ref":"#/components/schemas/QuoteLineOut"},"type":"array","title":"Lines"},"new_account_fee_usd":{"type":"string","title":"New Account Fee Usd"},"total_usd":{"type":"string","title":"Total Usd"}},"type":"object","required":["lines","new_account_fee_usd","total_usd"],"title":"QuoteOut"},"RefundOut":{"properties":{"id":{"type":"string","title":"Id"},"amount_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount Usd"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","created_at"],"title":"RefundOut"},"UpcomingAddressOut":{"properties":{"kind":{"type":"string","title":"Kind"},"address":{"type":"string","title":"Address"},"opens_at":{"type":"string","title":"Opens At"}},"type":"object","required":["kind","address","opens_at"],"title":"UpcomingAddressOut"},"WalletOut":{"properties":{"balance_usd":{"type":"string","title":"Balance Usd"},"low_balance_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Low Balance Usd"},"spent_today_usd":{"type":"string","title":"Spent Today Usd"},"daily_spend_usd_cap":{"type":"string","title":"Daily Spend Usd Cap"}},"type":"object","required":["balance_usd","spent_today_usd","daily_spend_usd_cap"],"title":"WalletOut"},"WalletPatchIn":{"properties":{"low_balance_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,13}0*$)\\d{0,10}\\.\\d{0,2}0*$)"},{"type":"null"}],"title":"Low Balance Usd","description":"Порог в долларах: аванс ниже — событие `wallet.low_balance`. `null` снимает порог."}},"additionalProperties":false,"type":"object","required":["low_balance_usd"],"title":"WalletPatchIn","description":"`PATCH /wallet` — единственная запись под `wallet:read`: свой порог алерта."},"WebhookDeliveryOut":{"properties":{"pending":{"type":"integer","title":"Pending"},"dead_last_24h":{"type":"integer","title":"Dead Last 24H"},"last_failure":{"anyOf":[{"$ref":"#/components/schemas/WebhookFailureOut"},{"type":"null"}]}},"type":"object","required":["pending","dead_last_24h"],"title":"WebhookDeliveryOut"},"WebhookFailureOut":{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"WebhookFailureOut"},"WebhookIn":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":64},{"type":"null"}],"title":"Events"}},"additionalProperties":false,"type":"object","required":["url"],"title":"WebhookIn","description":"`PUT /webhook`: адрес (null — выключить) и подписка (null — все типы)."},"WebhookOut":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"secret_set":{"type":"boolean","title":"Secret Set"},"previous_secret_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Secret Expires At"},"delivery":{"$ref":"#/components/schemas/WebhookDeliveryOut"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["secret_set","delivery"],"title":"WebhookOut"},"WebhookRotateOut":{"properties":{"secret":{"type":"string","title":"Secret"},"previous_secret_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Secret Expires At"}},"type":"object","required":["secret"],"title":"WebhookRotateOut"},"WebhookTestOut":{"properties":{"delivered":{"type":"boolean","title":"Delivered"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["delivered"],"title":"WebhookTestOut"},"Error":{"title":"Error","type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","reason","message","details","request_id"],"properties":{"code":{"type":"string","enum":["unauthenticated","scope_missing","ip_not_allowed","browser_not_allowed","account_suspended","not_found","method_not_allowed","length_required","body_too_large","unsupported_media_type","validation_error","rate_limited","daily_cap_reached","idempotency_in_progress","idempotency_conflict","api_disabled","rate_unavailable","internal_error","product_not_found","not_available_via_api","variant_required","empty_order","out_of_stock","new_account_unavailable","price_changed","insufficient_balance","order_not_found","activation_not_found","invalid_state","credential_invalid","login_link_invalid","webhook_not_configured","webhook_url_invalid","invalid_cursor","cursor_expired","claim_expired","claim_used"],"description":"Машинный код; реестр и что делать — гайд, раздел «Ошибки»"},"reason":{"type":["string","null"],"description":"Уточнение кода: `out_of_stock` · `below_floor` и т. п."},"message":{"type":"string","description":"Текст по-русски, с действием"},"details":{"type":["object","null"],"additionalProperties":true,"description":"Данные для действия; у `validation_error` — `errors[]` с `field` и `message`"},"request_id":{"type":"string","description":"Назовите его в поддержку"}}}}}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"ask_live_… (песочница — ask_test_…)","description":"Ключ партнёра. Только с сервера: запрос из браузера получает 403."}}},"tags":[{"name":"Ключ","description":"Партнёр, лимиты ключа и сводка вебхука одним запросом. Подробно — [гайд](https://api.astrum.shop/v1/guide#keys)."},{"name":"Аванс","description":"Баланс, леджер, адреса пополнения и зачисленные переводы. Подробно — [гайд](https://api.astrum.shop/v1/guide#deposits)."},{"name":"Каталог","description":"Позиции по оптовым ценам, наличие без чисел. Подробно — [гайд](https://api.astrum.shop/v1/guide#orders)."},{"name":"Заказы","description":"Смета, заказ с оплатой авансом, отмена неоплаченного. Подробно — [гайд](https://api.astrum.shop/v1/guide#orders)."},{"name":"Активации","description":"Что спросить у клиента, передача данных, повтор и `force`. Подробно — [гайд](https://api.astrum.shop/v1/guide#activations)."},{"name":"События","description":"Лента событий — то же, что приходит вебхуком. Подробно — [гайд](https://api.astrum.shop/v1/guide#webhooks)."},{"name":"Вебхук","description":"Адрес, подписка, секрет подписи и тестовое событие. Подробно — [гайд](https://api.astrum.shop/v1/guide#webhooks)."}],"security":[{"bearer":[]}]}