Accounts-accountId-invoicesInfo-invoiceId:GET

From Hostway API Documentation
Revision as of 23:58, 1 July 2014 by Mike.robski (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

GET /accounts/{accountId}/invoces/{invoiceId}

Retrieves an individual invoice.

Contents

Request

GET /accounts/{accountId}/invoces/{invoiceId}

Parameters

accountId - string
The Id of the account.
invoiceId - string
The Id of the invoice.

URI Parameters

None.

Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.
Accept - HTTP Accept header. Possible values are application/json, application/pdf. If omitted json will be returned [2]

Response

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 or invoice was not found

Response Body

{
    "status": "{status}",
    "currency": "{currency}",
    "amount": "{amount}",
    "amountDue": "{amountDue}",
    "description": "{description}",
    "links": [{
        "href": "https://api.hostway.com/accounts/{accountId}/invoices/{invoiceId}/",
        "rel": "self"
    }],
    "date": "{date}",
    "statusName": "{statusName}",
    "invoiceNumber": "{invoiceNumber}"
}
 

Parameters

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 this resource. Links to self

Examples

GET invoice

Request

GET {{APIBaseURL}}/accounts/test731993/invoices/123456

Response

HTTP/1.1 200 OK

{
    "status": "invoice_paid", 
    "currency": "USD", 
    "amount": "1113.7500", 
    "amountDue": "0.0000", 
    "description": "Invoice #123456", 
    "links": [
        {
            "href": "{{APIBaseURL}}/accounts/test731993/invoices/123456/", 
            "rel": "self"
        }
    ], 
    "date": "2011-11-10", 
    "statusName": "Invoice Paid", 
    "invoiceNumber": "123456"
}
 

GET invoice PDF

Request

GET {{APIBaseURL}}/accounts/test731993/invoices/123456 Accept: application/pdf

Response

HTTP/1.1 200 OK
Content-Type : application/pdf

%PDF-1.4
....
%%EOF
 

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox