Accounts-accountId-invoices-invoiceId-transactions:GET

From Hostway API Documentation
Jump to: navigation, search

GET /accounts/{accountId}/invoices/{invoiceId}/transactions

Retrieves a list of transactions for a specific account and and invoice

Contents


Request

GET /accounts/{accountId}/invoices/{invoiceId}/transactions

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

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}",
            "isRolledUp": "{isRolledUp}"
        }
    ],
    "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
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

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

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox