{"swagger":"2.0","info":{"title":"partner.cards","version":"1.0.1","description":"API для работы с картами"},"tags":[{"name":"cards","description":"Сервис для работы с картами"}],"paths":{"/":{"get":{"tags":["cards"],"summary":"Список карт по счетам","description":"Возвращает список карт по счетам","operationId":"getCardsByAccountNumbers","produces":["application/json;charset=UTF-8"],"parameters":[{"name":"Authorization","in":"header","description":"Последний токен авторизации (Access Token). Формат передачи будет иметь вид Bearer + {пробел} + {accessToken}","required":true,"type":"string"},{"name":"number","in":"query","description":"Номера счетов","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi","maxItems":50,"minItems":0}],"responses":{"200":{"description":"Успешное выполнение запроса","schema":{"$ref":"#/definitions/CardListResponse"}},"400":{"description":"Некорректный запрос","schema":{"$ref":"#/definitions/ShortErrorModel"}},"401":{"description":"Запрос не авторизирован","schema":{"$ref":"#/definitions/ShortErrorModel"}},"500":{"description":"Ошибка выполнения запроса","schema":{"$ref":"#/definitions/ShortErrorModel"}}},"x-st-position":1,"x-st-code-samples":[{"lang":"cURL","sample":"curl -X GET \\\r\n  'https://developerhub.alfabank.by:8273/partner/1.0.1/cards/?number=<number1>,<number2>' \\\r\n  -H 'Authorization: Bearer <accessToken>'\r\n"},{"lang":"Java","sample":"OkHttpClient client = new OkHttpClient();\r\n\r\nRequest request = new Request.Builder()\r\n  .url(\"https://developerhub.alfabank.by:8273/partner/1.0.1/cards/?number=<number1>,<number2>\")\r\n  .get()\r\n  .addHeader(\"Authorization\", \"Bearer <accessToken>\")\r\n  .build();\r\n\r\nResponse response = client.newCall(request).execute();\r\n"},{"lang":"Node","sample":"var request = require(\"request\");\r\n\r\nvar options = { method: 'GET',\r\n  url: 'https://developerhub.alfabank.by:8273/partner/1.0.1/cards/',\r\n  qs:\r\n   {\r\n      number: '<number1>,<number2>'\r\n   },\r\n  headers:\r\n   { Authorization: 'Bearer <accessToken>' } };\r\n\r\nrequest(options, function (error, response, body) {\r\n  if (error) throw new Error(error);\r\n\r\n  console.log(body);\r\n});\r\n"},{"lang":"Swift","sample":"import Foundation\r\n\r\nlet headers = [\r\n  \"Authorization\": \"Bearer <accessToken>\"\r\n]\r\n\r\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://developerhub.alfabank.by:8273/partner/1.0.1/cards/?number=<number1>,<number2>\")! as URL,\r\n                                        cachePolicy: .useProtocolCachePolicy,\r\n                                    timeoutInterval: 10.0)\r\nrequest.httpMethod = \"GET\"\r\nrequest.allHTTPHeaderFields = headers\r\n\r\nlet session = URLSession.shared\r\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\r\n  if (error != nil) {\r\n    print(error)\r\n  } else {\r\n    let httpResponse = response as? HTTPURLResponse\r\n    print(httpResponse)\r\n  }\r\n})\r\n\r\ndataTask.resume()\r\n"}],"x-scope":"cards","x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited","security":[{"default":["cards"]}]}},"/statement":{"get":{"tags":["cards"],"summary":"Выписка по карт-счетам","description":"Возвращает список транзакций по карт-счетам","operationId":"getStatement","produces":["application/json;charset=UTF-8"],"parameters":[{"name":"Authorization","in":"header","description":"Последний токен авторизации (Access Token). Формат передачи будет иметь вид Bearer + {пробел} + {accessToken}","required":true,"type":"string"},{"name":"number","in":"query","description":"Номера счетов","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi","maxItems":50,"minItems":0},{"name":"cardMask","in":"query","description":"Маска номера карты в формате A.BBBB, где A - первая цифра номера карты, B - последние 4 цифры номера карты","required":false,"type":"string"},{"name":"dateFrom","in":"query","description":"Начальная дата периода (по умолчанию - (текущий день - месяц))","required":false,"type":"string","format":"date"},{"name":"dateTo","in":"query","description":"Конечная дата периода (по умолчанию - текущий день)","required":false,"type":"string","format":"date"},{"name":"pageNo","in":"query","description":"Номер страницы (по умолчанию - 1, все транзакции - 0)","required":false,"type":"integer","minimum":0,"format":"int32"},{"name":"pageRowCount","in":"query","description":"Число строк на странице (по умолчанию - 50, все транзакции - 0)","required":false,"type":"integer","minimum":0,"format":"int32"}],"responses":{"200":{"description":"Успешное выполнение запроса","schema":{"$ref":"#/definitions/CardStatementResponse"}},"400":{"description":"Некорректный запрос","schema":{"$ref":"#/definitions/ShortErrorModel"}},"401":{"description":"Запрос не авторизирован","schema":{"$ref":"#/definitions/ShortErrorModel"}},"500":{"description":"Ошибка выполнения запроса","schema":{"$ref":"#/definitions/ShortErrorModel"}}},"x-st-position":3,"x-st-code-samples":[{"lang":"cURL","sample":"curl -X GET \\\r\n  'https://developerhub.alfabank.by:8273/partner/1.0.1/cards/statement?number=<number1>,<number2>&cardMask=<cardMask>&dateFrom=30.09.2018Z&dateTo=30.10.2018&pageNo=1&pageRowCount=50' \\\r\n  -H 'Authorization: Bearer <accessToken>'\r\n"},{"lang":"Java","sample":"OkHttpClient client = new OkHttpClient();\r\n\r\nRequest request = new Request.Builder()\r\n  .url(\"https://developerhub.alfabank.by:8273/partner/1.0.1/cards/statement?number=<number1>,<number2>&cardMask=<cardMask>&dateFrom=30.09.2018Z&dateTo=30.10.2018&pageNo=1&pageRowCount=50\")\r\n  .get()\r\n  .addHeader(\"Authorization\", \"Bearer <accessToken>\")\r\n  .build();\r\n\r\nResponse response = client.newCall(request).execute();\r\n"},{"lang":"Node","sample":"var request = require(\"request\");\r\n\r\nvar options = { method: 'GET',\r\n  url: 'https://developerhub.alfabank.by:8273/partner/1.0.1/cards/statement',\r\n  qs:\r\n   {\r\n      number: '<number1>,<number2>',\r\n      cardMask: '<cardMask>',\r\n      dateFrom: '30.09.2018',\r\n      dateTo: '30.10.2018',\r\n      pageNo: '1',\r\n      pageRowCount: '50'\r\n   },\r\n  headers:\r\n   { Authorization: 'Bearer <accessToken>' } };\r\n\r\nrequest(options, function (error, response, body) {\r\n  if (error) throw new Error(error);\r\n\r\n  console.log(body);\r\n});\r\n"},{"lang":"Swift","sample":"import Foundation\r\n\r\nlet headers = [\r\n  \"Authorization\": \"Bearer <accessToken>\"\r\n]\r\n\r\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://developerhub.alfabank.by:8273/partner/1.0.1/cards/statement?number=<number1>,<number2>&cardMask=<cardMask>&dateFrom=30.09.2018Z&dateTo=30.10.2018&pageNo=1&pageRowCount=50\")! as URL,\r\n                                        cachePolicy: .useProtocolCachePolicy,\r\n                                    timeoutInterval: 10.0)\r\nrequest.httpMethod = \"GET\"\r\nrequest.allHTTPHeaderFields = headers\r\n\r\nlet session = URLSession.shared\r\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\r\n  if (error != nil) {\r\n    print(error)\r\n  } else {\r\n    let httpResponse = response as? HTTPURLResponse\r\n    print(httpResponse)\r\n  }\r\n})\r\n\r\ndataTask.resume()\r\n"}],"x-scope":"cards","x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited","security":[{"default":["cards"]}]}},"/statement/{format}":{"get":{"tags":["cards"],"summary":"Печатная форма выписки карте","description":"Получение печатной формы выписки по карте","operationId":"printStatement","produces":["application/json;charset=UTF-8","application/octet-stream","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/pdf","text/plain","text/csv","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],"parameters":[{"name":"Authorization","in":"header","description":"Последний токен авторизации (Access Token). Формат передачи будет иметь вид Bearer + {пробел} + {accessToken}","required":true,"type":"string"},{"name":"number","in":"query","description":"Номера счетов","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi","maxItems":50,"minItems":0},{"name":"cardMask","in":"query","description":"Маска номера карты в формате A.BBBB, где A - первая цифра номера карты, B - последние 4 цифры номера карты","required":false,"type":"string"},{"name":"format","in":"path","description":"Формат печатной формы (docx, pdf, txt, csv, xlsx)","required":true,"type":"string","pattern":"docx|pdf|txt|csv|xlsx"},{"name":"withAuthorizations","in":"query","description":"Авторизованные в карт-системе операции, которые еще не отражены по счету: true -  включить в печатную форму , false - не включать","required":false,"type":"boolean"},{"name":"dateFrom","in":"query","description":"Начальная дата периода (по умолчанию - (текущий день - месяц))","required":false,"type":"string","format":"date"},{"name":"dateTo","in":"query","description":"Конечная дата периода (по умолчанию - текущий день)","required":false,"type":"string","format":"date"}],"responses":{"200":{"description":"Успешное выполнение запроса","schema":{"type":"file"},"headers":{"Access-Control-Expose-Headers":{"type":"string","description":"Content-Disposition"},"Content-Disposition":{"type":"string","description":"attachment; filename=\"name\"; filename*=UTF-8''name"}}},"400":{"description":"Некорректный запрос","schema":{"$ref":"#/definitions/ShortErrorModel"}},"401":{"description":"Запрос не авторизирован","schema":{"$ref":"#/definitions/ShortErrorModel"}},"500":{"description":"Ошибка выполнения запроса","schema":{"$ref":"#/definitions/ShortErrorModel"}}},"x-st-position":4,"x-st-code-samples":[{"lang":"cURL","sample":"curl -X GET \\\r\n  'https://developerhub.alfabank.by:8273/partner/1.0.1/cards/statement/pdf?number=<number1>,<number2>&cardMask=<cardMask>&withApplications=false&dateFrom=01.10.2018&dateTo=29.10.2018' \\\r\n  -H 'Authorization: Bearer <accessToken>'\r\n"},{"lang":"Java","sample":"OkHttpClient client = new OkHttpClient();\r\n\r\nRequest request = new Request.Builder()\r\n  .url(\"https://developerhub.alfabank.by:8273/partner/1.0.1/cards/statement/pdf?number=<number1>,<number2>&cardMask=<cardMask>&withApplications=false&dateFrom=01.10.2018&dateTo=29.10.2018\")\r\n  .get()\r\n  .addHeader(\"Authorization\", \"Bearer <accessToken>\")\r\n  .build();\r\n\r\nResponse response = client.newCall(request).execute();\r\n"},{"lang":"Node","sample":"var request = require(\"request\");\r\n\r\nvar options = { method: 'GET',\r\n  url: 'https://developerhub.alfabank.by:8273/partner/1.0.1/cards/statement/pdf',\r\n  qs:\r\n   { number: '<number1>,<number2>',\r\n     cardMask: '<cardMask>',\r\n     withApplications: 'false',\r\n     dateFrom: '01.10.2018',\r\n     dateTo: '29.10.2018' },\r\n  headers:\r\n   { Authorization: 'Bearer <accessToken>' } };\r\n\r\nrequest(options, function (error, response, body) {\r\n  if (error) throw new Error(error);\r\n\r\n  console.log(body);\r\n});\r\n"},{"lang":"Swift","sample":"import Foundation\r\n\r\nlet headers = [\r\n  \"Authorization\": \"Bearer <accessToken>\"\r\n]\r\n\r\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://developerhub.alfabank.by:8273/partner/1.0.1/cards/statement/pdf?number=<number1>,<number2>&cardMask=<cardMask>&withApplications=false&dateFrom=01.10.2018&dateTo=29.10.2018\")! as URL,\r\n                                        cachePolicy: .useProtocolCachePolicy,\r\n                                    timeoutInterval: 10.0)\r\nrequest.httpMethod = \"GET\"\r\nrequest.allHTTPHeaderFields = headers\r\n\r\nlet session = URLSession.shared\r\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\r\n  if (error != nil) {\r\n    print(error)\r\n  } else {\r\n    let httpResponse = response as? HTTPURLResponse\r\n    print(httpResponse)\r\n  }\r\n})\r\n\r\ndataTask.resume()\r\n"}],"x-scope":"cards","x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited","security":[{"default":["cards"]}]}},"/{number}/{cardMask}":{"get":{"tags":["cards"],"summary":"Детализированная информация по карте","description":"Возвращает детальную информацию по карте","operationId":"getCardDetails","produces":["application/json;charset=UTF-8"],"parameters":[{"name":"Authorization","in":"header","description":"Последний токен авторизации (Access Token). Формат передачи будет иметь вид Bearer + {пробел} + {accessToken}","required":true,"type":"string"},{"name":"number","in":"path","description":"Номер счета","required":true,"type":"string"},{"name":"cardMask","in":"path","description":"Маска номера карты в формате A.BBBB, где A - первая цифра номера карты, B - последние 4 цифры номера карты","required":true,"type":"string"}],"responses":{"200":{"description":"Успешное выполнение запроса","schema":{"$ref":"#/definitions/CardDetailResponse"}},"400":{"description":"Некорректный запрос","schema":{"$ref":"#/definitions/ShortErrorModel"}},"401":{"description":"Запрос не авторизирован","schema":{"$ref":"#/definitions/ShortErrorModel"}},"500":{"description":"Ошибка выполнения запроса","schema":{"$ref":"#/definitions/ShortErrorModel"}}},"x-st-position":2,"x-st-code-samples":[{"lang":"cURL","sample":"curl -X GET \\\r\n  'https://developerhub.alfabank.by:8273/partner/1.0.1/cards/<number>/<cardMask>' \\\r\n  -H 'Authorization: Bearer <accessToken>'\r\n"},{"lang":"Java","sample":"OkHttpClient client = new OkHttpClient();\r\n\r\nRequest request = new Request.Builder()\r\n  .url(\"https://developerhub.alfabank.by:8273/partner/1.0.1/cards/<number>/<cardMask>\")\r\n  .get()\r\n  .addHeader(\"Authorization\", \"Bearer <accessToken>\")\r\n  .build();\r\n\r\nResponse response = client.newCall(request).execute();\r\n"},{"lang":"Node","sample":"var request = require(\"request\");\r\n\r\nvar options = { method: 'GET',\r\n  url: 'https://developerhub.alfabank.by:8273/partner/1.0.1/cards/<number>/<cardMask>',\r\n  headers:\r\n   { Authorization: 'Bearer <accessToken>' } };\r\n\r\nrequest(options, function (error, response, body) {\r\n  if (error) throw new Error(error);\r\n\r\n  console.log(body);\r\n});\r\n"},{"lang":"Swift","sample":"import Foundation\r\n\r\nlet headers = [\r\n  \"Authorization\": \"Bearer <accessToken>\"\r\n]\r\n\r\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://developerhub.alfabank.by:8273/partner/1.0.1/cards/<number>/<cardMask>\")! as URL,\r\n                                        cachePolicy: .useProtocolCachePolicy,\r\n                                    timeoutInterval: 10.0)\r\nrequest.httpMethod = \"GET\"\r\nrequest.allHTTPHeaderFields = headers\r\n\r\nlet session = URLSession.shared\r\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\r\n  if (error != nil) {\r\n    print(error)\r\n  } else {\r\n    let httpResponse = response as? HTTPURLResponse\r\n    print(httpResponse)\r\n  }\r\n})\r\n\r\ndataTask.resume()\r\n"}],"x-scope":"cards","x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited","security":[{"default":["cards"]}]}}},"definitions":{"Card":{"type":"object","properties":{"number":{"type":"string","description":"Номер счета"},"cardId":{"type":"string","description":"Уникальный идентификатор карты"},"cardMask":{"type":"string","description":"Маска номера карты в формате A.BBBB, где A - первая цифра номера карты, B - последние 4 цифры номера карты"},"typeName":{"type":"string","description":"Наименование типа карты"},"currIso":{"type":"string","description":"Код валюты (симв.)"},"termDate":{"type":"string","description":"Срок действия карты"},"status":{"type":"integer","format":"int32","description":"Статус карты: 1 - активна, 2 - заблокирована, 5 - исток срок, 9 - закрыта"}},"description":"Карта"},"CardDetailResponse":{"type":"object","properties":{"card":{"description":"Детальная информация по карте","$ref":"#/definitions/CardDetails"}},"description":"Выходная модель, содержащая детальную информацию по карте"},"CardDetails":{"type":"object","properties":{"cardId":{"type":"string","description":"Уникальный идентификатор карты"},"cardMask":{"type":"string","description":"Маска карты"},"number":{"type":"string","description":"Номер счета"},"numberType":{"type":"string","description":"Тип счета"},"type":{"type":"integer","format":"int32","description":"Тип карты"},"typeName":{"type":"string","description":"Наименование типа карты"},"openDate":{"type":"string","format":"date","example":"06.08.2019","description":"Дата открытия"},"currIso":{"type":"string","description":"Код валюты (симв.)"},"name":{"type":"string","description":"ФИО держателя карты"},"termDate":{"type":"string","description":"Срок действия карты"},"status":{"type":"integer","format":"int32","description":"Статус карты"},"statusName":{"type":"string","description":"Наименование статуса"},"isSms":{"type":"boolean","description":"Наличие SMS-оповещения: true - есть, false - нет"},"typeSms":{"type":"boolean","description":"Тип SMS-оповещения: true - полное, false - сокращенное"}},"description":"Детали по карте"},"CardListResponse":{"type":"object","properties":{"cards":{"type":"array","description":"Список карт","items":{"$ref":"#/definitions/Card"}}},"description":"Выходная модель, содержащая карты по счетам"},"CardStatement":{"type":"object","properties":{"number":{"type":"string","description":"Номер счета"},"cardMask":{"type":"string","description":"Маска карты"},"name":{"type":"string","description":"ФИО держателя карты"},"currNumber":{"type":"string","description":"Валюта счета"},"address":{"type":"string","description":"Место совершения операции"},"city":{"type":"string","description":"Город совершения операции"},"country":{"type":"string","description":"Страна совершения операции (симв.)"},"payAmount":{"type":"number","description":"Сумма операции"},"currPay":{"type":"string","description":"Валюта операции"},"payType":{"type":"boolean","description":"Тип операции (true - дебет, false - кредит)"},"accAmount":{"type":"number","description":"Сумма операции в валюте счета"},"payDate":{"type":"string","format":"date-time","example":"2019-08-06T09:00:00.000","description":"Дата и время операции"},"numberDate":{"type":"string","format":"date-time","example":"2019-08-06T09:00:00.000","description":"Дата отражения операции по счету"},"commis":{"type":"boolean","description":"Тип комиссии (true - дебет, false - кредит)"},"commisAmount":{"type":"number","description":"Сумма комиссии"},"payNum":{"type":"string","description":"Номер операции"},"status":{"type":"string","description":"Статус операции"},"payName":{"type":"string","description":"Наименование операции"}},"description":"Операция по карте"},"CardStatementResponse":{"type":"object","properties":{"totalRowCount":{"type":"integer","format":"int32","description":"Полное количество строк в выборке"},"page":{"type":"array","description":"Список строк на странице","items":{"$ref":"#/definitions/CardStatement"}}},"description":"Выходная модель, содержащая выпписку по картам"},"ShortErrorModel":{"type":"object","properties":{"category":{"type":"string","description":"Категория ошибки","enum":["API_ERROR","BACK_ERROR"]},"code":{"type":"integer","format":"int32","description":"Код ошибки"},"message":{"type":"string","description":"Сообщение об ошибке"}}}},"x-wso2-security":{"apim":{"x-wso2-scopes":[{"name":"Получение информации по картам","description":"","key":"cards","roles":"partner_production_info,partner_production_personal"}]}},"x-version-info":null,"host":"ibapi4.alfabank.by:8273","basePath":"/partner/1.0.1/cards","schemes":["https","http"],"securityDefinitions":{"default":{"type":"oauth2","authorizationUrl":"https://ibapi4.alfabank.by:8273/authorize","flow":"implicit","scopes":{"cards":"Получение информации по картам"}}}}