[
{
"handle": "contacts",
"meta": {
"short": "Contacts",
"description": "Manage contact information for customers and suppliers."
},
"endpoint": {
"value": "/Contacts",
"placeholders": []
},
"fields": [
{
"name": "ContactID",
"type": "String",
"selector": [
"ContactID"
],
"meta": {
"description": "Unique identifier for the contact."
}
},
{
"name": "Name",
"type": "String",
"selector": [
"Name"
],
"meta": {
"description": "Name of the contact."
}
},
{
"name": "EmailAddress",
"type": "String",
"selector": [
"EmailAddress"
],
"meta": {
"description": "Email address of the contact."
}
},
{
"name": "IsCustomer",
"type": "Boolean",
"selector": [
"IsCustomer"
],
"meta": {
"description": "Indicates if the contact is a customer."
}
},
{
"name": "IsSupplier",
"type": "Boolean",
"selector": [
"IsSupplier"
],
"meta": {
"description": "Indicates if the contact is a supplier."
}
}
],
"operations": {
"list": {
"method": "GET",
"path": {
"value": "",
"placeholders": []
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"read": {
"method": "GET",
"path": {
"value": "/{{ContactID}}",
"placeholders": [
{
"name": "ContactID",
"type": "String",
"description": "Unique identifier for the contact.",
"required": true
}
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"create": {
"method": "POST",
"path": {
"value": "",
"placeholders": []
},
"headers": {
"Content-Type": "application/json"
},
"queryParams": {},
"bodyTemplate": {
"value": "{\"Name\": \"{{Name}}\", \"EmailAddress\": \"{{EmailAddress}}\", \"IsCustomer\": {{IsCustomer}}, \"IsSupplier\": {{IsSupplier}}}",
"placeholders": [
{
"name": "Name",
"type": "String",
"description": "Name of the contact.",
"required": true
},
{
"name": "EmailAddress",
"type": "String",
"description": "Email address of the contact.",
"required": false
},
{
"name": "IsCustomer",
"type": "Boolean",
"description": "Indicates if the contact is a customer.",
"required": false,
"default": "false"
},
{
"name": "IsSupplier",
"type": "Boolean",
"description": "Indicates if the contact is a supplier.",
"required": false,
"default": "false"
}
]
}
},
"update": {
"method": "POST",
"path": {
"value": "/{{ContactID}}",
"placeholders": [
{
"name": "ContactID",
"type": "String",
"description": "Unique identifier for the contact.",
"required": true
}
]
},
"headers": {
"Content-Type": "application/json"
},
"queryParams": {},
"bodyTemplate": {
"value": "{\"Name\": \"{{Name}}\", \"EmailAddress\": \"{{EmailAddress}}\", \"IsCustomer\": {{IsCustomer}}, \"IsSupplier\": {{IsSupplier}}}",
"placeholders": [
{
"name": "Name",
"type": "String",
"description": "Name of the contact.",
"required": false
},
{
"name": "EmailAddress",
"type": "String",
"description": "Email address of the contact.",
"required": false
},
{
"name": "IsCustomer",
"type": "Boolean",
"description": "Indicates if the contact is a customer.",
"required": false
},
{
"name": "IsSupplier",
"type": "Boolean",
"description": "Indicates if the contact is a supplier.",
"required": false
}
]
}
},
"delete": {
"method": "POST",
"path": {
"value": "/{{ContactID}}?summarizeErrors=false",
"placeholders": [
{
"name": "ContactID",
"type": "String",
"description": "Unique identifier for the contact.",
"required": true
}
]
},
"headers": {
"Content-Type": "application/json"
},
"queryParams": {},
"bodyTemplate": {
"value": "{\"Status\": \"ARCHIVED\"}",
"placeholders": []
}
}
},
"webhooks": [
{
"event": "contact_created",
"path": "/webhooks/xero/contacts",
"payload": [
{
"name": "ContactID",
"type": "String",
"selector": [
"events",
0,
"payload",
"contact",
"ContactID"
],
"meta": {
"description": "Unique identifier for the contact."
},
"multivalue": true
},
{
"name": "Name",
"type": "String",
"selector": [
"events",
0,
"payload",
"contact",
"Name"
],
"meta": {
"description": "Name of the contact."
},
"multivalue": true
}
]
},
{
"event": "contact_updated",
"path": "/webhooks/xero/contacts",
"payload": [
{
"name": "ContactID",
"type": "String",
"selector": [
"events",
0,
"payload",
"contact",
"ContactID"
],
"meta": {
"description": "Unique identifier for the contact."
},
"multivalue": true
},
{
"name": "Name",
"type": "String",
"selector": [
"events",
0,
"payload",
"contact",
"Name"
],
"meta": {
"description": "Name of the contact."
},
"multivalue": true
}
]
}
]
},
{
"handle": "invoices",
"meta": {
"short": "Invoices",
"description": "Manage sales invoices and purchase bills."
},
"endpoint": {
"value": "/Invoices",
"placeholders": []
},
"fields": [
{
"name": "InvoiceID",
"type": "String",
"selector": [
"InvoiceID"
],
"meta": {
"description": "Unique identifier for the invoice."
}
},
{
"name": "Type",
"type": "String",
"selector": [
"Type"
],
"meta": {
"description": "Type of the invoice (e.g., ACCREC for sales invoices, ACCPAY for purchase bills)."
}
},
{
"name": "ContactID",
"type": "String",
"selector": [
"Contact",
"ContactID"
],
"meta": {
"description": "Unique identifier of the contact associated with the invoice."
}
},
{
"name": "ContactName",
"type": "String",
"selector": [
"Contact",
"Name"
],
"meta": {
"description": "Name of the contact associated with the invoice."
}
},
{
"name": "Date",
"type": "String",
"selector": [
"Date"
],
"meta": {
"description": "Date of the invoice."
}
},
{
"name": "DueDate",
"type": "String",
"selector": [
"DueDate"
],
"meta": {
"description": "Due date of the invoice."
}
},
{
"name": "Status",
"type": "String",
"selector": [
"Status"
],
"meta": {
"description": "Status of the invoice (e.g., DRAFT, SUBMITTED, PAID)."
}
},
{
"name": "LineAmountTypes",
"type": "String",
"selector": [
"LineAmountTypes"
],
"meta": {
"description": "Type of line amounts (e.g., Exclusive, Inclusive, NoTax)."
}
},
{
"name": "LineItem0Description",
"type": "String",
"selector": [
"LineItems",
0,
"Description"
],
"meta": {
"description": "Description of the first line item."
},
"multivalue": true
},
{
"name": "LineItem0Quantity",
"type": "Number",
"selector": [
"LineItems",
0,
"Quantity"
],
"meta": {
"description": "Quantity of the first line item."
},
"multivalue": true
},
{
"name": "LineItem0UnitAmount",
"type": "Number",
"selector": [
"LineItems",
0,
"UnitAmount"
],
"meta": {
"description": "Unit price of the first line item."
},
"multivalue": true
},
{
"name": "LineItem0AccountCode",
"type": "String",
"selector": [
"LineItems",
0,
"AccountCode"
],
"meta": {
"description": "Account code for the first line item."
},
"multivalue": true
},
{
"name": "LineItem0TaxType",
"type": "String",
"selector": [
"LineItems",
0,
"TaxType"
],
"meta": {
"description": "Tax type applied to the first line item."
},
"multivalue": true
},
{
"name": "SubTotal",
"type": "Number",
"selector": [
"SubTotal"
],
"meta": {
"description": "Subtotal amount of the invoice."
}
},
{
"name": "TotalTax",
"type": "Number",
"selector": [
"TotalTax"
],
"meta": {
"description": "Total tax amount of the invoice."
}
},
{
"name": "Total",
"type": "Number",
"selector": [
"Total"
],
"meta": {
"description": "Total amount of the invoice."
}
},
{
"name": "AmountDue",
"type": "Number",
"selector": [
"AmountDue"
],
"meta": {
"description": "Amount due of the invoice."
}
},
{
"name": "AmountPaid",
"type": "Number",
"selector": [
"AmountPaid"
],
"meta": {
"description": "Amount paid of the invoice."
}
},
{
"name": "AmountCredited",
"type": "Number",
"selector": [
"AmountCredited"
],
"meta": {
"description": "Amount credited of the invoice."
}
}
],
"operations": {
"list": {
"method": "GET",
"path": {
"value": "",
"placeholders": []
},
"headers": {},
"queryParams": {
"where": "Status==\"{{Status}}\"",
"order": "{{Order}}"
},
"bodyTemplate": null
},
"read": {
"method": "GET",
"path": {
"value": "/{{InvoiceID}}",
"placeholders": [
{
"name": "InvoiceID",
"type": "String",
"description": "Unique identifier for the invoice.",
"required": true
}
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"create": {
"method": "PUT",
"path": {
"value": "",
"placeholders": []
},
"headers": {
"Content-Type": "application/json"
},
"queryParams": {},
"bodyTemplate": {
"value": "{\"Type\": \"{{Type}}\", \"Contact\": {\"ContactID\": \"{{ContactID}}\"}, \"Date\": \"{{Date}}\", \"DueDate\": \"{{DueDate}}\", \"LineAmountTypes\": \"{{LineAmountTypes}}\", \"LineItems\": {{LineItems}}, \"Status\": \"{{Status}}\"}",
"placeholders": [
{
"name": "Type",
"type": "String",
"description": "Type of the invoice.",
"required": true,
"options": [
"ACCREC",
"ACCPAY"
]
},
{
"name": "ContactID",
"type": "String",
"description": "Unique identifier for the contact.",
"required": true
},
{
"name": "Date",
"type": "String",
"description": "Date of the invoice.",
"required": true
},
{
"name": "DueDate",
"type": "String",
"description": "Due date of the invoice.",
"required": true
},
{
"name": "LineAmountTypes",
"type": "String",
"description": "Type of line amounts.",
"required": true,
"options": [
"Exclusive",
"Inclusive",
"NoTax"
]
},
{
"name": "LineItems",
"type": "Array",
"description": "Line items of the invoice.",
"required": true
},
{
"name": "Status",
"type": "String",
"description": "Status of the invoice.",
"required": true,
"options": [
"DRAFT",
"SUBMITTED",
"AUTHORISED"
]
}
]
}
},
"update": {
"method": "POST",
"path": {
"value": "/{{InvoiceID}}",
"placeholders": [
{
"name": "InvoiceID",
"type": "String",
"description": "Unique identifier for the invoice.",
"required": true
}
]
},
"headers": {
"Content-Type": "application/json"
},
"queryParams": {},
"bodyTemplate": {
"value": "{\"Status\": \"{{Status}}\"}",
"placeholders": [
{
"name": "Status",
"type": "String",
"description": "Status of the invoice.",
"required": true,
"options": [
"VOIDED"
]
}
]
}
},
"delete": {
"method": "POST",
"path": {
"value": "/{{InvoiceID}}?summarizeErrors=false",
"placeholders": [
{
"name": "InvoiceID",
"type": "String",
"description": "Unique identifier for the invoice.",
"required": true
}
]
},
"headers": {
"Content-Type": "application/json"
},
"queryParams": {},
"bodyTemplate": {
"value": "{\"Status\": \"DELETED\"}",
"placeholders": []
}
}
},
"webhooks": [
{
"event": "invoice_created",
"path": "/webhooks/xero/invoices",
"payload": [
{
"name": "InvoiceID",
"type": "String",
"selector": [
"events",
0,
"payload",
"invoice",
"InvoiceID"
],
"meta": {
"description": "Unique identifier for the invoice."
},
"multivalue": true
},
{
"name": "Type",
"type": "String",
"selector": [
"events",
0,
"payload",
"invoice",
"Type"
],
"meta": {
"description": "Type of the invoice."
},
"multivalue": true
}
]
},
{
"event": "invoice_updated",
"path": "/webhooks/xero/invoices",
"payload": [
{
"name": "InvoiceID",
"type": "String",
"selector": [
"events",
0,
"payload",
"invoice",
"InvoiceID"
],
"meta": {
"description": "Unique identifier for the invoice."
},
"multivalue": true
},
{
"name": "Status",
"type": "String",
"selector": [
"events",
0,
"payload",
"invoice",
"Status"
],
"meta": {
"description": "Status of the invoice."
},
"multivalue": true
}
]
}
]
}
]