Accounts-accountId-invoices-invoiceId-transactions:GET
(Difference between revisions)
Revision as of 08:38, 25 April 2014
GET /accounts/{accountId}/invoices/{invoiceId}/transctions
Retrieves a list of transactions for a specific account and and invoice
Contents |
Request
GET /accounts/{accountId}/invoices/{invoiceId}/transctions
Request Parameters
- accountId - string
- The user account owning the invoice
- invoiceId - string
- The specific invoice for which the call will retrieve the list
URI Parameters
- filterFrom - date
- Only transactions having startDate after the value of the parameter will be returned
- filterTo - date
- Only transactions having startDate before the value of the parameter will be returned
- filterType - string
- Only transactions having type matching the value of the parameter will be returned. Possible values are: 'charge', 'credit', 'discount'
- page - integer
- Specifies which page should be displayed. Requires a pageSize parameter to also be provided
- pageSize - integer
- Specifies the number of entries to be displayed on a page. Requires a page parameter to also be provided
- sortField - string
- Specifies if the resulting list is to be sorted by a given field. Allowed values are amount, from, to
- sortOrder - string
- The order in which the sorting is to be done. Allowed values are asc and desc
Response
Status Code
- 200 OK
- Success
- 401 Unauthorized
- The supplied credentials are invalid or do not provide permissions for this operation.
- 404 Not Found
- The account or invoice does not exist.
Response Body
{
"list": [
{
"startDate": "{startDate}",
"endDate": {endDate},
"currency": {currency},
"amount": "{amount}",
"description": "{description}",
"date": "{date}",
"productSpecification": "{productSpecification}",
"serviceNumber": "{serviceNumber}",
"type": "{type}",
"number": "{number}"
}
],
"links": [
{
"href": "{href}",
"rel": "{rel}"
}
]
}
Parameters
- startDate - string
- Start date of transaction
- endDate - string
- End date of transaction
- currency - string
- Currency of transaction
- amount - string
- Amount of transaction
- description - string
- Description of transaction
- date - string
- Date of transaction
- productSpecification - string
- Product specification of transaction
- serviceNumber - string
- Service number of transaction
- type - string
- Type of transaction. Possible values are: 'charge', 'credit', 'discount'
- number - string
- Number of transaction
- href - string
- Link to other resources relevant to the mailboxes lists
- rel - string
- Type of relation to the resource for the provided link
Examples
Success scenario
Request
GET /accounts/test-account/invoices/111111/transactions/
Response
{
"list": [
{
"startDate": "2011-06-19",
"amount": 34.65,
"endDate": "2011-07-18",
"description": "Usage Fee test@test.com Rate Type = Exchange mailbox usage, Usage amount = 7",
"currency": "USD", "date": "2011-11-10",
"productSpecification": "{{APIBaseURL}}/productSpecifications/test-acount-000001311f19185dc1df5d10000a000a000800",
"serviceNumber": "test-account-0000013128ec0f17330329ef000a000a000800",
"type": "charge",
"number": 101378490
},
...
],
"links": [
{"href": "{{APIBaseURL}}/accounts/test-account/invoices/111111/transactions?page=1&pageSize=100", "rel": "self"},
{"href": "{{APIBaseURL}}/accounts/test-account/invoices/111111/transactions?page=2&pageSize=100", "rel": "next"},
{"href": "{{APIBaseURL}}/accounts/test-account/invoices/111111/transactions?page=5&pageSize=100", "rel": "last"}
]
}
See also