Add payment, method: /api/payment/add/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | cdate | datetime | Payment creation date | Optional field. | If not specified, the current date will be set |
4 | pdate | datetime | Posting date (when the payment became active) | Optional field. | |
5 | rdate | datetime | Payment canceled date | Optional field. | |
6 | sum | float | Payment amount | Required field. | Must not equal 0 |
7 | sumbase | float | Payment amount in base currency | Optional field. | This is the amount in the base currency of the OneBox system (if not specified by the system, fill it in automatically based on the payment amount |
8 | currencyid | integer | ID payment currency | Optional field. | |
9 | currencyname | string | Payment currency name | Optional field. | |
10 | currencyrate | float | The rate of the payment currency relative to the base currency of the system | Optional field. | |
11 | accountid | integer | ID Accounts to which payments should be made in the system | Optional field. | |
12 | accountname | string | Name of the account to which the payment is made in the system | Optional field. | |
13 | accountcode1c | string | External ID of the account to which the payment is made in the system | Optional field. | |
14 | clientid | integer | id the client to whom to create a payment | Optional field. | If you specify then the system will try to find the client by id and link the payment to him |
15 | clientcode1c | string | code1c the client to whom to create a payment | Optional field. | If you specify then the system will try to find the client by code1c and link the payment to him |
16 | clientemail | string | Email the client to whom to create a payment | Optional field. | If you specify then the system will try to find a client by email and link a payment to him |
17 | clientphone | string | Customer's phone number to create a payment on | Optional field. | If you specify, the system will try to find a customer by phone and link a payment to him |
18 | codepayment | string | Payment code | Optional field. | |
19 | clientname | string | The name of the client to whom to create a payment | Optional field. | |
20 | managerid | integer | id the user who will make the payment | Optional field. | If you do not specify, then the user from whom the payment will be created will be taken |
21 | categoryid | interger | Id payment categories | Optional field. | |
22 | categoryname | string | Payment category name | Optional field. | |
23 | orderid | integer | Id order to which to link the payment | Optional field. | If you specify then the system will try to find an order by id and link payment to it |
24 | ordercode1c | integer | code1c order to which to link the payment | Optional field. | If you specify then the system will try to find the order by code1c and link the payment to it |
25 | linkkey | string | Unique payment key | Optional field. | |
26 | comment | string | Payment comment | Optional field. | |
27 | invoiceid | integer | ID cpayment couple | Optional field. | |
28 | nobalance | 1 / 0 | Whether to include this payment in the overall balance | Optional field. | |
29 | code1c | string | Code1c payment (payment id from your system) | Optional field. | |
30 | direction | enum('fromclient','toclient') | Direction of payment (defaults to the amount of payment) | Optional field. |
Add pending payment, method: /api/payment/probation/add/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | pdate | date | Date of expected receipt of payment | Required field. | |
4 | sum | float | Payment amount | Required field. | Must not equal 0 |
5 | currencyid | integer | ID payment currency | Optional field. | |
6 | currencyname | string | Payment currency name | Optional field. | |
7 | accountid | integer | ID Accounts to which payments should be made in the system | Optional field. | |
8 | accountname | string | Name of the account to which the payment is made in the system | Optional field. | |
9 | managerid | integer | id the user who will make the payment | Optional field. | If you do not specify, then the user from whom the payment will be created will be taken |
10 | categoryid | interger | Id payment categories | Optional field. | |
11 | categoryname | string | Payment category name | Optional field. | |
12 | orderid | integer | Id order to which to link the payment | Optional field. | Or the order id or code1c is required to create the expected payment |
13 | ordercode1c | string | code1c order to which to link the payment | Optional field. | Or the order id or code1c is required to create the expected payment |
14 | comment | string | Payment comment | Optional field. | |
15 | received | 1 / 0 | Received payment | Optional field. |
Delete payment, method: /api/payment/delete/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | paymentid | string | Id payment | Required field. | Or payment id or code1c is required to delete |
4 | paymentcode1c | string | Code1c payment | Required field. | Or payment id or code1c is required to delete |
Remove pending payment, method: /api/payment/probation/delete/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | paymentid | integer | Id payment | Required field. | id pending payment is required to delete |
4 | nomessage | 1 / 0 | Не создавать уведомление об удалении | Optional field. |
Editing payment, method: /api/payment/update/
Example:
№ | Field | Type | Description | Required or not | Comment |
---|---|---|---|---|---|
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | paymentid | string | Id payment | Required field. | Or payment id or code1c is required to edit |
4 | paymentcode1c | string | Code1c payment | Required field. | Or payment id or code1c is required to edit |
5 | cdate | datetime | Payment creation date | Optional field. | |
6 | pdate | datetime | Date of payment | Optional field. | |
7 | rdate | datetime | Payment refused date | Optional field. | |
8 | sum | float | Payment amount | Optional field. | |
9 | sumbase | float | Payment amount in base currency | Optional field. | |
10 | currencyid | integer | ID payment currency | Optional field. | |
11 | currencyname | string | Payment currency name | Optional field. | |
12 | accountid | integer | ID Accounts to which payments should be made in the system | Optional field. | |
13 | accountname | string | Name of the account to which the payment is made in the system | Optional field. | |
14 | clientid | integer | id client | Optional field. | If you specify then the system will try to find the client by id and link the payment to him |
15 | clientcode1c | string | code1c client | Optional field. | If you specify then the system will try to find the client by code1c and link the payment to him |
16 | orderid | integer | Id order to which to link the payment | Optional field. | |
17 | ordercode1c | string | Code1c order to which to link payment | Optional field. | |
18 | comment | string | Payment comment | Optional field. |
Receive one expected payment and receive all expected payments, method: /api/payment/probation/get/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | paymentid | integer | id expected payment | Required field. | If you need a specific expected payment, then in this field you pass the id of the expected payment that our API returned to you when it was created. Return field values id - id payment cdate - creation date, amount - payment amount, amountbase - payment amount in the base currency of the system, orderid - id payment order, ordercode1c - external code of the payment process, ordername - name of the payment process, currencyid - id payment currency, currencyname - payment currency name, accountid - id payment account, accountname - payment account name, categoryid - id payment categories, categoryname - payment category name, direction - direction of payment, received - Has the payment been received, managerid - id the employee who created the payment, managerName - name of who created the payment, |
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | cdatefrom | date | Payment creation date from | Optional field. | |
4 | cdateto | date | Payment creation date to | Optional field. | |
5 | pdatefrom | date | Payment received date from | Optional field. | |
6 | pdateto | date | Payment received date to | Optional field. | |
7 | accountid | integer | id pending payment account | Optional field. | |
8 | accountname | string | Account name of the expected payment | Optional field. | |
9 | categoryid | integer | id payment categories | Optional field. | |
10 | categoryname | string | Payment category name | Optional field. | |
11 | orderid | integer | id payment process | Optional field. | |
12 | ordercode1c | string | External code of the payment process | Optional field. | |
13 | received | 1 / 0 | Received payment | Optional field. | 1 - payments received only 0 - only not received payments |
10 | part | integer | Part of orders | Required field. | API gives up to 1000 expected payments in the 1st part, to get the next 1000 orders send 2 there (part 2 is obtained) and so on. Return field values id - id payment cdate - creation date, amount - payment amount, amountbase - payment amount in the base currency of the system, orderid - id payment order, ordercode1c - external code of the payment process, ordername - name of the payment process, currencyid - id payment currency, currencyname - payment currency name, accountid - id payment account, accountname - payment account name, categoryid - id payment categories, categoryname - payment category name, direction - direction of payment, received - Has the payment been received, managerid - id the employee who created the payment, managerName - name of who created the payment, |
Receive one actual payment and receive all actual payments, method: /api/payment/get/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | paymentid | integer | id payment | Required field. | If you need a specific payment, then in this field you pass the payment id that our API returned to you when it was created. Return field values id - id payment code1c - code1c payment cdate - Created date amount- Amount currencyid - payment currency currencyname - payment currency name currencyrate - course amountbase - payment in base currency accountid - id payment account accountname - account name categoryid - id payment categories categoryname - category name virtual - whether the virtual payment is a payment direction - direction of payment clientid - id client clientName - customer name clientCode1c - code1c client userid - id who made the payment userName - name of the provider userCode1c - code1c who made it documentid - id document related to payment comment - Comment referenscode - reference code bankdetail - bank details customfields - additional order product fields that consist of:
|
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | cdatefrom | date | Payment creation date from | Optional field. | |
4 | cdateto | date | Payment creation date to | Optional field. | |
5 | pdatefrom | date | Payment received date from | Optional field. | |
6 | pdateto | date | Payment received date to | Optional field. | |
7 | accountid | integer | id payment account | Optional field. | |
8 | accountname | string | Payment account name | Optional field. | |
9 | categoryid | integer | id payment categories | Optional field. | |
10 | categoryname | string | Payment category name | Optional field. | |
11 | orderid | integer | id payment process | Optional field. | |
12 | ordercode1c | string | External code of the payment process | Optional field. | |
13 | part | integer | Payment part | Required field. | API gives up to 1000 payments in the 1st part, to get the next 1000 orders send 2 there (part 2 is obtained) and so on. Return field values id - id payment code1c - code1c payment cdate - Created date amount- Amount currencyid - payment currency currencyname - payment currency name currencyrate - course amountbase - payment in base currency accountid - id payment account accountname - account name categoryid - id payment categories categoryname - category name virtual - whether the virtual payment is a payment direction - direction of payment clientid - id client clientName - customer name clientCode1c - code1c client userid - id who made the payment userName - name of the provider userCode1c - code1c who made it documentid - id document related to payment comment - Comment referenscode - reference code bankdetail - bank details customfields - additional order product fields that consist of:
|
Get the balances of all financial accounts, method: /api/payment/balance/get/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | contractortype | string | Тип юридического лица | Не обязательное поле. |
Допустимые значения:
|
4 | accountid | integer | id счета | Не обязательное поле. | Если нужно получить баланс только по 1 счету, необходимо указать этот параметр |
Return field values |
Get all budgets balances, method: /api/budget/balance/get/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
Return field values |
Possible responses to the request
№ | Status | Message | Message Description |
1 | ok | paymentid | id added / edited payment |
2 | fail | login_empty | Login missing |
3 | fail | password_empty | Missing password |
4 | fail | Login or password not correct! | Invalid username or password |
5 | fail | Bad user level! | Low user level to perform this action (requires level 2 or higher) |
6 | fail | PaymentCode1c exists | A payment with this code already exists |
7 | fail | FinanceAccount not found | No financial account found |
8 | fail | Payment by id or code1c not found | A payment with this id or code already exists |
9 | fail | Payment accounts not found | No financial accounts found |