Accounts-accountId-invoicesInfo:GET

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
 
m (1 revision: Release 93)
 

Latest revision as of 02:34, 8 May 2014

[edit] GET /accounts/{accountId}/invoices

Retrieves a list of all account's invoices

Contents

[edit] Request

GET /accounts/{accountId}/invoices

[edit] Parameters

accountId - string
The Id of the account.


[edit] Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.

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

[edit] 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 the individual payment method
links - list
Hypermedia for this resource. Links to self

[edit] Examples

[edit] GET paginated invoices list call

Request

GET {{APIBaseURL}}/accounts/test731993/invoices?page=1&pageSize=3

Response

HTTP/1.1 200 OK

{
  "list" : [ {
      "status": "invoice_paid", 
      "currency": "USD", 
      "amount": "1023.7200", 
      "amountDue": "0.0000", 
      "description": "Invoice #SO-360704", 
      "date": "2011-04-19", 
      "statusName": "Invoice Paid", 
      "invoiceNumber": "SO-360704"
  }],
  "links" : [ 
    {
      "href" : "{{APIBaseURL}}/accounts/test731993/invoices?page=1&pageSize=3",
      "rel" : "self"
    },
    {
      "href" : "{{APIBaseURL}}/accounts/test731993/invoices?page=2&pageSize=3",
      "rel" : "next"
    },
    {
      "href" : "{{APIBaseURL}}/accounts/test731993/invoices?page=4&pageSize=3",
      "rel" : "last"
  }]
}
 

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox