If you haven’t used WAPI before, read the WAPI Manual first.
This article provides information on the following requests:
- account-list – credit account movement list
- credit-info – current credit balance information
account-list
Use the account-list request to retrieve a list of movements on your credit account in the selected period.
Parameters
- date_from – initial date of listed movements in YYYY-MM-DD format
- date_to – final date of listed movements in YYYY-MM-DD format
Return Values
- 1000 – OK
- 3004 – invalid input – missing from and to dates
- 3005 – invalid input – invalid data
Response Data
The request returns a the following information:
- ID – movement identifier
- type – type (payment or deposit)
- num – order number
- description
- amount
- bill_num – invoice number
- bill_date – invoice date
- blocked – blocked credit
- created_date – date and time of request
Templates
JSON account-list
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "account-list", "clTRID": "your ID", "data": { "date_from": "YYYY-MM-DD", "date_to": "YYYY-MM-DD" } } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "account-list", "data": { "XXXX": { "ID": "XXXX (account movement ID)", "type": "payment or deposit", "num": "order number", "description": "description", "amount": "amount", "bill_num": "", "bill_date": "", "blocked": 0, "created_date": "date and time of request" } } } }
credit-info
Use the credit-info request to find out the current credit balance on your credit account.
Parameters
This request takes no parameters.
Return Values
- 1000 – OK
Response Data
- amount – credit account balance
- currency – credit account currency
Templates
JSON credit-info
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "credit-info", "clTRID": "your ID", } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "credit-info", "data": { "amount": "account balance", "currency": "currency code" } } }