Accounts-accountId-transactionsInfo:GET
From Hostway API Documentation
(Difference between revisions)
(→GET paginated transaction list call) |
Mike.robski (Talk | contribs) m (1 revision: Release 111) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 13: | Line 13: | ||
=== Request Headers === | === Request Headers === | ||
− | {{Authorization}} | + | |
+ | ;: {{Authorization}} | ||
+ | ; Accept - HTTP Accept header [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1] | ||
+ | : Possible values are ''application/json'', ''text/csv''. If omitted json will be returned. | ||
== Response == | == Response == |
Latest revision as of 11:10, 18 September 2015
[edit] GET /accounts/{accountId}/transactions
Retrieves a list of all account's transactions
Contents |
[edit] Request
GET /accounts/{accountId}/transactions
[edit] Parameters
- accountId - string
- The Id of the account.
[edit] URI Parameters
None.
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
- Accept - HTTP Accept header [2]
- Possible values are application/json, text/csv. If omitted json will be returned.
[edit] Response
[edit] 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 account Id was not found.
[edit] Response Body
{ { "list": [{ "startDate": "{startDate}", "endDate": "{endDate}", "amount": {amount}, "description": "{description}", "currency": "{currency}", "date": "{date}", "productSpecification": "", "serviceNumber": "{serviceNumber}", "type": "{type}", "number": {number} }], "links" : [{ "href" : "https://api.hostway.com/accounts/{account_id}/transactions", "rel" : "self" }] }
[edit] Parameters
- list - list
- A collection of dictionaries containing information about transactions
- startDate - string
- Start date of transaction
- endDate - string
- End date of transaction
- ammount - integer
- Amount of transaction
- description - string
- Description of transaction
- currency - string
- Currency symbol of transaction
- date - string
- Date of transaction
- productSpecification - link
- URL link to the product specification
- serviceNumber - string
- Service number info
- type - 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'
- number - int
- Transaction's number
- links - list
- Hypermedia for the individual payment method
- links - list
- Hypermedia for this resource. Links to self
[edit] Examples
[edit] GET paginated transaction list call
Request
GET {{APIBaseURL}}/accounts/test731993/transactions?page=1&pageSize=10
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": "charge", "number": 101393524 }], "links" : [ { "href" : "{{APIBaseURL}}/accounts/test731993/transactions?page=1&pageSize=10", "rel" : "self" }, { "href" : "{{APIBaseURL}}/accounts/test731993/transactions?page=2&pageSize=10", "rel" : "next" }, { "href" : "{{APIBaseURL}}/accounts/test731993/transactions?page=44&pageSize=10", "rel" : "last" }] }
[edit] See also