Accounts-accountId-invoices-invoiceId-transactions:GET
From Hostway API Documentation
(Difference between revisions)
(→GET /accounts/{accountId}/invoices/{invoiceID}/transctions) |
Mike.robski (Talk | contribs) m (1 revision: Release 105) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | = GET /accounts/{accountId}/invoices/{invoiceId}/ | + | = GET /accounts/{accountId}/invoices/{invoiceId}/transactions = |
Retrieves a list of transactions for a specific account and and invoice | Retrieves a list of transactions for a specific account and and invoice | ||
__TOC__ | __TOC__ | ||
== Request == | == Request == | ||
| − | <code>GET /accounts/{accountId}/invoices/{invoiceId}/ | + | <code>GET /accounts/{accountId}/invoices/{invoiceId}/transactions</code> |
==== Request Parameters ==== | ==== Request Parameters ==== | ||
| Line 35: | Line 35: | ||
: The order in which the sorting is to be done. Allowed values are '''asc''' and '''desc''' | : The order in which the sorting is to be done. Allowed values are '''asc''' and '''desc''' | ||
| + | ; allowRollup - ''boolean'' | ||
| + | : Allows roll up of any charge or credit transactions in an invoice if the product associated with the transaction supports roll up. Default is not to allow roll up. | ||
== Response == | == Response == | ||
| Line 62: | Line 64: | ||
"serviceNumber": "{serviceNumber}", | "serviceNumber": "{serviceNumber}", | ||
"type": "{type}", | "type": "{type}", | ||
| − | "number": "{number}" | + | "number": "{number}", |
| + | "isRolledUp": "{isRolledUp}" | ||
} | } | ||
], | ], | ||
| Line 104: | Line 107: | ||
; number - ''string'' | ; number - ''string'' | ||
: Number of transaction | : Number of transaction | ||
| + | |||
| + | ; isRolledUp - ''integer'' | ||
| + | : Indicates if transaction is the aggregate of several rolled up transactions for the invoice. Possible values 1 if rolled up, 0 if not | ||
; href - ''string'' | ; href - ''string'' | ||
| Line 132: | Line 138: | ||
"serviceNumber": "test-account-0000013128ec0f17330329ef000a000a000800", | "serviceNumber": "test-account-0000013128ec0f17330329ef000a000a000800", | ||
"type": "charge", | "type": "charge", | ||
| − | "number": 101378490 | + | "number": 101378490, |
| + | "isRolledUp": 0 | ||
}, | }, | ||
... | ... | ||
| Line 143: | Line 150: | ||
} | } | ||
</nowiki> | </nowiki> | ||
| − | |||
== See also == | == See also == | ||
Latest revision as of 12:50, 3 April 2015
[edit] GET /accounts/{accountId}/invoices/{invoiceId}/transactions
Retrieves a list of transactions for a specific account and and invoice
Contents |
[edit] Request
GET /accounts/{accountId}/invoices/{invoiceId}/transactions
[edit] Request Parameters
- accountId - string
- The user account owning the invoice
- invoiceId - string
- The specific invoice for which the call will retrieve the list
[edit] 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
- allowRollup - boolean
- Allows roll up of any charge or credit transactions in an invoice if the product associated with the transaction supports roll up. Default is not to allow roll up.
[edit] Response
[edit] 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.
[edit] Response Body
{
"list": [
{
"startDate": "{startDate}",
"endDate": {endDate},
"currency": {currency},
"amount": "{amount}",
"description": "{description}",
"date": "{date}",
"productSpecification": "{productSpecification}",
"serviceNumber": "{serviceNumber}",
"type": "{type}",
"number": "{number}",
"isRolledUp": "{isRolledUp}"
}
],
"links": [
{
"href": "{href}",
"rel": "{rel}"
}
]
}
[edit] 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
- isRolledUp - integer
- Indicates if transaction is the aggregate of several rolled up transactions for the invoice. Possible values 1 if rolled up, 0 if not
- href - string
- Link to other resources relevant to the mailboxes lists
- rel - string
- Type of relation to the resource for the provided link
[edit] Examples
[edit] 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,
"isRolledUp": 0
},
...
],
"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"}
]
}
[edit] See also