Settlements periods
Mutual settlements periods
The method allows getting the list of periods for which information on mutual settlements is available.
Method request
Request sturcture
Method address: https://api.dellin.ru/v2/mutual_period.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "cauid":"00000000-0000-0000-0000-000000000000" }
Method address: https://api.dellin.ru/v2/mutual_period.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <cauid>00000000-0000-0000-0000-000000000000</cauid> </request>
Description of parameters
Request
Request | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Yes | string | Application key. To get the key, register |
sessionID | Yes | string | To get the session ID, use the User Authorization method |
cauid | No | string | UID of counterparty on which the list of periods is required (see "Available counterparties" method). If parameter is not passed in the request, then information on the default counterparty will be passed in the response |
Method response
Response structure
{ "metadata":{ "status":200, "generated_at":"2015-06-18 12:37:28" }, "data":{ "years":{ "2016":{ "months":[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] }, "2017":{ "months":[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] } } } }
<response> <metadata> <status>200</status> <generated_at>2015-06-18 12:37:28</generated_at> </metadata> <data> <years> <2016> <months>1</months> <months>2</months> <months>3</months> <months>4</months> <months>5</months> <months>6</months> <months>7</months> <months>8</months> <months>9</months> <months>10</months> <months>11</months> <months>12</months> </2016> <2017> <months>1</months> <months>2</months> <months>3</months> <months>4</months> <months>5</months> <months>6</months> <months>7</months> <months>8</months> <months>9</months> <months>10</months> <months>11</months> <months>12</months> </2017> </years> </data> </response>
Description of parameters
Response
Response | ||
---|---|---|
Parameter | Type | Description |
metadata | object | System information |
metadata.status | integer | Emulated status http-code. If successful, code 200 is returned |
metadata.generated_at | string | Server response date and time. Format: YYYY-MM-DD HH:MM:SS |
data | object | Mutual settlements periods info |
data.Years | Years | List of years for which information about the mutual settlements is available |
Years
Response.Years | ||
---|---|---|
Parameter | Type | Description |
[Year] | object | The year for which the information about the settlements is available (name of the object is the number of the year for example "2016") |
[Year].months | array of integers | List of months within the specified year ([Year]) for which information about the mutual settlements is available |
Error handling
Except for common API errors the method response may contain the following errors:
Error number | http-code | Error title | |
---|---|---|---|
Title | Translation | ||
704001 | 403 | Доступ к контрагентам отсутствует | No access to the counterparties |