Открыть главное меню

Изменения

API Counterparties

3175 байт добавлено, 01:11, 13 января 2020
Нет описания правки
===Параметры===
====Ответы====
{| class="wikitable"
! style="font-weight:bold;" | HTTP Code
! style="font-weight:bold;" | Description
! style="font-weight:bold;" | Schema
|-
| style="font-weight:bold;" | 200
| Ok
| [http://docs.smartsatu.com/wiki/API_Counterparties#Response_Counterparties Response Counterparties]
|-
| style="font-weight:bold;" | 401
| Unauthorized
| [http://docs.smartsatu.com/wiki/API_Counterparties#401 401]
|}
'''Принимаемые ресурсом типы MIME'''
*application/json
'''Возвращаемые ресурсом типы MIME'''
*application/json
==Определения==
===Response Counterparties===
'''200'''
'''Items'''
{| class="wikitable"
! style="font-weight:bold;" | Name
! style="font-weight:bold;" | Description
! style="font-weight:bold;" | Schema
! style="font-weight:bold;" | Example
|-
| style="font-weight:bold;" | id
| Уникальный идентификатор
| integer
| 80
|-
| style="font-weight:bold;" | name
| Название торговой точки
| string
| ИП "Чип и Дейл" | маг. "Рокфор"
|-
| style="font-weight:bold;" | address
| Адрес торговой точки
| string
| Алматы, Байзакова, 125/185
|-
| style="font-weight:bold;" | conacts
| Массив
| <contacts> array
|
|-
| style="font-weight:bold;" | type
| Тип торговой точки
| string
| store
|-
| style="font-weight:bold;" | tin
| ИНН торговой точки
| string
| 0123456789
|}
'''Contacts'''
{| class="wikitable"
! style="font-weight:bold;" | Name
! style="font-weight:bold;" | Description
! style="font-weight:bold;" | Schema
! style="font-weight:bold;" | Example
|-
| style="font-weight:bold;" | phone
| Номер телефона
| string
| 78000000001
|-
| style="font-weight:bold;" | person
| Персона (Контактное лицо)
| string
| Гайка
|-
| style="font-weight:bold;" | ext
| Дополнительный номер
| string
| 123
|-
| style="font-weight:bold;" | type
| Тип контакта
| string
|
|}
{
"Items": [
{
"id": 80,
"name": "ИП \"Чип и Дейл\" | маг. \"Рокфор\"",
"address": "Алматы, Байзакова, 125/185",
"contacts": [
{
"phone": "78000000001",
"person": "Гайка",
"ext": "123",
"type": " "
}
],
"type": "store",
"tin": "0123456789"
}
]
}
===401===
{| class="wikitable"
! style="font-weight:bold;" | Name
! style="font-weight:bold;" | Description
! style="font-weight:bold;" | Schema
! style="font-weight:bold;" | Example
|-
| style="font-weight:bold;" | name
| Название торговой точки
| string
| Unauthorized
|-
| style="font-weight:bold;" | message
| Сообщение
| string
| Your request was made with invalid credentials
|-
| style="font-weight:bold;" | code
| Код
| integer($int32)
| 0
|-
| style="font-weight:bold;" | status
| Статус
| integer($int32)
| 401
|-
| style="font-weight:bold;" | type
| Тип
| string
|
|}
{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "yii\\web\\UnauthorizedHttpException"
}