WAPI – Credit Account

This article deals with WAPI commands specifically for the WEDOS Credit Account. For information on how to set up WAPI and troubleshoot common issues, see the article WAPI – Manual.

This article provides information on the following requests:


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 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 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"
    }
  }
}

Was this helpful?

Thanks for your feedback!
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors