Accounts-accountId-invoicesInfo-filtered-type:GET
From Hostway API Documentation
GET /accounts/{accountId}/invoice?filterStatus={filterStatus}
Gets a list of account's invoices filtered by status
Contents |
Request
GET /accounts/{accountId}/invoices?filterStatus={filterStatus}
Parameters
- accountId - string
- The Id of the account.
- filterType - string
- Type of transaction. Possible values are: 'charge', 'charge_back', 'payment', 'fee', 'refund', 'credit', 'cc_chargeback', 'charge_adjustment', 'discount', 'credit_adjustment', 'credit_proration', 'charge_proration', 'payment_adjustment', 'tax', 'cc_chargeback_reversal', 'usage_charge', 'write_off', 'undo_write_off', 'usage_discount'
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Status Code
- 200 OK
- Success
- 401 Unauthorized
- The supplied credentials are invalid or do not provide permissions for this operation.
- 403 Forbidden
- The user lacks the necessary permissions to access the resource
- 404 Not Found
- The accountId was not found.
Response Body
{
{
"list": [{
"status": "{status}",
"currency": "{currency}",
"amount": "{amount}",
"amountDue": "{amountDue}",
"description": "{description}",
"date": "{date}",
"statusName": "{statusName}",
"invoiceNumber": "{invoiceNumber}"
}],
"links" : [{
"href" : "https://api.hostway.com/accounts/{account_id}/invoices",
"rel" : "self"
}]
}
Parameters
- list - list
- A collection of dictionaries containing information about invoices
- status - string
- Status of invoice
- currency - string
- Currency of invoice
- ammount - string
- Amount of invoice
- amountDue - string
- Amount due of invoice
- description - string
- Description of invoice
- date - string
- Date of invoice
- statusName - string
- Status of invoice
- invoiceNumber - string
- Invoice number
- links - list
- Hypermedia for this resource. Links to self
Examples
GET paginated invoices list call
Request
GET {{APIBaseURL}}/accounts/test731993/invoices?filterStatus=invoice_paid&page=1&pageSize=5
Response
HTTP/1.1 200 OK
{
"list" : [ {
"startDate": "2012-04-23",
"amount": 0.87,
"endDate": "2012-05-18",
"description": "Recurring fee Exchange 2010 Archiving, core.email.exchange2010.archiving 04/23/2012 through 05/18/2012",
"currency": "USD",
"date": "2012-04-23",
"productSpecification": "{{APIBaseURL}}/productSpecifications/test731993-00000137a32daee9e2b08715000a30fe33d32c",
"serviceNumber": "test731993-00000136dedf26dfd9ec22fd000a1ddba01da1",
"type": "payment",
"number": 101393524
}],
"links" : [
{
"href" : "{{APIBaseURL}}/accounts/test731993/invoices?page=1&pageSize=5",
"rel" : "self"
},
{
"href" : "{{APIBaseURL}}/accounts/test731993/invoices?page=2&pageSize=5",
"rel" : "next"
},
{
"href" : "{{APIBaseURL}}/accounts/test731993/invoices?page=44&pageSize=5",
"rel" : "last"
}]
}
See also