Xero · Example Payload

Xero Getinvoice Example

AccountingBank FeedsFinanceFinancial ServicesInvoicingPayrollSmall Business

Xero Getinvoice Example is an example object payload from Xero, with 6 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdmethodpathsummaryrequestExamplesresponseExamples

Example Payload

Raw ↑
{
  "operationId": "getInvoice",
  "method": "GET",
  "path": "/Invoices/{InvoiceID}",
  "summary": "Xero Retrieves a specific sales invoice or purchase bill using a unique invoice Id",
  "requestExamples": [],
  "responseExamples": [
    {
      "status": "200",
      "contentType": "application/json",
      "example": {
        "Id": "516f400a-b764-4c88-831b-12d2b210fa24",
        "Status": "OK",
        "ProviderName": "Provider Name Example",
        "DateTimeUTC": "/Date(1551981658323)/",
        "Invoices": [
          {
            "Type": "ACCREC",
            "InvoiceID": "a03ffcd2-5d91-4c7e-b483-318584e9e439",
            "InvoiceNumber": "INV-0006",
            "Reference": "Tour",
            "Payments": [
              {
                "PaymentID": "38928000-e9a0-420c-8884-f624bab2a351",
                "Date": "/Date(1552953600000+0000)/",
                "Amount": 148062.76,
                "Reference": "Yahoo",
                "CurrencyRate": 1.0,
                "HasAccount": false,
                "HasValidationErrors": false
              }
            ],
            "Prepayments": [],
            "Overpayments": [],
            "AmountDue": 0.0,
            "AmountPaid": 148062.76,
            "SentToContact": false,
            "CurrencyRate": 1.0,
            "HasErrors": false,
            "IsDiscounted": false,
            "HasAttachments": true,
            "Attachments": [
              {
                "AttachmentID": "3a2fe7e0-fac7-4ea2-afb2-31cedaabd294",
                "FileName": "helo-heros.jpg",
                "Url": "https://api.xero.com/api.xro/2.0/Invoices/a03ffcd2-5d91-4c7e-b483-318584e9e439/Attachments/helo-heros.jpg",
                "MimeType": "image/jpeg",
                "ContentLength": 2878711
              }
            ],
            "Contact": {
              "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
              "ContactStatus": "ACTIVE",
              "Name": "Liam Gallagher",
              "FirstName": "Liam",
              "LastName": "Gallagher",
              "EmailAddress": "liam@rockstar.com",
              "BankAccountDetails": "",
              "Addresses": [
                {
                  "AddressType": "STREET",
                  "City": "",
                  "Region": "",
                  "PostalCode": "",
                  "Country": "",
                  "AttentionTo": ""
                },
                {
                  "AddressType": "POBOX",
                  "City": "Anytown",
                  "Region": "NY",
                  "PostalCode": "10101",
                  "Country": "USA",
                  "AttentionTo": ""
                }
              ],
              "Phones": [
                {
                  "PhoneType": "DEFAULT",
                  "PhoneNumber": "222-2222",
                  "PhoneAreaCode": "212",
                  "PhoneCountryCode": ""
                },
                {
                  "PhoneType": "DDI",
                  "PhoneNumber": "",
                  "PhoneAreaCode": "",
                  "PhoneCountryCode": ""
                },
                {
                  "PhoneType": "FAX",
                  "PhoneNumber": "333-2233",
                  "PhoneAreaCode": "212",
                  "PhoneCountryCode": ""
                },
                {
                  "PhoneType": "MOBILE",
                  "PhoneNumber": "444-3433",
                  "PhoneAreaCode": "212",
                  "PhoneCountryCode": ""
                }
              ],
              "UpdatedDateUTC": "/Date(1551747281053+0000)/",
              "ContactGroups": [
                {
                  "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
                  "Name": "Oasis",
                  "Status": "ACTIVE",
                  "Contacts": [],
                  "HasValidationErrors": false
                }
              ],
              "IsSupplier": true,
              "IsCustomer": true,
              "SalesTrackingCategories": [],
              "PurchasesTrackingCategories": [],
              "ContactPersons": [
                {
                  "FirstName": "Debbie",
                  "LastName": "Gwyther",
                  "EmailAddress": "debbie@rockstar.com",
                  "IncludeInEmails": false
                }
              ],
              "HasValidationErrors": false
            },
            "DateString": "2019-03-07 00:00:00",
            "Date": "/Date(1551916800000+0000)/",
            "DueDateString": "2019-03-13 00:00:00",
            "DueDate": "/Date(1552435200000+0000)/",
            "Status": "PAID",
            "LineAmountTypes": "Exclusive",
            "LineItems": [
              {
                "ItemCode": "123",
                "Description": "Guitars Fender Strat",
                "UnitAmount": 148062.76,
                "TaxType": "NONE",
                "TaxAmount": 0.0,
                "LineAmount": 148062.76,
                "AccountCode": "200",
                "Tracking": [],
                "Quantity": 1.0,
                "LineItemID": "b18f39d9-7739-4246-9288-72afe939d2d5",
                "ValidationErrors": []
              }
            ],
            "SubTotal": 148062.76,
            "TotalTax": 0.0,
            "Total": 148062.76,
            "UpdatedDateUTC": "/Date(1551981568133+0000)/",
            "CurrencyCode": "NZD",
            "FullyPaidOnDate": "/Date(1552953600000+0000)/",
            "StatusAttributeString": "ERROR",
            "ValidationErrors": [
              {
                "Message": "Invoice # must be unique."
              }
            ]
          }
        ]
      }
    }
  ]
}