Xero · Example Payload

Xero Createaccount Example

AccountingBank FeedsFinanceFinancial ServicesInvoicingPayrollSmall Business

Xero Createaccount 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": "createAccount",
  "method": "PUT",
  "path": "/Accounts",
  "summary": "Xero Creates a new chart of accounts",
  "requestExamples": [
    {
      "contentType": "application/json",
      "example": {
        "Code": "123456",
        "Name": "Foobar",
        "Type": "EXPENSE",
        "Description": "Hello World"
      }
    }
  ],
  "responseExamples": [
    {
      "status": "200",
      "contentType": "application/json",
      "example": {
        "Id": "11814c9d-3b5e-492e-93b0-fad16bf3244f",
        "Status": "OK",
        "ProviderName": "Xero API Partner",
        "DateTimeUTC": "/Date(1550793549392)/",
        "Accounts": [
          {
            "AccountID": "66b262e2-561e-423e-8937-47d558f13442",
            "Code": "123456",
            "Name": "Foobar",
            "Status": "ACTIVE",
            "Type": "EXPENSE",
            "TaxType": "INPUT",
            "Description": "Hello World",
            "Class": "EXPENSE",
            "EnablePaymentsToAccount": false,
            "ShowInExpenseClaims": false,
            "ReportingCode": "EXP",
            "ReportingCodeName": "Expense",
            "UpdatedDateUTC": "/Date(1550793549320+0000)/"
          }
        ]
      }
    },
    {
      "status": "400",
      "contentType": "application/json",
      "example": {
        "ErrorNumber": 10,
        "Type": "ValidationException",
        "Message": "A validation exception occurred",
        "Elements": [
          {
            "AccountID": "00000000-0000-0000-0000-000000000000",
            "Code": "123456",
            "Name": "Foobar",
            "Type": "EXPENSE",
            "Description": "Hello World",
            "ValidationErrors": [
              {
                "Message": "Please enter a unique Name."
              }
            ]
          }
        ]
      }
    }
  ]
}