{"openapi":"3.0.0","servers":[{"description":"100partner andrey dev","url":"http://100partner.andrey.dev.hotbrains.ru/api/v1"},{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/ITechnoDC/100partner/1.0.0"}],"info":{"version":"1.0.0","title":"100partner","description":"This is an example of using OAuth2 Application Flow in a specification to describe security to your API."},"security":[{"bearerAuth":[]}],"paths":{"/wallets/{payment}":{"get":{"summary":"Проверка наличия свободных кошельков","parameters":[{"$ref":"#/components/parameters/acceptParam"},{"name":"payment","in":"path","schema":{"type":"string","example":"qiwi","description":"Платёжная система"},"required":true}],"description":"Проверка наличия свободных кошельков","responses":{"200":{"description":"Результат проверки свободных кошельков","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":null},"result":{"type":"object","properties":{"wallets":{"type":"object","properties":{"count":{"type":"integer","example":10}}}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/wallet":{"post":{"summary":"Получение кошелька и создание заявки","parameters":[{"$ref":"#/components/parameters/acceptParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payment":{"$ref":"#/components/schemas/Payment"},"partner_request":{"$ref":"#/components/schemas/PartnerRequest"},"sum":{"$ref":"#/components/schemas/Sum"},"client_wallet":{"$ref":"#/components/schemas/ClientWallet"}}}}}},"description":"Получение кошелька и создание заявки","responses":{"200":{"description":"Результат создания заявки","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":null},"result":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Wallet"},"request":{"$ref":"#/components/schemas/Request"}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/request/{request_id}/check":{"get":{"summary":"Проверка статуса оплаты по заявке","parameters":[{"$ref":"#/components/parameters/acceptParam"},{"name":"request_id","in":"path","schema":{"type":"integer","example":2142,"description":"ID заявки в системе"},"required":true}],"description":"Проверка статуса оплаты по заявке","responses":{"200":{"description":"Результат проверки статуса","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":null},"result":{"type":"object","properties":{"status":{"description":"Статус заявки","type":"string","example":"NEW"}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/request/{request_id}/cancel":{"post":{"summary":"Отмена заявки","parameters":[{"$ref":"#/components/parameters/acceptParam"},{"name":"request_id","in":"path","schema":{"type":"integer","example":2142,"description":"ID заявки в системе"},"required":true}],"description":"Отмена заявки","responses":{"200":{"description":"Результат отмены заявки","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"example":null},"result":{"type":"boolean","example":true}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}}},"components":{"parameters":{"acceptParam":{"in":"header","name":"Accept","required":true,"schema":{"type":"string","enum":["application/json"]}}},"schemas":{"Wallet":{"type":"object","properties":{"number":{"type":"string","example":79960096572}},"required":["number"]},"Request":{"type":"object","properties":{"id":{"type":"string","example":5839}},"required":["id"]},"Payment":{"type":"object","properties":{"code":{"type":"string","description":"Платёжная система нужного кошелька","example":"qiwi"}},"required":["code"]},"PartnerRequest":{"type":"object","properties":{"id":{"type":"string","description":"Номер заявка в системе партнёра","example":1345}},"required":["id"]},"Sum":{"type":"object","properties":{"currency_code":{"type":"string","description":"Валюта","example":"RUR"},"amount":{"type":"integer","description":"Сумма заявки","example":1000}},"required":["currency_code","amount"]},"ClientWallet":{"type":"object","properties":{"number":{"type":"string","description":"Номер кошелька плательщика","example":79999999999}}},"Error":{"type":"object","properties":{"message":{"type":"string","description":"Объект ошибки"}}}},"responses":{"UnauthorizedError":{"description":"Ошибка авторизации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"message":"Токен авторизации отсутствует или невалиден"}}}}}},"securitySchemes":{"bearerAuth":{"description":"Для доступа к методам api используется ключ доступа(Bearer token), для авторизации нужно передать header: \"Authorization: Bearer eyJ0eXAiOi...\"","type":"http","scheme":"bearer"}}}}