Skip to content

Xero

Xero is an online accounting software platform designed for small businesses and accountants to manage finances efficiently.

Categories: accounting

Type: xero/v1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameLabelTypeDescriptionRequired
clientIdClient IdSTRINGtrue
clientSecretClient SecretSTRINGtrue

Actions

Create Bill

Name: createBill

Creates draft bill (Accounts Payable).

Properties

NameLabelTypeDescriptionRequired
ContactIDContact IDSTRINGID of the contact to create the bill for.true
DateDateDATEDate of the bill. If no date is specified, the current date will be used.true
DueDateDue DateDATEDate bill is due. If no date is specified, the current date will be used.false
LineAmountTypesLine Amount TypeSTRING
Options Exclusive, Inclusive, NoTax
false
LineItemsLine ItemsARRAY
Items [{STRING(Description), NUMBER(Quantity), NUMBER(UnitAmount), STRING(AccountCode)}($LineItem)]
Line items on the bill.true
CurrencyCodeCurrencySTRINGCurrency that bill is raised in.false
ReferenceInvoice ReferenceSTRINGReference number of the bill.false

Example JSON Structure

{
"label" : "Create Bill",
"name" : "createBill",
"parameters" : {
"ContactID" : "",
"Date" : "2021-01-01",
"DueDate" : "2021-01-01",
"LineAmountTypes" : "",
"LineItems" : [ {
"Description" : "",
"Quantity" : 0.0,
"UnitAmount" : 0.0,
"AccountCode" : ""
} ],
"CurrencyCode" : "",
"Reference" : ""
},
"type" : "xero/v1/createBill"
}

Output

Type: OBJECT

Properties

NameTypeDescription
TypeSTRINGType of the invoice.
ContactOBJECT
Properties {STRING(ContactID), STRING(Name), STRING(EmailAddress)}
Contact associated with the invoice.
DateStringSTRINGDate of the invoice – YYYY-MM-DDThh-mm-ss
DueDateStringSTRINGDue date of the invoice – YYYY-MM-DDThh-mm-ss
StatusSTRINGStatus of the invoice.
LineAmountTypesSTRINGLine Amount Type
LineItemsARRAY
Items [{STRING(Description), INTEGER(Quantity), NUMBER(UnitAmount)}]
Line items on the invoice.
CurrencyCodeSTRINGThe currency that invoice has been raised in.

Output Example

{
"Type" : "",
"Contact" : {
"ContactID" : "",
"Name" : "",
"EmailAddress" : ""
},
"DateString" : "",
"DueDateString" : "",
"Status" : "",
"LineAmountTypes" : "",
"LineItems" : [ {
"Description" : "",
"Quantity" : 1,
"UnitAmount" : 0.0
} ],
"CurrencyCode" : ""
}

Create Contact

Name: createContact

Creates a new contact.

Properties

NameLabelTypeDescriptionRequired
NameNameSTRINGFull name of a contact or organisation.true
CompanyNumberCompany NumberSTRINGCompany registration number.false
AccountNumberAccount NumberSTRINGUnique account number to identify, reference and search for the contact.false
ContactStatusContact StatusSTRING
Options ACTIVE, ARCHIVED, GDPRREQUEST
Current status of a contact.false
FirstNameFirst NameSTRINGFirst name of primary person.false
LastNameLast NameSTRINGLast name of primary person.false
EmailAddressEmail AddressSTRINGEmail address of contact person.false
BankAccountDetailsBank Account NumberSTRINGBank account number of contact.false
TaxNumberTax NumberSTRINGTax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using.false
PhonesPhonesARRAY
Items [{STRING(PhoneType), STRING(PhoneNumber), STRING(PhoneAreaCode), STRING(PhoneCountryCode)}]
false
AddressesAddressesARRAY
Items [{STRING(AddressType), STRING(City), STRING(Region), STRING(PostalCode), STRING(Country)}]
false

Example JSON Structure

{
"label" : "Create Contact",
"name" : "createContact",
"parameters" : {
"Name" : "",
"CompanyNumber" : "",
"AccountNumber" : "",
"ContactStatus" : "",
"FirstName" : "",
"LastName" : "",
"EmailAddress" : "",
"BankAccountDetails" : "",
"TaxNumber" : "",
"Phones" : [ {
"PhoneType" : "",
"PhoneNumber" : "",
"PhoneAreaCode" : "",
"PhoneCountryCode" : ""
} ],
"Addresses" : [ {
"AddressType" : "",
"City" : "",
"Region" : "",
"PostalCode" : "",
"Country" : ""
} ]
},
"type" : "xero/v1/createContact"
}

Output

Type: OBJECT

Properties

NameTypeDescription
ContactIDSTRINGID of the contact.
CompanyNumberSTRINGCompany registration number.
AccountNumberSTRINGA user defined account number.
ContactStatusSTRINGStatus of the contact.
NameSTRINGFull name of contact/organisation.
FirstNameSTRINGFirst name of contact person.
LastNameSTRINGLast name of contact person.
EmailAddressSTRINGEmail address of contact person.
BankAccountDetailsSTRINGBank account number of contact.
TaxNumberSTRINGTax number of contact.
AddressesARRAY
Items [{STRING(AddressType), STRING(City), STRING(Region), STRING(PostalCode), STRING(Country)}]
List of addresses associated with the contact.
PhonesARRAY
Items [{STRING(PhoneType), STRING(PhoneNumber), STRING(PhoneAreaCode), STRING(PhoneCountryCode)}]

Output Example

{
"ContactID" : "",
"CompanyNumber" : "",
"AccountNumber" : "",
"ContactStatus" : "",
"Name" : "",
"FirstName" : "",
"LastName" : "",
"EmailAddress" : "",
"BankAccountDetails" : "",
"TaxNumber" : "",
"Addresses" : [ {
"AddressType" : "",
"City" : "",
"Region" : "",
"PostalCode" : "",
"Country" : ""
} ],
"Phones" : [ {
"PhoneType" : "",
"PhoneNumber" : "",
"PhoneAreaCode" : "",
"PhoneCountryCode" : ""
} ]
}

Create Invoice

Name: createSalesInvoice

Creates draft invoice (Acount Receivable).

Properties

NameLabelTypeDescriptionRequired
ContactIDContact IDSTRINGID of the contact to create the invoice for.true
DateDateDATEDate invoice was issued. If no date is specified, the current date will be used.false
DueDateDue DateDATEDate invoice is due. If no date is specified, the current date will be used.false
LineAmountTypesLine Amount TypeSTRING
Options Exclusive, Inclusive, NoTax
false
LineItemsLine ItemsARRAY
Items [{STRING(Description), INTEGER(Quantity), NUMBER(UnitAmount), NUMBER(DiscountRate)}]
Line items on the invoice.true
CurrencyCodeCurrency CodeSTRINGCurrency code that invoice is raised in.false
ReferenceInvoice ReferenceSTRINGReference number of the invoice.false

Example JSON Structure

{
"label" : "Create Invoice",
"name" : "createSalesInvoice",
"parameters" : {
"ContactID" : "",
"Date" : "2021-01-01",
"DueDate" : "2021-01-01",
"LineAmountTypes" : "",
"LineItems" : [ {
"Description" : "",
"Quantity" : 1,
"UnitAmount" : 0.0,
"DiscountRate" : 0.0
} ],
"CurrencyCode" : "",
"Reference" : ""
},
"type" : "xero/v1/createSalesInvoice"
}

Output

Type: OBJECT

Properties

NameTypeDescription
TypeSTRINGType of the invoice.
ContactOBJECT
Properties {STRING(ContactID), STRING(Name), STRING(EmailAddress)}
Contact associated with the invoice.
DateStringSTRINGDate of the invoice – YYYY-MM-DDThh-mm-ss
DueDateStringSTRINGDue date of the invoice – YYYY-MM-DDThh-mm-ss
StatusSTRINGStatus of the invoice.
LineAmountTypesSTRINGLine Amount Type
LineItemsARRAY
Items [{STRING(Description), INTEGER(Quantity), NUMBER(UnitAmount)}]
Line items on the invoice.
CurrencyCodeSTRINGThe currency that invoice has been raised in.

Output Example

{
"Type" : "",
"Contact" : {
"ContactID" : "",
"Name" : "",
"EmailAddress" : ""
},
"DateString" : "",
"DueDateString" : "",
"Status" : "",
"LineAmountTypes" : "",
"LineItems" : [ {
"Description" : "",
"Quantity" : 1,
"UnitAmount" : 0.0
} ],
"CurrencyCode" : ""
}

Create Quote

Name: createQuote

Creates a new quote draft.

Properties

NameLabelTypeDescriptionRequired
ContactIDContact IDSTRINGID of the contact that the quote is being raised for.true
DateDateDATEDate quote was issued.true
LineItemsLine ItemsARRAY
Items [{STRING(Description), INTEGER(Quantity), NUMBER(UnitAmount), NUMBER(DiscountRate)}]
Line items on the invoice.true
LineAmountTypesLine Amount TypeSTRING
Options Exclusive, Inclusive, NoTax
false
ExpiryDateExpiry DateDATEDate quote expiresfalse
CurrencyCodeCurrency CodeSTRINGThe currency code that quote has been raised in.false
QuoteNumberQuote NumberSTRINGUnique alpha numeric code identifying a quote.false
ReferenceReferenceSTRINGAdditional reference numberfalse
BrandingThemeIDBranding Theme IDSTRINGThe branding theme ID to be applied to this quote.false
TitleTitleSTRINGThe title of the quote.false
SummarySummarySTRINGThe summary of the quote.false
TermsTermsSTRINGThe terms of the quote.false

Example JSON Structure

{
"label" : "Create Quote",
"name" : "createQuote",
"parameters" : {
"ContactID" : "",
"Date" : "2021-01-01",
"LineItems" : [ {
"Description" : "",
"Quantity" : 1,
"UnitAmount" : 0.0,
"DiscountRate" : 0.0
} ],
"LineAmountTypes" : "",
"ExpiryDate" : "2021-01-01",
"CurrencyCode" : "",
"QuoteNumber" : "",
"Reference" : "",
"BrandingThemeID" : "",
"Title" : "",
"Summary" : "",
"Terms" : ""
},
"type" : "xero/v1/createQuote"
}

Output

Type: OBJECT

Properties

NameTypeDescription
QuoteIDSTRING
QuoteNumberSTRING
ReferenceSTRING
TermsSTRING
ContactOBJECT
Properties {STRING(ContactID), STRING(Name), STRING(EmailAddress)}
LineItemsARRAY
Items [{STRING(LineItemID), STRING(Description), NUMBER(UnitAmount), INTEGER(DiscountRate), INTEGER(Quantity)}]
DateStringSTRING
ExpiryDateStringSTRING
StatusSTRING
CurrencyCodeSTRING
TitleSTRING
BrandingThemeIDSTRING
SummarySTRING
LineAmountTypesSTRING

Output Example

{
"QuoteID" : "",
"QuoteNumber" : "",
"Reference" : "",
"Terms" : "",
"Contact" : {
"ContactID" : "",
"Name" : "",
"EmailAddress" : ""
},
"LineItems" : [ {
"LineItemID" : "",
"Description" : "",
"UnitAmount" : 0.0,
"DiscountRate" : 1,
"Quantity" : 1
} ],
"DateString" : "",
"ExpiryDateString" : "",
"Status" : "",
"CurrencyCode" : "",
"Title" : "",
"BrandingThemeID" : "",
"Summary" : "",
"LineAmountTypes" : ""
}

Triggers

New Bill

Name: newBill

Trigger off whenever a new bill is added.

Type: STATIC_WEBHOOK

Properties

NameLabelTypeDescriptionRequired
webhookKeyWebhook KeySTRINGThe key used to sign the webhook request.true

Output

Type: OBJECT

Properties

NameTypeDescription
TypeSTRINGType of the invoice.
ContactOBJECT
Properties {STRING(ContactID), STRING(Name), STRING(EmailAddress)}
Contact associated with the invoice.
DateStringSTRINGDate of the invoice – YYYY-MM-DDThh-mm-ss
DueDateStringSTRINGDue date of the invoice – YYYY-MM-DDThh-mm-ss
StatusSTRINGStatus of the invoice.
LineAmountTypesSTRINGLine Amount Type
LineItemsARRAY
Items [{STRING(Description), INTEGER(Quantity), NUMBER(UnitAmount)}]
Line items on the invoice.
CurrencyCodeSTRINGThe currency that invoice has been raised in.

JSON Example

{
"label" : "New Bill",
"name" : "newBill",
"parameters" : {
"webhookKey" : ""
},
"type" : "xero/v1/newBill"
}

New Contact

Name: newContact

Triggers when a contact is created.

Type: STATIC_WEBHOOK

Properties

NameLabelTypeDescriptionRequired
webhookKeyWebhook KeySTRINGThe key used to sign the webhook request.true

Output

Type: OBJECT

Properties

NameTypeDescription
ContactIDSTRINGID of the contact.
CompanyNumberSTRINGCompany registration number.
AccountNumberSTRINGA user defined account number.
ContactStatusSTRINGStatus of the contact.
NameSTRINGFull name of contact/organisation.
FirstNameSTRINGFirst name of contact person.
LastNameSTRINGLast name of contact person.
EmailAddressSTRINGEmail address of contact person.
BankAccountDetailsSTRINGBank account number of contact.
TaxNumberSTRINGTax number of contact.
AddressesARRAY
Items [{STRING(AddressType), STRING(City), STRING(Region), STRING(PostalCode), STRING(Country)}]
List of addresses associated with the contact.
PhonesARRAY
Items [{STRING(PhoneType), STRING(PhoneNumber), STRING(PhoneAreaCode), STRING(PhoneCountryCode)}]

JSON Example

{
"label" : "New Contact",
"name" : "newContact",
"parameters" : {
"webhookKey" : ""
},
"type" : "xero/v1/newContact"
}

New Invoice

Name: newInvoice

Trigger off whenever a new invoice is added.

Type: STATIC_WEBHOOK

Properties

NameLabelTypeDescriptionRequired
webhookKeyWebhook KeySTRINGThe key used to sign the webhook request.true

Output

Type: OBJECT

Properties

NameTypeDescription
TypeSTRINGType of the invoice.
ContactOBJECT
Properties {STRING(ContactID), STRING(Name), STRING(EmailAddress)}
Contact associated with the invoice.
DateStringSTRINGDate of the invoice – YYYY-MM-DDThh-mm-ss
DueDateStringSTRINGDue date of the invoice – YYYY-MM-DDThh-mm-ss
StatusSTRINGStatus of the invoice.
LineAmountTypesSTRINGLine Amount Type
LineItemsARRAY
Items [{STRING(Description), INTEGER(Quantity), NUMBER(UnitAmount)}]
Line items on the invoice.
CurrencyCodeSTRINGThe currency that invoice has been raised in.

JSON Example

{
"label" : "New Invoice",
"name" : "newInvoice",
"parameters" : {
"webhookKey" : ""
},
"type" : "xero/v1/newInvoice"
}