Xero Accounting API

Cloud accounting software API

developer.xero.com/documentation ↗
Version
3.0.1
OpenAPI
3.0.0
Endpoints
237
Schemas
171
69
Quality
Updated
3 days ago
Finance accounting finance invoicing
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://api.xero.com/api.xro/2.0

Endpoints

Clear filters

Accounting 10 endpoints

DELETE /Accounts/{AccountID}
operationId: Accounting_deleteChartOfAccounts

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

AccountID path optional string

Unique identifier for Account object

Responses

200

Success - delete existing Account and return response of type Accounts array with deleted Account

400

Validation Error - some data was incorrect returns response of type Error

DELETE /Accounts/{AccountID}
DELETE /ContactGroups/{ContactGroupID}/Contacts
operationId: Accounting_deleteContactsFromGroup

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

ContactGroupID path optional string

Unique identifier for a Contact Group

Responses

204

Success - return response 204 no content

DELETE /ContactGroups/{ContactGroupID}/Contacts
DELETE /ContactGroups/{ContactGroupID}/Contacts/{ContactID}
operationId: Accounting_deleteContactFromGroup

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

ContactGroupID path optional string

Unique identifier for a Contact Group

ContactID path optional string

Unique identifier for a Contact

Responses

204

Success - return response 204 no content

400

A failed request due to validation error

DELETE /ContactGroups/{ContactGroupID}/Contacts/{ContactID}
DELETE /CreditNotes/{CreditNoteID}/Allocations/{AllocationID}
operationId: Accounting_deleteAllocationFromCreditNote

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

CreditNoteID path optional string

Unique identifier for a Credit Note

AllocationID path optional string

Unique identifier for Allocation object

Responses

200

Success - return response of type Allocation with the isDeleted flag as true

DELETE /CreditNotes/{CreditNoteID}/Allocations/{AllocationID}
DELETE /Items/{ItemID}
operationId: Accounting_deleteItem

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

ItemID path optional string

Unique identifier for an Item

Responses

204

Success - return response 204 no content

400

A failed request due to validation error

DELETE /Items/{ItemID}
DELETE /LinkedTransactions/{LinkedTransactionID}
operationId: Accounting_deleteLinkedTransaction

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

LinkedTransactionID path optional string

Unique identifier for a LinkedTransaction

Responses

204

Success - return response 204 no content

400

A failed request due to validation error

DELETE /LinkedTransactions/{LinkedTransactionID}
DELETE /Overpayments/{OverpaymentID}/Allocations/{AllocationID}
operationId: Accounting_deleteAllocationFromOverpayment

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

OverpaymentID path optional string

Unique identifier for a Overpayment

AllocationID path optional string

Unique identifier for Allocation object

Responses

200

Success - return response of type Allocation with the isDeleted flag as true

DELETE /Overpayments/{OverpaymentID}/Allocations/{AllocationID}
DELETE /Prepayments/{PrepaymentID}/Allocations/{AllocationID}
operationId: Accounting_deleteAllocationFromPrepayment

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

PrepaymentID path optional string

Unique identifier for a PrePayment

AllocationID path optional string

Unique identifier for Allocation object

Responses

200

Success - return response of type Allocation with the isDeleted flag as true

DELETE /Prepayments/{PrepaymentID}/Allocations/{AllocationID}
DELETE /TrackingCategories/{TrackingCategoryID}
operationId: Accounting_deleteTrackingCategory

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

TrackingCategoryID path optional string

Unique identifier for a TrackingCategory

Responses

200

Success - return response of type TrackingCategories array of deleted TrackingCategory

400

A failed request due to validation error

DELETE /TrackingCategories/{TrackingCategoryID}
DELETE /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}
operationId: Accounting_deleteTrackingOption

Parameters

Name In Required Type Description
xero-tenant-id header optional string

Xero identifier for Tenant

TrackingCategoryID path optional string

Unique identifier for a TrackingCategory

TrackingOptionID path optional string

Unique identifier for a Tracking Option

Responses

200

Success - return response of type TrackingOptions array of remaining options for a specified category

400

A failed request due to validation error

DELETE /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}

Schemas

object Account
{
  "type": "object",
  "properties": {
    "Code": {
      "type": "string",
      "example": 4400,
      "description": "Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)"
    },
    "Name": {
      "type": "string",
      "example": "Food Sales",
      "maxLength": 150,
      "description": "Name of account (max length = 150)"
    },
    "Type": {
      "$ref": "#/components/schemas/AccountType",
      "type": "string"
    },
    "Class": {
      "enum": [
        "ASSET",
        "EQUITY",
        "EXPENSE",
        "LIABILITY",
        "REVENUE"
      ],
      "type": "string",
      "readOnly": true,
      "description": "See Account Class Types"
    },
    "Status": {
      "enum": [
        "ACTIVE",
        "ARCHIVED",
        "DELETED"
      ],
      "type": "string",
      "description": "Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes"
    },
    "TaxType": {
      "type": "string",
      "description": "The tax type from taxRates"
    },
    "AccountID": {
      "type": "string",
      "format": "uuid",
      "example": "00000000-0000-0000-0000-000000000000",
      "description": "The Xero identifier for an account – specified as a string following  the endpoint name   e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9"
    },
    "Description": {
      "type": "string",
      "description": "Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)"
    },
    "CurrencyCode": {
      "$ref": "#/components/schemas/CurrencyCode",
      "type": "string"
    },
    "ReportingCode": {
      "type": "string",
      "description": "Shown if set"
    },
    "SystemAccount": {
      "enum": [
        "DEBTORS",
        "CREDITORS",
        "BANKCURRENCYGAIN",
        "GST",
        "GSTONIMPORTS",
        "HISTORICAL",
        "REALISEDCURRENCYGAIN",
        "RETAINEDEARNINGS",
        "ROUNDING",
        "TRACKINGTRANSFERS",
        "UNPAIDEXPCLM",
        "UNREALISEDCURRENCYGAIN",
        "WAGEPAYABLES",
        "CISASSETS",
        "CISASSET",
        "CISLABOUR",
        "CISLABOUREXPENSE",
        "CISLABOURINCOME",
        "CISLIABILITY",
        "CISMATERIALS",
        ""
      ],
      "type": "string",
      "readOnly": true,
      "description": "If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null."
    },
    "AddToWatchlist": {
      "type": "boolean",
      "description": "Boolean – describes whether the account is shown in the watchlist widget on the dashboard"
    },
    "HasAttachments": {
      "type": "boolean",
      "default": "false",
      "example": false,
      "readOnly": true,
      "description": "boolean to indicate if an account has an attachment (read only)"
    },
    "UpdatedDateUTC": {
      "type": "string",
      "example": "/Date(1573755038314)/",
      "readOnly": true,
      "description": "Last modified date UTC format",
      "x-is-msdate-time": true
    },
    "BankAccountType": {
      "enum": [
        "BANK",
        "CREDITCARD",
        "PAYPAL",
        "NONE",
        ""
      ],
      "type": "string",
      "description": "For bank accounts only. See Bank Account types"
    },
    "ValidationErrors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      },
      "description": "Displays array of validation error messages from the API"
    },
    "BankAccountNumber": {
      "type": "string",
      "description": "For bank accounts only (Account Type BANK)"
    },
    "ReportingCodeName": {
      "type": "string",
      "readOnly": true,
      "description": "Shown if set"
    },
    "ShowInExpenseClaims": {
      "type": "boolean",
      "description": "Boolean – describes whether account code is available for use with expense claims"
    },
    "EnablePaymentsToAccount": {
      "type": "boolean",
      "description": "Boolean – describes whether account can have payments applied to it"
    }
  },
  "externalDocs": {
    "url": "http://developer.xero.com/documentation/api/accounts/"
  }
}
string AccountType
{
  "enum": [
    "BANK",
    "CURRENT",
    "CURRLIAB",
    "DEPRECIATN",
    "DIRECTCOSTS",
    "EQUITY",
    "EXPENSE",
    "FIXED",
    "INVENTORY",
    "LIABILITY",
    "NONCURRENT",
    "OTHERINCOME",
    "OVERHEADS",
    "PREPAYMENT",
    "REVENUE",
    "SALES",
    "TERMLIAB",
    "PAYG"
  ],
  "type": "string",
  "description": "See Account Types"
}
string AccountingCreateAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingCreateAttachmentRequest1
{
  "type": "string",
  "format": "byte"
}
string AccountingCreateBankTransactionAttachmentByFilenameRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingCreatePurchaseOrderAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingCreateQuoteAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingCreateReceiptAttachmentByFileNameRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingCreateRepeatingInvoiceAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingCreateSpecificAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingGetAttachment200Response
{
  "type": "string",
  "format": "binary"
}
string AccountingGetAttachmentByFileName200Response
{
  "type": "string",
  "format": "binary"
}
string AccountingGetAttachmentByFileNameResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetAttachmentByFilenameResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetAttachmentByIdResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetAttachmentResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetCreditNoteAttachmentResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetCreditNotePdfResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetExpenseClaimsAttachmentResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetInvoicePdfResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetPurchaseOrderPdfResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetQuoteAttachmentResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetQuotePdfResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetRepeatingInvoiceAttachmentResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingGetSpecificAttachment200Response
{
  "type": "string",
  "format": "binary"
}
string AccountingGetSpecificAttachmentResponse
{
  "type": "string",
  "format": "binary"
}
string AccountingUpdateAttachmentByFilenameRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateAttachmentsByFileNameRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateBankTransactionAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateBankTransferAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateCreditNoteAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdatePurchaseOrderAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateQuoteAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateRepeatingInvoiceAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateSpecificAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUpdateSpecificAttachmentRequest1
{
  "type": "string",
  "format": "byte"
}
string AccountingUploadAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
string AccountingUploadAttachmentRequest1
{
  "type": "string",
  "format": "byte"
}
string AccountingUploadBankTransferAttachmentRequest
{
  "type": "string",
  "format": "byte"
}
object Accounts
{
  "type": "object",
  "properties": {
    "Accounts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Account"
      }
    }
  },
  "x-isObjectArray": true
}
object AccountsPayable
{
  "type": "object",
  "properties": {
    "Overdue": {
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "Outstanding": {
      "type": "number",
      "format": "double",
      "x-is-money": true
    }
  }
}
object AccountsReceivable
{
  "type": "object",
  "properties": {
    "Overdue": {
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "Outstanding": {
      "type": "number",
      "format": "double",
      "x-is-money": true
    }
  }
}
object Action
{
  "properties": {
    "Name": {
      "type": "string",
      "example": "UseMulticurrency",
      "description": "Name of the actions for this organisation"
    },
    "Status": {
      "enum": [
        "ALLOWED",
        "NOT-ALLOWED"
      ],
      "type": "string",
      "description": "Status of the action for this organisation"
    }
  },
  "externalDocs": {
    "url": "http://developer.xero.com/documentation/api/organisation/"
  }
}
object Actions
{
  "type": "object",
  "properties": {
    "Actions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Action"
      }
    }
  },
  "x-isObjectArray": true
}
object Address
{
  "type": "object",
  "properties": {
    "City": {
      "type": "string",
      "maxLength": 255,
      "description": "max length = 255"
    },
    "Region": {
      "type": "string",
      "maxLength": 255,
      "description": "max length = 255"
    },
    "Country": {
      "type": "string",
      "maxLength": 50,
      "description": "max length = 50, [A-Z], [a-z] only"
    },
    "PostalCode": {
      "type": "string",
      "maxLength": 50,
      "description": "max length = 50"
    },
    "AddressType": {
      "enum": [
        "POBOX",
        "STREET"
      ],
      "type": "string",
      "description": "define the type of address"
    },
    "AttentionTo": {
      "type": "string",
      "maxLength": 255,
      "description": "max length = 255"
    },
    "AddressLine1": {
      "type": "string",
      "maxLength": 500,
      "description": "max length = 500"
    },
    "AddressLine2": {
      "type": "string",
      "maxLength": 500,
      "description": "max length = 500"
    },
    "AddressLine3": {
      "type": "string",
      "maxLength": 500,
      "description": "max length = 500"
    },
    "AddressLine4": {
      "type": "string",
      "maxLength": 500,
      "description": "max length = 500"
    }
  },
  "externalDocs": {
    "url": "http://developer.xero.com/documentation/api/types"
  }
}
object AddressForOrganisation
{
  "type": "object",
  "properties": {
    "City": {
      "type": "string",
      "maxLength": 255,
      "description": "max length = 255"
    },
    "Region": {
      "type": "string",
      "maxLength": 255,
      "description": "max length = 255"
    },
    "Country": {
      "type": "string",
      "maxLength": 50,
      "description": "max length = 50, [A-Z], [a-z] only"
    },
    "PostalCode": {
      "type": "string",
      "maxLength": 50,
      "description": "max length = 50"
    },
    "AddressType": {
      "enum": [
        "POBOX",
        "STREET",
        "DELIVERY"
      ],
      "type": "string",
      "description": "define the type of address"
    },
    "AttentionTo": {
      "type": "string",
      "maxLength": 255,
      "description": "max length = 255"
    },
    "AddressLine1": {
      "type": "string",
      "maxLength": 500,
      "description": "max length = 500"
    },
    "AddressLine2": {
      "type": "string",
      "maxLength": 500,
      "description": "max length = 500"
    },
    "AddressLine3": {
      "type": "string",
      "maxLength": 500,
      "description": "max length = 500"
    },
    "AddressLine4": {
      "type": "string",
      "maxLength": 500,
      "description": "max length = 500"
    }
  },
  "externalDocs": {
    "url": "http://developer.xero.com/documentation/api/types"
  }
}
object Allocation
{
  "type": "object",
  "required": [
    "Amount",
    "Invoice",
    "Date"
  ],
  "properties": {
    "Date": {
      "type": "string",
      "description": "the date the allocation is applied YYYY-MM-DD.",
      "x-is-msdate": true
    },
    "Amount": {
      "type": "number",
      "format": "double",
      "x-is-money": true,
      "description": "the amount being applied to the invoice"
    },
    "Invoice": {
      "$ref": "#/components/schemas/Invoice"
    },
    "IsDeleted": {
      "type": "boolean",
      "readOnly": true,
      "description": "A flag that returns true when the allocation is succesfully deleted"
    },
    "CreditNote": {
      "$ref": "#/components/schemas/CreditNote"
    },
    "Prepayment": {
      "$ref": "#/components/schemas/Prepayment"
    },
    "Overpayment": {
      "$ref": "#/components/schemas/Overpayment"
    },
    "AllocationID": {
      "type": "string",
      "format": "uuid",
      "description": "Xero generated unique identifier"
    },
    "ValidationErrors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      },
      "description": "Displays array of validation error messages from the API"
    },
    "StatusAttributeString": {
      "type": "string",
      "description": "A string to indicate if a invoice status"
    }
  },
  "externalDocs": {
    "url": "http://developer.xero.com/documentation/api/prepayments/"
  }
}
object Allocations
{
  "type": "object",
  "properties": {
    "Allocations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Allocation"
      }
    }
  },
  "x-isObjectArray": true
}
object Attachment
{
  "type": "object",
  "properties": {
    "Url": {
      "type": "string",
      "example": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
      "description": "URL to the file on xero.com"
    },
    "FileName": {
      "type": "string",
      "example": "xero-dev.jpg",
      "description": "Name of the file"
    },
    "MimeType": {
      "type": "string",
      "example": "image/jpg",
      "description": "Type of file"
    },
    "AttachmentID": {
      "type": "string",
      "format": "uuid",
      "example": "00000000-0000-0000-0000-000000000000",
      "description": "Unique ID for the file"
    },
    "ContentLength": {
      "type": "integer",
      "description": "Length of the file content"
    },
    "IncludeOnline": {
      "type": "boolean",
      "description": "Include the file with the online invoice"
    }
  },
  "externalDocs": {
    "url": "http://developer.xero.com/documentation/api/attachments/"
  }
}

Versions

Version Endpoints Schemas Ingested Status
3.0.1 237 171 2026-05-11 current
3.0.1 237 171 2026-04-16