Changing the order payer data
General information
The service allows changing the payer for an already placed order. To change the payer it is necessary to have full access to the new payer or to the to the sender (in this case the sender, the receiver of a third party can be appointed payer). See "Available counterparties" method, response parameter "info.accessLevel".
To change the recipient for the order and appointing the new recipient as the payer, use "Changing the order receiver data" method.
To check the possibility of changing the payer, use "Checking possibility to change the order" method.
The changes do not come into effect immediately. After further verification the request can be approved or declined. To check the change request status use "Change history" method.
Changing the order payer data
Method request
Request structure
Method address: https://api.dellin.ru/v3/orders/change_payer.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "orderID":"00000000", "docUID":"0x81870050568388af11ea718b63f47df1", "counteragentUID":"0x8f51001438c4d49511dbd774581edb7a", "third":{ "form":"0x8F51001438C4D49511DBD774581EDB80", "document":{ "type":"passport", "serial":"1111", "number":"123456" }, "inn":1234567890, "name":"Ромашка", "juridicalAddress":{ "search":"Омск, Ленина, 5", "street":"5500000100005970000000000", "house":"5", "building":"1", "structure":"3А", "flat":"Б-234" } }, "contactIDs":[ 12345678, 78456123 ], "contactPersons":[ { "name":"Иван Иванович" }, { "name":"Петр Петрович" } ], "phoneIDs":[ 98765412, 65478921 ], "phoneNumbers":[ { "number":"79213332211", "ext":"0123" } ], "dataForReceipt":{ "phone":"+79999999999", "email":"test@mail.ru" } }
Method address: https://api.dellin.ru/v3/orders/change_payer.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <orderID>00000000</orderID> <docUID>0x81870050568388af11ea718b63f47df1</docUID> <counteragentUID>0x8f51001438c4d49511dbd774581edb7a</counteragentUID> <third> <form>0x8F51001438C4D49511DBD774581EDB80</form> <document> <type>passport</type> <serial>1111</serial> <number>123456</number> </document> <inn>1234567890</inn> <name>Ромашка</name> <juridicalAddress> <search>Омск, Ленина, 5</search> <street>5500000100005970000000000</street> <house>5</house> <building>1</building> <structure>3А</structure> <flat>Б-234</flat> </juridicalAddress> </third> <contactIDs>12345678</contactIDs> <contactIDs>78456123</contactIDs> <contactPersons> <name>Иван Иванович</name> </contactPersons> <contactPersons> <name>Петр Петрович</name> </contactPersons> <phoneIDs>98765412</phoneIDs> <phoneIDs>65478921</phoneIDs> <phoneNumbers> <number>79213332211</number> <ext>0123</ext> </phoneNumbers> <dataForReceipt> <phone>+79999999999</phone> <email>test@mail.ru</email> </dataForReceipt> </request>
Description of parameters
Request
Request | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Yes | string | Application key. To get the key, register |
sessionID | Yes | string | Session ID. To get the session ID, use "User authorization" service |
orderID | Yes | string | The number of the order for which it is necessary to change the payer |
docUID | No* | string | Waybill UID. To learn the UID use "Orders list" method. *The parameter is required if several waybill were created for the order |
counteragentUID | No* | string | Counterparty UID (see "Available counterparties" method) The current account should have full access to the sender or the new payer (see "Available counterparties" method, response parameter "info.accessLevel") *One of the excluding parameters is required: "counteragentUID" or "third" |
third | No* | Counteragent | Third party data as a set of parameters To pass the parameter the current account should have full access to the sender (see "Available counterparties" method, response parameter "info.accessLevel") *One of the excluding parameters is required: "counteragentUID" or "third" |
contactIDs | No* | array of integers | Contact persons IDs from "Address book". Maximum 3 elements in the array. *One of the following excluding parameters is required: "contactIDs" or "contactPersons" |
contactPersons | No* | array of contactPersons | Contact persons data. Maximum 3 elements in the array. *One of the following excluding parameters is required: "contactIDs" or "contactPersons" |
contactPersons.name | Yes | string | Contact person name |
phoneIDs | No* | array of integers | Phone number IDs from "Address book". Maximum 3 elements in the array. *One of the following excluding parameters is required: "phoneIDs" or "phoneNumbers" |
phoneNumbers | No* | array of phoneNumbers | Phone numbers list. Maximum 3 elements in the array. *One of the following excluding parameters is required:"phoneIDs" or "phoneNumbers" |
phoneNumbers.number | Yes | string | Phone number. 15 digits maximum |
phoneNumbers.ext | No | string | Extension phone number. 5 digits maximum |
dataForReceipt | No | object | Contact data to send the payment receipt to the individual. The parameter is used only for individuals |
dataForReceipt.phone | No* | string | Phone number for sending the payment receipt, required format: "+79XXXXXXXXX" (where X is any digit). *At least one of the following parameters is required: "dataForReceipt.phone", "dataForReceipt.email" |
dataForReceipt.email | No* | string | Email address for sending the payment receipt. 128 characters maximum *At least one of the following parameters is required: "dataForReceipt.phone", "dataForReceipt.email" |
Counteragent
Counteragent | |||
---|---|---|---|
Parameter | Required | Type | Description |
form | Yes | string | UID of legal form of organization, see "Search of forms of organization" |
name | Yes | string | Individual or company name |
document | No* | object | Personal ID data *If the counterparty is an individual, the parameter is required. If the counterparty is a legal entity, the parameter is ignored |
document.type | Yes | string | Document type. Possible values:
|
document.serial | Yes* | string | Document series *For some countries the parameter is not required and therefore ignored |
document.number | Yes | string | Document number. Number format may vary depending on the country |
inn | No* | string | TIN (taxpayer identification number). Allowed number of characters may vary depending on country and legal form of organization *If the counterparty is a legal entity, the parameter is required. If the counterparty is an individual, the parameter is ignored |
juridicalAddress | No | object | Legal address. The parameter is used for legal entities only (that is when legal entity UID is passed in the "form" parameter) |
juridicalAddress.search | No (1) | string | Address as a string (2). It is possible to pass address as text. When passing address as a text along with the address it is necessary to pass the name of the city, the address elements should be separated by comma, for example "Омск, Ленина, 5". Minimum 2 symbols, maximum 1024 |
juridicalAddress.street | No (1) | string | CLADR* code of the street (see. "CLADR search") (2). *CLADR - Classifier of Addresses of Russian Federation |
juridicalAddress.house | No (1) | string | House number, including the letter. For example, "13/A" (2). Maximum 7 characters |
juridicalAddress.building | No | string | Building (2). Maximum 5 characters |
juridicalAddress.structure | No | string | Structure (2). Maximum 7 characters |
juridicalAddress.flat | No | string | Apartment/office, including the letter. For example, "222 A" (2). Maximum 5 characters |
Notes:
|
Method response
Response structure
{ "metadata":{ "status":200, "generated_at":"2019-11-18 12:52:26" }, "data":{ "status":"success" } }
<response> <metadata> <status>200</status> <generated_at>2019-11-18 12:52:26</generated_at> </metadata> <data> <status>success</status> </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. In case of error - 400 |
metadata.generated_at | string | Server response date and time. Format: YYYY-MM-DD HH:MM:SS |
data | object | Success confirmation |
data.status | string | Status in English. Possible value - "success" "Success" status indicates that the request was accepted. After further verification the request can be approved or declined. To check the change request status use "Change history" method |
Error handling
Except for common API errors the method response may contain the following errors:
Error number | http-code | Error title | Error description | ||
---|---|---|---|---|---|
Title | Translation | Description | Translation | ||
611001 | 400 | По данному заказу изменение плательщика недоступно | The payer for the order can not be changed | - | - |
611002 | 400 | По данному заказу изменение плательщика недоступно | The payer for the order can not be changed | Детальное описание ошибки содержит уточняющую информацию. Текст варьируется в зависимости от проверяемого параметра | The error description contains the additional information. The text varies depending on the parameter verified |
611003 | 400 | Необходимо указать накладную | Please indicate the waybill number | - | - |
611004 | 400 | Данная накладная уже оплачена | The payment on the waybill has been already made | - | - |