Settlements
General information
This service allows getting information about the cash flow per waybills and paid bills.
To get data through this service it is necessary to have full access to the counterparty from the account (see Available counterparties method, response parameter "info.accessLevel").
Settlements
Method request
Request structure
Method address: https://api.dellin.ru/v2/mutual_calculations.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "cauid":"00000000-0000-0000-0000-000000000000", "month":1, "year":2020 }
Method address: https://api.dellin.ru/v2/mutual_calculations.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <cauid>00000000-0000-0000-0000-000000000000</cauid> <month>1</month> <year>2020</year> </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 information about the mutual settlements is required. It is necessary to have full access to the counterparty from the account (see Available counterparties method, response parameter "info.accessLevel"). If the parameter is not passed in the request, then information on the default counterparty will be passed in the response |
month | Yes | integer | Month for which information is required (1) |
year | Yes | integer | Year for which information is required (1) |
Notes: (1) To get the list of periods for which information on mutual settlements is available, use "Mutual settlements periods" method |
Method response
Response structure
{ "metadata":{ "status":200, "generated_at":"2015-06-18 12:37:28" }, "data":{ "balance":{ "opening":{ "date":"2016-04-01 00:00:00", "sum":380 }, "closing":{ "date":"2016-04-30 23:59:59", "sum":0 } }, "documents":[ { "sum":1042.5, "doc":"Накладная 16-00031037176 от 1 апреля 2016 г.", "date":"2016-04-01 17:29:33", "docType":"Накладная", "docID":"16-00031037176", "description":"Накладная 16-00031037176 от 1 апреля 2016 г.", "begin":380, "end":1422.5, "debit":1042.5, "credit":0, "paymentInfo":{ "paymentLink":"https://test.pps.gazprombank.ru/payment/start.wsm?lang=RU&merch_id=C9871DDCA9035AE7008B3A6F99612EAE&back_url_s=http://www.dellin.stage/cabinet/orders/&back_url_f=http://www.dellin.stage/cabinet/orders/? fail_payment=1&o.order[doc_id]=2000085008385&o.user_id=132961&o.payer_uid=0x9417742b9f16abc042749fd9e5de4c21&o.doc_uid=0x819500505683398711ea40e20a435d1b&o.platform=ios&o.paymentState=not_paid", "payment":true, "paymentState":"paid", "dataForReceipt":{ "phoneNumber":"+79110000000", "email":"meow@mail.ru" } }, "cashOrder":1, "docSQLuid":"0xac62ce6428515cce4086e2efa77c06dd", "giveOutDate":"2016-04-06 17:17:53" }, { "sum":1042.5, "doc":"Приходный кассовый ордер 03022000156 от 6 апреля 2016 г.", "date":"2016-04-06 17:19:13", "docType":"ПКО", "docID":"03022000156" }, { "sum":380, "doc":"Приходный кассовый ордер 03022000158 от 6 апреля 2016 г.", "date":"2016-04-06 17:25:00", "docType":"ПКО", "docID":"03022000158" } ] } }
<response> <metadata> <status>200</status> <generated_at>2015-06-18 12:37:28</generated_at> </metadata> <data> <balance> <opening> <date>2016-04-01 00:00:00</date> <sum>380</sum> </opening> <closing> <date>2016-04-30 23:59:59</date> <sum>0</sum> </closing> </balance> <documents> <sum>1042.5</sum> <doc>Накладная 16-00031037176 от 1 апреля 2016 г.</doc> <date>2016-04-01 17:29:33</date> <docType>Накладная</docType> <docID>16-00031037176</docID> <description>Накладная 16-00031037176 от 1 апреля 2016 г.</description> <begin>380</begin> <end>1422.5</end> <debit>1042.5</debit> <credit>0</credit> <paymentInfo> <paymentLink>https://test.pps.gazprombank.ru/payment/start.wsm?lang=RU&merch_id=C9871DDCA9035AE7008B3A6F99612EAE&back_url_s=http://www.dellin.stage/cabinet/orders/&back_url_f=http://www.dellin.stage/cabinet/orders/? fail_payment=1&o.order[doc_id]=2000085008385&o.user_id=132961&o.payer_uid=0x9417742b9f16abc042749fd9e5de4c21&o.doc_uid=0x819500505683398711ea40e20a435d1b&o.platform=ios&o.paymentState=not_paid</paymentLink> <payment>true</payment> <paymentState>paid</paymentState> <dataForReceipt> <phoneNumber>+79110000000</phoneNumber> <email>meow@mail.ru</email> </dataForReceipt> </paymentInfo> <cashOrder>1</cashOrder> <docSQLuid>0xac62ce6428515cce4086e2efa77c06dd</docSQLuid> <giveOutDate>2016-04-06 17:17:53</giveOutDate> </documents> <documents> <sum>1042.5</sum> <doc>Приходный кассовый ордер 03022000156 от 6 апреля 2016 г.</doc> <date>2016-04-06 17:19:13</date> <docType>ПКО</docType> <docID>03022000156</docID> </documents> <documents> <sum>380</sum> <doc>Приходный кассовый ордер 03022000158 от 6 апреля 2016 г.</doc> <date>2016-04-06 17:25:00</date> <docType>ПКО</docType> <docID>03022000158</docID> </documents> </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 data |
data.balance | Balance | Information about the cash flow |
data.documents | array of Documents | Information about the documents. The array is present in the response only if there was any cash flow during the specified period |
Balance
Balance | ||
---|---|---|
Parameter | Type | Description |
opening | object | Opening balance |
opening.date | string | Period start date |
opening.sum | float | Amount at the beginning of the period, rubles |
closing | object | Closing balance |
closing.date | string | Period end date |
closing.sum | float | Amount at the end of the period, rubles |
Documents
Documents | ||
---|---|---|
Parameter | Type | Description |
sum | float | Amount on the document, rubles. In case of payment voucher and waybill ("data.documents.docType" response parameter value is "РКО" or "накладная") the parameter value is a negative number, in other cases - positive number |
doc | string | Document name and details |
date | string | Document creation date Format: YYYY-MM-DD HH:MM:SS |
docType | string | Document type |
docID | string | Document number |
description | string | Full document name (1) |
begin | float | Amount at the period start date, rubles (1) |
end | float | Amount at the period end date, rubles (1) |
debit | float | Amount to be paid, rubles (1) |
credit | float | Debt amount, rubles (1) |
paymentInfo | object | Payment information (1) |
paymentInfo.paymentLink | string | Payment link. The parameter is present in the response only if the payment has not been made ("paymentInfo.paymentState" parameter value is "not_paid") |
paymentInfo.payment | boolean | Information on cash receipt note (1) Possible values:
|
paymentInfo.paymentState | string | Waybill payment status. Possible values:
|
paymentInfo.dataForReceipt | DataForReceipt | Contact data to send the payment receipt to the individual. The parameter is present in the response only if the default counterparty/the counterparty whose UID was passed in the request (see "cauid" parameter description) is the payer on the waybill. The data can be used to pre-fill the payment form |
cashOrder | integer | Receipt (payment document) number (1) |
docSQLuid | string | Document UID (1) |
giveOutDate | string | Document give out date (1) Format: YYYY-MM-DD HH:MM:SS |
Notes:
|
DataForReceipt
DataForReceipt | ||
---|---|---|
Parameter | Type | Description |
phoneNumber | string | Phone number for sending the payment receipt. The data is present in the response, if there is the information in the address book |
string | Email address for sending the payment receipt. The data is present in the response, if there is the information in the address book |
Error handling
Except for common API errors the method response may contain the following errors:
Error number | http-code | Error title | |
---|---|---|---|
Title | Translation | ||
703001 | 403 | Доступ к контрагентам отсутствует | No access to the counterparties |