Read Invoice As JSON

This action allows you to retrieve a single posted invoice by Id.


Examples
curl -X GET "https://secure.fusebill.com/v1/Invoices/{invoiceId}?showTrackedItems=false" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//query parameter
bool showTrackedItems = false;
int invoiceId = {invoiceId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Invoices/" + invoiceId + "?showTrackedItems="+ showTrackedItems);
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://secure.fusebill.com/v1/Invoices/{id}?showTrackedItems=false', headers=headers)
print(r.content)
Response
{
  "invoiceNumber": 283,
  "invoiceSignature": "<p><img src=\"https://fbhostedpagesdev.blob.core.windows.net/local/logo-636308250883322560.png\" alt=\"{user}\">  <strong>mattLtest</strong>  \n</p>\n<p><em>{user} |  | [][1]</em></p>\n<p>[1]: </p>\n",
  "poNumber": null,
  "effectiveTimestamp": "2017-06-09T13:16:43",
  "postedTimestamp": "2017-06-09T13:16:43",
  "charges": [
    {
      "quantity": 1,
      "unitPrice": 22,
      "amount": 22,
      "name": "Tiered product 2",
      "description": null,
      "glCode": "",
      "effectiveTimestamp": "2017-06-09T13:16:43",
      "proratedUnitPrice": null,
      "startServiceDate": "2017-06-09T13:16:43",
      "endServiceDate": "2017-06-25T04:00:00",
      "rangeQuantity": null,
      "isReversable": true,
      "discount": null,
      "discounts": [],
      "subscriptionProduct": {
        "id": 123456,
        "uri": "https://secure.fusebill.com/v1/subscriptionProducts/{ID}"
      },
      "purchase": null,
      "chargeTiers": [
        {
          "label": "0-2",
          "quantity": 1,
          "unitPrice": 22,
          "amount": 22
        }
      ],
      "id": 123456,
      "uri": null
    }
  ],
  "subtotal": 22,
  "invoiceAmount": 22,
  "totalPayments": 0,
  "outstandingBalance": 22,
  "terms": "Net10",
  "customerId": 123456,
  "invoiceCustomer": {
    "firstName": "John",
    "middleName": null,
    "lastName": "Smith",
    "companyName": null,
    "suffix": null,
    "primaryEmail": null,
    "primaryPhone": null,
    "secondaryEmail": null,
    "secondaryPhone": null,
    "title": "",
    "reference": null,
    "status": null,
    "customerAccountStatus": null,
    "currency": "USD",
    "customerReference": null,
    "customerAcquisition": null,
    "monthlyRecurringRevenue": 0,
    "netMonthlyRecurringRevenue": 0,
    "salesforceId": null,
    "salesforceAccountType": null,
    "salesforceSynchStatus": null,
    "netsuiteId": null,
    "netsuiteCustomerType": null,
    "portalUserName": null,
    "parentId": null,
    "quickBooksLatchType": null,
    "quickBooksId": null,
    "quickBooksSyncToken": null,
    "id": 0,
    "uri": null
  },
  "invoiceCustomerAddressPreference": {
    "contactName": null,
    "shippingInstructions": null,
    "useBillingAddressAsShippingAddress": false,
    "billingAddress": null,
    "shippingAddress": null,
    "id": 0,
    "uri": null
  },
  "sumOfCreditNotes": 0,
  "totalWriteoffs": 0,
  "taxes": [],
  "totalDiscount": 0,
  "paymentSchedules": [
    {
      "dueDateTimestamp": "2017-06-19T13:16:43",
      "status": "Due",
      "amount": 22,
      "outstandingBalance": 22,
      "daysDueAfterTerm": 0
    }
  ],
  "notes": "api test",
  "customerReferenceValue": "",
  "openingArBalance": 0,
  "closingArBalance": 22,
  "invoiceInMemoryOnly": false,
  "invoiceRevisions":[],
  "id": 162281,
  "uri": "https://secure.fusebill.com/v1/Invoices/{ID}"
}
{
  "invoiceNumber": 283,
  "invoiceSignature": "<p><img src=\"https://fbhostedpagesdev.blob.core.windows.net/local/logo-636308250883322560.png\" alt=\"{user}\">  <strong>mattLtest</strong>  \n</p>\n<p><em>{user} |  | [][1]</em></p>\n<p>[1]: </p>\n",
  "poNumber": null,
  "effectiveTimestamp": "2017-06-09T13:16:43",
  "postedTimestamp": "2017-06-09T13:16:43",
  "chargeGroups": [
    {
      "name": "Bronze Membership",
      "description": "3 screen access",
      "reference": null,
      "subscriptionId": 312965,
      "charges": [
        {
          "quantity": 1,
          "unitPrice": 22,
          "amount": 22,
          "name": "Tiered product 2",
          "description": null,
          "glCode": "",
          "effectiveTimestamp": "2017-06-09T13:16:43",
          "proratedUnitPrice": null,
          "startServiceDate": "2017-06-09T13:16:43",
          "endServiceDate": "2017-06-25T04:00:00",
          "rangeQuantity": null,
          "isReversable": true,
          "discount": null,
          "discounts": [],
          "subscriptionProduct": {
            "id": 123456,
            "uri": "https://secure.fusebill.com/v1/subscriptionProducts/{ID}"
          },
          "purchase": null,
          "chargeTiers": [
            {
              "label": "0-2",
              "quantity": 1,
              "unitPrice": 22,
              "amount": 22
            }
          ],
          "id": 123456,
          "uri": null
        }
      ]
    }
  ],
  "subtotal": 22,
  "invoiceAmount": 22,
  "totalPayments": 0,
  "outstandingBalance": 22,
  "terms": "Net10",
  "customerId": 123456,
  "invoiceCustomer": {
    "firstName": "John",
    "middleName": null,
    "lastName": "Smith",
    "companyName": null,
    "suffix": null,
    "primaryEmail": null,
    "primaryPhone": null,
    "secondaryEmail": null,
    "secondaryPhone": null,
    "title": "",
    "reference": null,
    "status": null,
    "customerAccountStatus": null,
    "currency": "USD",
    "customerReference": null,
    "customerAcquisition": null,
    "monthlyRecurringRevenue": 0,
    "netMonthlyRecurringRevenue": 0,
    "salesforceId": null,
    "salesforceAccountType": null,
    "salesforceSynchStatus": null,
    "netsuiteId": null,
    "netsuiteCustomerType": null,
    "portalUserName": null,
    "parentId": null,
    "quickBooksLatchType": null,
    "quickBooksId": null,
    "quickBooksSyncToken": null,
    "id": 0,
    "uri": null
  },
  "invoiceCustomerAddressPreference": {
    "contactName": null,
    "shippingInstructions": null,
    "useBillingAddressAsShippingAddress": false,
    "billingAddress": null,
    "shippingAddress": null,
    "id": 0,
    "uri": null
  },
  "sumOfCreditNotes": 0,
  "totalWriteoffs": 0,
  "taxes": [],
  "totalDiscount": 0,
  "paymentSchedules": [
    {
      "dueDateTimestamp": "2017-06-19T13:16:43",
      "status": "Due",
      "amount": 22,
      "outstandingBalance": 22,
      "daysDueAfterTerm": 0
    }
  ],
  "notes": "api test",
  "customerReferenceValue": "",
  "openingArBalance": 0,
  "closingArBalance": 22,
  "invoiceInMemoryOnly": false,
  "id": 162281,
  "uri": "https://secure.fusebill.com/v1/Invoices/{ID}"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Invoice with id 2 not found."
        }
    ]
}
Path Params
integer
required

The ID of the invoice you want to retrieve.

boolean
required

When set to true, this option tells Stax Bill to return details of any tracked items purchased on this invoice.

boolean
required

Groups charges into charge groups. Charges are grouped by subscription or purchase. For charge groups that result from a subscription, this returns the related subscriptionId in the JSON. False by default.

Response
200
Language
Credentials
Header
LoadingLoading…