diff --git a/bin/post-generation-hook.sh b/bin/post-generation-hook.sh index c624a552..6742b8ea 100755 --- a/bin/post-generation-hook.sh +++ b/bin/post-generation-hook.sh @@ -6,4 +6,7 @@ PATH=${PROJECT_ROOT}/venv/Scripts:$PATH # expects python environment in venv/ command -v black >/dev/null 2>&1 || { echo >&2 "'black' required, but not found. Please read 'Local installation' section in ${PROJECT_ROOT}/CONTRIBUTING.md file. Aborting."; exit 1; } command -v flake8 >/dev/null 2>&1 || { echo >&2 "'flake8' required, but not found. Please read 'Local installation' section in ${PROJECT_ROOT}/CONTRIBUTING.md file. Aborting."; exit 1; } cd "${PROJECT_ROOT}" && black xero_python && flake8 xero_python -python bin/get_yaml_value.py "${1}" "${2}" | xargs python bin/bumpversion.py + +# python bin/get_yaml_value.py "${1}" "packageVersion" | xargs python ./bin/bumpversion.py + +python ./bin/bumpversion.py $2 diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index c2a29795..674fb0bf 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -909,7 +909,7 @@ }, "TaxType" : { "type" : "string", - "description" : "The tax type from TaxRates" + "description" : "The tax type from taxRates" }, "EnablePaymentsToAccount" : { "type" : "boolean", @@ -975,7 +975,7 @@ "title" : "", "type" : "string", "description" : "See Account Types", - "enum" : [ "BANK", "CURRENT", "CURRLIAB", "DEPRECIATN", "DIRECTCOSTS", "EQUITY", "EXPENSE", "FIXED", "INVENTORY", "LIABILITY", "NONCURRENT", "OTHERINCOME", "OVERHEADS", "PREPAYMENT", "REVENUE", "SALES", "TERMLIAB", "PAYGLIABILITY", "PAYG", "SUPERANNUATIONEXPENSE", "SUPERANNUATIONLIABILITY", "WAGESEXPENSE" ] + "enum" : [ "BANK", "CURRENT", "CURRLIAB", "DEPRECIATN", "DIRECTCOSTS", "EQUITY", "EXPENSE", "FIXED", "INVENTORY", "LIABILITY", "NONCURRENT", "OTHERINCOME", "OVERHEADS", "PREPAYMENT", "REVENUE", "SALES", "TERMLIAB", "PAYG" ] }; defs["Accounts"] = { "title" : "", @@ -1183,6 +1183,11 @@ "required" : [ "Amount", "Date", "Invoice" ], "type" : "object", "properties" : { + "AllocationID" : { + "type" : "string", + "description" : "Xero generated unique identifier", + "format" : "uuid" + }, "Invoice" : { "$ref" : "#/components/schemas/Invoice" }, @@ -1206,6 +1211,11 @@ "description" : "the date the allocation is applied YYYY-MM-DD.", "x-is-msdate" : true }, + "IsDeleted" : { + "type" : "boolean", + "description" : "A flag that returns true when the allocation is succesfully deleted", + "readOnly" : true + }, "StatusAttributeString" : { "type" : "string", "description" : "A string to indicate if a invoice status" @@ -1641,9 +1651,11 @@ "enum" : [ "AUTHORISED", "DELETED" ] }, "TotalAmount" : { - "type" : "string", + "type" : "number", "description" : "The total of the payments that make up the batch (read-only)", - "readOnly" : true + "format" : "double", + "readOnly" : true, + "x-is-money" : true }, "UpdatedDateUTC" : { "type" : "string", @@ -1653,7 +1665,7 @@ "x-is-msdate-time" : true }, "IsReconciled" : { - "type" : "string", + "type" : "boolean", "description" : "Booelan that tells you if the batch payment has been reconciled (read-only)", "readOnly" : true }, @@ -1669,6 +1681,43 @@ "externalDocs" : { "url" : "http://developer.xero.com/documentation/api/BatchPayments/" } +}; + defs["BatchPaymentDelete"] = { + "title" : "", + "required" : [ "BatchPaymentID", "Status" ], + "type" : "object", + "properties" : { + "BatchPaymentID" : { + "type" : "string", + "description" : "The Xero generated unique identifier for the bank transaction (read-only)", + "format" : "uuid" + }, + "Status" : { + "type" : "string", + "description" : "The status of the batch payment.", + "default" : "DELETED" + } + }, + "description" : "", + "externalDocs" : { + "url" : "http://developer.xero.com/documentation/api/accounting/batchpayments" + } +}; + defs["BatchPaymentDeleteByUrlParam"] = { + "title" : "", + "required" : [ "Status" ], + "type" : "object", + "properties" : { + "Status" : { + "type" : "string", + "description" : "The status of the batch payment.", + "default" : "DELETED" + } + }, + "description" : "", + "externalDocs" : { + "url" : "http://developer.xero.com/documentation/api/accounting/batchpayments" + } }; defs["BatchPaymentDetails"] = { "title" : "", @@ -2029,10 +2078,6 @@ "type" : "string", "description" : "Email address of contact person (umlauts not supported) (max length = 255)" }, - "SkypeUserName" : { - "type" : "string", - "description" : "Skype user name of contact" - }, "ContactPersons" : { "type" : "array", "description" : "See contact persons", @@ -2555,8 +2600,8 @@ "title" : "", "type" : "string", "description" : "3 letter alpha code for the currency – see list of currency codes", - "enum" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD" ], - "x-enum-varnames" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY_LIRA", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD" ] + "enum" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SKK", "SLE", "SLL", "SOS", "SRD", "STD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VES", "VND", "VUV", "WST", "XAF", "XCD", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD" ], + "x-enum-varnames" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SKK", "SLE", "SLL", "SOS", "SRD", "STN", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY_LIRA", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VES", "VND", "VUV", "WST", "XAF", "XCD", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "EMPTY_CURRENCY" ] }; defs["Element"] = { "title" : "", @@ -3445,7 +3490,7 @@ }, "TaxType" : { "type" : "string", - "description" : "The tax type from TaxRates" + "description" : "The tax type from taxRates" }, "TaxName" : { "type" : "string", @@ -3540,7 +3585,7 @@ }, "LineAmount" : { "type" : "number", - "description" : "If you wish to omit either of the or you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100)", + "description" : "If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount", "format" : "double", "x-is-money" : true }, @@ -3559,7 +3604,7 @@ }, "DiscountAmount" : { "type" : "number", - "description" : "Discount amount being applied to a line item. Only supported on ACCREC invoices - ACCPAY invoices and credit notes in Xero do not support discounts.", + "description" : "Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts.", "format" : "double", "x-is-money" : true }, @@ -4017,7 +4062,7 @@ "Class" : { "type" : "string", "description" : "Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)", - "enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK" ] + "enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE" ] }, "Edition" : { "type" : "string", @@ -4227,6 +4272,9 @@ "type" : "string", "description" : "Number of invoice or credit note you are applying payment to e.g. INV-4003" }, + "BatchPayment" : { + "$ref" : "#/components/schemas/BatchPayment" + }, "Account" : { "$ref" : "#/components/schemas/Account" }, @@ -5155,7 +5203,7 @@ }, "HasAttachments" : { "type" : "boolean", - "description" : "boolean to indicate if an invoice has an attachment", + "description" : "Boolean to indicate if an invoice has an attachment", "readOnly" : true, "example" : false, "default" : false @@ -5166,6 +5214,30 @@ "items" : { "$ref" : "#/components/schemas/Attachment" } + }, + "ApprovedForSending" : { + "type" : "boolean", + "description" : "Boolean to indicate whether the invoice has been approved for sending", + "example" : false, + "default" : false + }, + "SendCopy" : { + "type" : "boolean", + "description" : "Boolean to indicate whether a copy is sent to sender's email", + "example" : false, + "default" : false + }, + "MarkAsSent" : { + "type" : "boolean", + "description" : "Boolean to indicate whether the invoice in the Xero app displays as \"sent\"", + "example" : false, + "default" : false + }, + "IncludePDF" : { + "type" : "boolean", + "description" : "Boolean to indicate whether to include PDF attachment", + "example" : false, + "default" : false } }, "description" : "", @@ -5560,7 +5632,7 @@ "ReportTaxType" : { "type" : "string", "description" : "See ReportTaxTypes", - "enum" : [ "AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT" ] + "enum" : [ "AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG", "IM", "IMESS", "IMN33", "IMRE", "BADDEBTRECOVERY", "USSALESTAX" ] }, "CanApplyToAssets" : { "type" : "boolean", @@ -5625,7 +5697,7 @@ "title" : "", "type" : "string", "description" : "See Tax Types – can only be used on update calls", - "enum" : [ "OUTPUT", "INPUT", "CAPEXINPUT", "EXEMPTEXPORT", "EXEMPTEXPENSES", "EXEMPTCAPITAL", "EXEMPTOUTPUT", "INPUTTAXED", "BASEXCLUDED", "GSTONCAPIMPORTS", "GSTONIMPORTS", "NONE", "INPUT2", "ZERORATED", "OUTPUT2", "CAPEXINPUT2", "CAPEXOUTPUT", "CAPEXOUTPUT2", "CAPEXSRINPUT", "CAPEXSROUTPUT", "ECACQUISITIONS", "ECZRINPUT", "ECZROUTPUT", "ECZROUTPUTSERVICES", "EXEMPTINPUT", "REVERSECHARGES", "RRINPUT", "RROUTPUT", "SRINPUT", "SROUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "BLINPUT", "DSOUTPUT", "EPINPUT", "ES33OUTPUT", "ESN33OUTPUT", "IGDSINPUT2", "IMINPUT2", "MEINPUT", "NRINPUT", "OPINPUT", "OSOUTPUT", "TXESSINPUT", "TXN33INPUT", "TXPETINPUT", "TXREINPUT", "INPUT3", "INPUT4", "OUTPUT3", "OUTPUT4", "SROUTPUT2", "TXCA", "SRCAS", "BLINPUT2", "DRCHARGESUPPLY20", "DRCHARGE20", "DRCHARGESUPPLY5", "DRCHARGE5" ] + "enum" : [ "OUTPUT", "INPUT", "CAPEXINPUT", "EXEMPTEXPORT", "EXEMPTEXPENSES", "EXEMPTCAPITAL", "EXEMPTOUTPUT", "INPUTTAXED", "BASEXCLUDED", "GSTONCAPIMPORTS", "GSTONIMPORTS", "NONE", "INPUT2", "ZERORATED", "OUTPUT2", "CAPEXINPUT2", "CAPEXOUTPUT", "CAPEXOUTPUT2", "CAPEXSRINPUT", "CAPEXSROUTPUT", "ECACQUISITIONS", "ECZRINPUT", "ECZROUTPUT", "ECZROUTPUTSERVICES", "EXEMPTINPUT", "REVERSECHARGES", "RRINPUT", "RROUTPUT", "SRINPUT", "SROUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "BLINPUT", "DSOUTPUT", "EPINPUT", "ES33OUTPUT", "ESN33OUTPUT", "IGDSINPUT2", "IMINPUT2", "MEINPUT", "NRINPUT", "OPINPUT", "OSOUTPUT", "TXESSINPUT", "TXN33INPUT", "TXPETINPUT", "TXREINPUT", "INPUT3", "INPUT4", "OUTPUT3", "OUTPUT4", "SROUTPUT2", "TXCA", "SRCAS", "BLINPUT2", "DRCHARGESUPPLY20", "DRCHARGE20", "DRCHARGESUPPLY5", "DRCHARGE5", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "OUTPUTY23", "DSOUTPUTY23", "INPUTY23", "IMINPUT2Y23", "IGDSINPUT2Y23", "TXPETINPUTY23", "TXESSINPUTY23", "TXN33INPUTY23", "TXREINPUTY23", "TXCAY23", "BADDEBTRELIEFY23", "IGDSINPUT3Y23", "SROVRRSY23", "SROVRLVGY23", "SRLVGY23", "TXRCN33Y23", "TXRCREY23", "TXRCESSY23", "TXRCTSY23", "IM", "IMY23", "IMESS", "IMESSY23", "IMN33", "IMN33Y23", "IMRE", "IMREY23", "BADDEBTRECOVERY", "BADDEBTRECOVERYY23", "OUTPUTY24", "DSOUTPUTY24", "INPUTY24", "IGDSINPUT2Y24", "TXPETINPUTY24", "TXESSINPUTY24", "TXN33INPUTY24", "TXREINPUTY24", "TXCAY24", "BADDEBTRELIEFY24", "IGDSINPUT3Y24", "SROVRRSY24", "SROVRLVGY24", "SRLVGY24", "TXRCTSY24", "TXRCESSY24", "TXRCN33Y24", "TXRCREY24", "IMY24", "IMESSY24", "IMN33Y24", "IMREY24", "BADDEBTRECOVERYY24", "OSOUTPUT2" ] }; defs["TenNinetyNineContact"] = { "title" : "", @@ -5744,6 +5816,19 @@ "type" : "string", "description" : "Contact contact id", "format" : "uuid" + }, + "LegalName" : { + "type" : "string", + "description" : "Contact legal name" + }, + "BusinessName" : { + "type" : "string", + "description" : "Contact business name" + }, + "FederalTaxClassification" : { + "type" : "string", + "description" : "Contact federal tax classification", + "enum" : [ "SOLE_PROPRIETOR", "PARTNERSHIP", "TRUST_OR_ESTATE", "NONPROFIT", "C_CORP", "S_CORP", "OTHER" ] } }, "description" : "" @@ -5752,7 +5837,7 @@ "title" : "", "type" : "string", "description" : "Timezone specifications", - "enum" : [ "MOROCCOSTANDARDTIME", "UTC", "GMTSTANDARDTIME", "GREENWICHSTANDARDTIME", "WEUROPESTANDARDTIME", "CENTRALEUROPESTANDARDTIME", "ROMANCESTANDARDTIME", "CENTRALEUROPEANSTANDARDTIME", "WCENTRALAFRICASTANDARDTIME", "NAMIBIASTANDARDTIME", "JORDANSTANDARDTIME", "GTBSTANDARDTIME", "MIDDLEEASTSTANDARDTIME", "EGYPTSTANDARDTIME", "SYRIASTANDARDTIME", "EEUROPESTANDARDTIME", "SOUTHAFRICASTANDARDTIME", "FLESTANDARDTIME", "TURKEYSTANDARDTIME", "ISRAELSTANDARDTIME", "KALININGRADSTANDARDTIME", "LIBYASTANDARDTIME", "ARABICSTANDARDTIME", "ARABSTANDARDTIME", "BELARUSSTANDARDTIME", "RUSSIANSTANDARDTIME", "EAFRICASTANDARDTIME", "IRANSTANDARDTIME", "ARABIANSTANDARDTIME", "AZERBAIJANSTANDARDTIME", "RUSSIATIMEZONE3", "MAURITIUSSTANDARDTIME", "GEORGIANSTANDARDTIME", "CAUCASUSSTANDARDTIME", "AFGHANISTANSTANDARDTIME", "WESTASIASTANDARDTIME", "EKATERINBURGSTANDARDTIME", "PAKISTANSTANDARDTIME", "INDIASTANDARDTIME", "SRILANKASTANDARDTIME", "NEPALSTANDARDTIME", "CENTRALASIASTANDARDTIME", "BANGLADESHSTANDARDTIME", "NCENTRALASIASTANDARDTIME", "MYANMARSTANDARDTIME", "SEASIASTANDARDTIME", "NORTHASIASTANDARDTIME", "CHINASTANDARDTIME", "NORTHASIAEASTSTANDARDTIME", "SINGAPORESTANDARDTIME", "WAUSTRALIASTANDARDTIME", "TAIPEISTANDARDTIME", "ULAANBAATARSTANDARDTIME", "TOKYOSTANDARDTIME", "KOREASTANDARDTIME", "YAKUTSKSTANDARDTIME", "CENAUSTRALIASTANDARDTIME", "AUSCENTRALSTANDARDTIME", "EAUSTRALIASTANDARDTIME", "AUSEASTERNSTANDARDTIME", "WESTPACIFICSTANDARDTIME", "TASMANIASTANDARDTIME", "MAGADANSTANDARDTIME", "VLADIVOSTOKSTANDARDTIME", "RUSSIATIMEZONE10", "CENTRALPACIFICSTANDARDTIME", "RUSSIATIMEZONE11", "NEWZEALANDSTANDARDTIME", "UTC+12", "UTC+13", "FIJISTANDARDTIME", "KAMCHATKASTANDARDTIME", "TONGASTANDARDTIME", "SAMOASTANDARDTIME", "LINEISLANDSSTANDARDTIME", "AZORESSTANDARDTIME", "CAPEVERDESTANDARDTIME", "UTC02", "MIDATLANTICSTANDARDTIME", "ESOUTHAMERICASTANDARDTIME", "ARGENTINASTANDARDTIME", "SAEASTERNSTANDARDTIME", "GREENLANDSTANDARDTIME", "MONTEVIDEOSTANDARDTIME", "BAHIASTANDARDTIME", "NEWFOUNDLANDSTANDARDTIME", "PARAGUAYSTANDARDTIME", "ATLANTICSTANDARDTIME", "CENTRALBRAZILIANSTANDARDTIME", "SAWESTERNSTANDARDTIME", "PACIFICSASTANDARDTIME", "VENEZUELASTANDARDTIME", "SAPACIFICSTANDARDTIME", "EASTERNSTANDARDTIME", "USEASTERNSTANDARDTIME", "CENTRALAMERICASTANDARDTIME", "CENTRALSTANDARDTIME", "CENTRALSTANDARDTIME(MEXICO)", "CANADACENTRALSTANDARDTIME", "USMOUNTAINSTANDARDTIME", "MOUNTAINSTANDARDTIME(MEXICO)", "MOUNTAINSTANDARDTIME", "PACIFICSTANDARDTIME(MEXICO)", "PACIFICSTANDARDTIME", "ALASKANSTANDARDTIME", "HAWAIIANSTANDARDTIME", "UTC11", "DATELINESTANDARDTIME", "EASTERISLANDSTANDARDTIME" ] + "enum" : [ "AFGHANISTANSTANDARDTIME", "ALASKANSTANDARDTIME", "ALEUTIANSTANDARDTIME", "ALTAISTANDARDTIME", "ARABIANSTANDARDTIME", "ARABICSTANDARDTIME", "ARABSTANDARDTIME", "ARGENTINASTANDARDTIME", "ASTRAKHANSTANDARDTIME", "ATLANTICSTANDARDTIME", "AUSCENTRALSTANDARDTIME", "AUSCENTRALWSTANDARDTIME", "AUSEASTERNSTANDARDTIME", "AZERBAIJANSTANDARDTIME", "AZORESSTANDARDTIME", "BAHIASTANDARDTIME", "BANGLADESHSTANDARDTIME", "BELARUSSTANDARDTIME", "BOUGAINVILLESTANDARDTIME", "CANADACENTRALSTANDARDTIME", "CAPEVERDESTANDARDTIME", "CAUCASUSSTANDARDTIME", "CENAUSTRALIASTANDARDTIME", "CENTRALAMERICASTANDARDTIME", "CENTRALASIASTANDARDTIME", "CENTRALBRAZILIANSTANDARDTIME", "CENTRALEUROPEANSTANDARDTIME", "CENTRALEUROPESTANDARDTIME", "CENTRALPACIFICSTANDARDTIME", "CENTRALSTANDARDTIME", "CENTRALSTANDARDTIME(MEXICO)", "CHATHAMISLANDSSTANDARDTIME", "CHINASTANDARDTIME", "CUBASTANDARDTIME", "DATELINESTANDARDTIME", "EAFRICASTANDARDTIME", "EASTERISLANDSTANDARDTIME", "EASTERNSTANDARDTIME", "EASTERNSTANDARDTIME(MEXICO)", "EAUSTRALIASTANDARDTIME", "EEUROPESTANDARDTIME", "EGYPTSTANDARDTIME", "EKATERINBURGSTANDARDTIME", "ESOUTHAMERICASTANDARDTIME", "FIJISTANDARDTIME", "FLESTANDARDTIME", "GEORGIANSTANDARDTIME", "GMTSTANDARDTIME", "GREENLANDSTANDARDTIME", "GREENWICHSTANDARDTIME", "GTBSTANDARDTIME", "HAITISTANDARDTIME", "HAWAIIANSTANDARDTIME", "INDIASTANDARDTIME", "IRANSTANDARDTIME", "ISRAELSTANDARDTIME", "JORDANSTANDARDTIME", "KALININGRADSTANDARDTIME", "KAMCHATKASTANDARDTIME", "KOREASTANDARDTIME", "LIBYASTANDARDTIME", "LINEISLANDSSTANDARDTIME", "LORDHOWESTANDARDTIME", "MAGADANSTANDARDTIME", "MAGALLANESSTANDARDTIME", "MARQUESASSTANDARDTIME", "MAURITIUSSTANDARDTIME", "MIDATLANTICSTANDARDTIME", "MIDDLEEASTSTANDARDTIME", "MONTEVIDEOSTANDARDTIME", "MOROCCOSTANDARDTIME", "MOUNTAINSTANDARDTIME", "MOUNTAINSTANDARDTIME(MEXICO)", "MYANMARSTANDARDTIME", "NAMIBIASTANDARDTIME", "NCENTRALASIASTANDARDTIME", "NEPALSTANDARDTIME", "NEWFOUNDLANDSTANDARDTIME", "NEWZEALANDSTANDARDTIME", "NORFOLKSTANDARDTIME", "NORTHASIAEASTSTANDARDTIME", "NORTHASIASTANDARDTIME", "NORTHKOREASTANDARDTIME", "OMSKSTANDARDTIME", "PACIFICSASTANDARDTIME", "PACIFICSTANDARDTIME", "PACIFICSTANDARDTIME(MEXICO)", "PAKISTANSTANDARDTIME", "PARAGUAYSTANDARDTIME", "QYZYLORDASTANDARDTIME", "ROMANCESTANDARDTIME", "RUSSIANSTANDARDTIME", "RUSSIATIMEZONE10", "RUSSIATIMEZONE11", "RUSSIATIMEZONE3", "SAEASTERNSTANDARDTIME", "SAINTPIERRESTANDARDTIME", "SAKHALINSTANDARDTIME", "SAMOASTANDARDTIME", "SAOTOMESTANDARDTIME", "SAPACIFICSTANDARDTIME", "SARATOVSTANDARDTIME", "SAWESTERNSTANDARDTIME", "SEASIASTANDARDTIME", "SINGAPORESTANDARDTIME", "SOUTHAFRICASTANDARDTIME", "SOUTHSUDANSTANDARDTIME", "SRILANKASTANDARDTIME", "SUDANSTANDARDTIME", "SYRIASTANDARDTIME", "TAIPEISTANDARDTIME", "TASMANIASTANDARDTIME", "TOCANTINSSTANDARDTIME", "TOKYOSTANDARDTIME", "TOMSKSTANDARDTIME", "TONGASTANDARDTIME", "TRANSBAIKALSTANDARDTIME", "TURKEYSTANDARDTIME", "TURKSANDCAICOSSTANDARDTIME", "ULAANBAATARSTANDARDTIME", "USEASTERNSTANDARDTIME", "USMOUNTAINSTANDARDTIME", "UTC", "UTC+12", "UTC+13", "UTC02", "UTC08", "UTC09", "UTC11", "VENEZUELASTANDARDTIME", "VLADIVOSTOKSTANDARDTIME", "VOLGOGRADSTANDARDTIME", "WAUSTRALIASTANDARDTIME", "WCENTRALAFRICASTANDARDTIME", "WESTASIASTANDARDTIME", "WESTBANKSTANDARDTIME", "WESTPACIFICSTANDARDTIME", "WEUROPESTANDARDTIME", "WMONGOLIASTANDARDTIME", "YAKUTSKSTANDARDTIME", "YUKONSTANDARDTIME" ] }; defs["TrackingCategories"] = { "title" : "", @@ -6166,6 +6251,9 @@
  • createRepeatingInvoiceHistory
  • +
  • + createRepeatingInvoices +
  • createTaxRates
  • @@ -6178,21 +6266,36 @@
  • deleteAccount
  • +
  • + deleteBatchPayment +
  • +
  • + deleteBatchPaymentByUrlParam +
  • deleteContactGroupContact
  • deleteContactGroupContacts
  • +
  • + deleteCreditNoteAllocations +
  • deleteItem
  • deleteLinkedTransaction
  • +
  • + deleteOverpaymentAllocations +
  • deletePayment
  • +
  • + deletePrepaymentAllocations +
  • deleteTrackingCategory
  • @@ -6253,6 +6356,9 @@
  • getBankTransfers
  • +
  • + getBatchPayment +
  • getBatchPaymentHistory
  • @@ -6379,6 +6485,9 @@
  • getJournal
  • +
  • + getJournalByNumber +
  • getJournals
  • @@ -6454,6 +6563,9 @@
  • getPurchaseOrderAsPdf
  • +
  • + getPurchaseOrderAttachmentByFileName +
  • getPurchaseOrderAttachmentById
  • @@ -6469,9 +6581,6 @@
  • getPurchaseOrders
  • -
  • - getPurchaseOrder≠AttachmentByFileName -
  • getQuote
  • @@ -6658,6 +6767,9 @@
  • updateOrCreateQuotes
  • +
  • + updateOrCreateRepeatingInvoices +
  • updatePurchaseOrder
  • @@ -6676,6 +6788,9 @@
  • updateReceiptAttachmentByFileName
  • +
  • + updateRepeatingInvoice +
  • updateRepeatingInvoiceAttachmentByFileName
  • @@ -6745,6 +6860,7 @@

    Usage and SDK Samples

    def accounting_create_account(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' account = Account( code = "123456", @@ -6753,7 +6869,7 @@

    Usage and SDK Samples

    description = "Hello World") try: - api_response = api_instance.create_account(xero_tenant_id, account) + api_response = api_instance.create_account(xero_tenant_id, account, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createAccount: %s\n" % e) @@ -6796,6 +6912,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6880,13 +7016,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' account_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.create_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body) + api_response = api_instance.create_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createAccountAttachmentByFileName: %s\n" % e) @@ -6985,6 +7122,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7069,13 +7226,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' bank_transaction_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body) + api_response = api_instance.create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBankTransactionAttachmentByFileName: %s\n" % e) @@ -7174,6 +7332,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7257,6 +7435,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' bank_transaction_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' history_record = HistoryRecord( details = "Hello World") @@ -7265,7 +7444,7 @@

    Usage and SDK Samples

    history_records = [history_record]) try: - api_response = api_instance.create_bank_transaction_history_record(xero_tenant_id, bank_transaction_id, historyRecords) + api_response = api_instance.create_bank_transaction_history_record(xero_tenant_id, bank_transaction_id, historyRecords, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBankTransactionHistoryRecord: %s\n" % e) @@ -7341,6 +7520,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7423,6 +7622,7 @@

    Usage and SDK Samples

    def accounting_create_bank_transactions(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' contact = Contact( @@ -7450,7 +7650,7 @@

    Usage and SDK Samples

    bank_transactions = [bank_transaction]) try: - api_response = api_instance.create_bank_transactions(xero_tenant_id, bankTransactions, summarize_errors, unitdp) + api_response = api_instance.create_bank_transactions(xero_tenant_id, bankTransactions, idempotency_key, summarize_errors, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBankTransactions: %s\n" % e) @@ -7493,6 +7693,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7622,6 +7842,7 @@

    Usage and SDK Samples

    def accounting_create_bank_transfer(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' fromBankAccount = Account( account_id = "00000000-0000-0000-0000-000000000000") @@ -7638,7 +7859,7 @@

    Usage and SDK Samples

    bank_transfers = [bank_transfer]) try: - api_response = api_instance.create_bank_transfer(xero_tenant_id, bankTransfers) + api_response = api_instance.create_bank_transfer(xero_tenant_id, bankTransfers, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBankTransfer: %s\n" % e) @@ -7681,6 +7902,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7765,13 +8006,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' bank_transfer_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.create_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body) + api_response = api_instance.create_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBankTransferAttachmentByFileName: %s\n" % e) @@ -7870,6 +8112,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7953,6 +8215,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' bank_transfer_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' history_record = HistoryRecord( details = "Hello World") @@ -7961,7 +8224,7 @@

    Usage and SDK Samples

    history_records = [history_record]) try: - api_response = api_instance.create_bank_transfer_history_record(xero_tenant_id, bank_transfer_id, historyRecords) + api_response = api_instance.create_bank_transfer_history_record(xero_tenant_id, bank_transfer_id, historyRecords, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBankTransferHistoryRecord: %s\n" % e) @@ -8037,6 +8300,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -8120,6 +8403,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' summarize_errors = 'True' + idempotency_key = 'KEY_VALUE' curr_date = dateutil.parser.parse('2020-12-03T00:00:00Z') payment_account = Account( @@ -8150,7 +8434,7 @@

    Usage and SDK Samples

    batch_payments = [batch_payment]) try: - api_response = api_instance.create_batch_payment(xero_tenant_id, batchPayments, summarize_errors) + api_response = api_instance.create_batch_payment(xero_tenant_id, batchPayments, summarize_errors, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBatchPayment: %s\n" % e) @@ -8193,6 +8477,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -8303,6 +8607,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' batch_payment_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' history_record = HistoryRecord( details = "Hello World") @@ -8311,7 +8616,7 @@

    Usage and SDK Samples

    history_records = [history_record]) try: - api_response = api_instance.create_batch_payment_history_record(xero_tenant_id, batch_payment_id, historyRecords) + api_response = api_instance.create_batch_payment_history_record(xero_tenant_id, batch_payment_id, historyRecords, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBatchPaymentHistoryRecord: %s\n" % e) @@ -8387,6 +8692,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -8470,15 +8795,19 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' branding_theme_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' payment_service = PaymentService( payment_service_id = "00000000-0000-0000-0000-000000000000", payment_service_name = "ACME Payments", payment_service_url = "https://www.payupnow.com/", pay_now_text = "Pay Now") + + paymentServices = PaymentServices( + paymentServices = [paymentService]) try: - api_response = api_instance.create_branding_theme_payment_services(xero_tenant_id, branding_theme_id, paymentService) + api_response = api_instance.create_branding_theme_payment_services(xero_tenant_id, branding_theme_id, paymentServices, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createBrandingThemePaymentServices: %s\n" % e) @@ -8554,6 +8883,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -8564,15 +8913,15 @@

    Parameters

    Description - paymentService * + paymentServices *
    - PaymentService + PaymentServices
    - PaymentService object in body of request + PaymentServices array with PaymentService object in body of request
    @@ -8581,13 +8930,13 @@

    Parameters

    +
    Query parameters
    + + + + + + + + + +
    NameDescription
    summarizeErrors + + +
    +
    +
    + + Boolean + + +
    +If false return 200 OK and mix of successfully created objects and any with validation errors +
    +
    +
    +
    +

    -
    -
    +
    +
    -

    createTrackingCategory

    -

    Create tracking categories

    +

    createTaxRates

    +

    Creates one or more tax rates

    @@ -15884,17 +17129,17 @@

    createTrackingCategory


    -
    /TrackingCategories
    +
    /TaxRates

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -15908,18 +17153,181 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_create_tracking_category(): +def accounting_create_tax_rates(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' - trackingCategory = TrackingCategory( - name = "Foobar") + tax_component = TaxComponent( + name = "State Tax", + rate = 2.25) + + taxComponent = [] + tax_components.append(tax_component) + + tax_rate = TaxRate( + name = "CA State Tax", + taxComponents = taxComponents, + + taxRates = TaxRates( + tax_rates = [tax_rate]) try: - api_response = api_instance.create_tracking_category(xero_tenant_id, trackingCategory) + api_response = api_instance.create_tax_rates(xero_tenant_id, taxRates, idempotency_key) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->createTrackingCategory: %s\n" % e)
    + print("Exception when calling AccountingApi->createTaxRates: %s\n" % e) +
    +
    +

    Scopes

    + + + + + + + +
    accounting.settingsGrant read-write access to organisation and account settings
    +

    Parameters

    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    taxRates * +
    +
    + + TaxRates + +
    + TaxRates array with TaxRate object in body of request +
    +
    +
    + Required +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    createTrackingCategory

    +

    Create tracking categories

    +
    +
    +
    +

    +

    +

    +
    +
    /TrackingCategories
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_create_tracking_category():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    idempotency_key = 'KEY_VALUE'
    +
    +    trackingCategory = TrackingCategory(
    +        name = "Foobar")
    +    
    +    try:
    +        api_response = api_instance.create_tracking_category(xero_tenant_id, trackingCategory, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->createTrackingCategory: %s\n" % e)

    Scopes

    @@ -15959,6 +17367,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -16042,12 +17470,13 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' tracking_category_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' trackingOption = TrackingOption( name = "Foobar") try: - api_response = api_instance.create_tracking_options(xero_tenant_id, tracking_category_id, trackingOption) + api_response = api_instance.create_tracking_options(xero_tenant_id, tracking_category_id, trackingOption, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->createTrackingOptions: %s\n" % e) @@ -16123,6 +17552,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -16290,11 +17739,11 @@

    Parameters


    -
    -
    +
    +
    -

    deleteContactGroupContact

    -

    Deletes a specific contact from a contact group using a unique contact Id

    +

    deleteBatchPayment

    +

    Updates a specific batch payment for invoices and credit notes

    @@ -16302,17 +17751,17 @@

    deleteContactGroupContact


    -
    /ContactGroups/{ContactGroupID}/Contacts/{ContactID}
    +
    /BatchPayments

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -16326,50 +17775,51 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_contact_group_contact(): +def accounting_delete_batch_payment(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - contact_group_id = '00000000-0000-0000-0000-000000000000' - contact_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' + + batchPaymentDelete = BatchPaymentDelete( + status = "DELETED") + batch_payment_id = "00000000-0000-0000-0000-000000000000") try: - api_instance.delete_contact_group_contact(xero_tenant_id, contact_group_id, contact_id) + api_response = api_instance.delete_batch_payment(xero_tenant_id, batchPaymentDelete, idempotency_key) + print(api_response) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->deleteContactGroupContact: %s\n" % e)
    + print("Exception when calling AccountingApi->deleteBatchPayment: %s\n" % e)

    Scopes

    - - + +
    accounting.contactsGrant read-write access to contacts and contact groupsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices

    Parameters

    -
    Path parameters
    +
    Header parameters
    - + - +
    Name Description
    ContactGroupID*
    xero-tenant-id* -
    +
    - UUID + String - - (uuid) -
    -Unique identifier for a Contact Group +Xero identifier for Tenant
    @@ -16380,71 +17830,71 @@

    Parameters

    ContactID*
    Idempotency-Key -
    +
    - UUID + String - - (uuid) -
    -Unique identifier for a Contact +This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
    -
    - Required -
    -
    Header parameters
    +
    Body parameters
    - - + + - - +
    Name Description
    xero-tenant-id* - - -
    -
    -
    - - String - - -
    -Xero identifier for Tenant -
    -
    -
    - Required -
    +
    batchPaymentDelete * +
    +
    + + BatchPaymentDelete + +
    +
    +
    +
    + Required +
    -

    -
    -
    +
    +
    -

    deleteContactGroupContacts

    -

    Deletes all contacts from a specific contact group

    +

    deleteBatchPaymentByUrlParam

    +

    Updates a specific batch payment for invoices and credit notes

    @@ -16452,17 +17902,17 @@

    deleteContactGroupContacts


    -
    /ContactGroups/{ContactGroupID}/Contacts
    +
    /BatchPayments/{BatchPaymentID}

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -16476,23 +17926,25 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_contact_group_contacts(): +def accounting_delete_batch_payment_by_url_param(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - contact_group_id = '00000000-0000-0000-0000-000000000000' + batch_payment_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' try: - api_instance.delete_contact_group_contacts(xero_tenant_id, contact_group_id) + api_response = api_instance.delete_batch_payment_by_url_param(xero_tenant_id, batch_payment_id, batchPaymentDeleteByUrlParam, idempotency_key) + print(api_response) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->deleteContactGroupContacts: %s\n" % e)
    + print("Exception when calling AccountingApi->deleteBatchPaymentByUrlParam: %s\n" % e)

    Scopes

    - - + +
    accounting.contactsGrant read-write access to contacts and contact groupsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -16503,11 +17955,11 @@

    Parameters

    Name Description - ContactGroupID* + BatchPaymentID* -
    +
    @@ -16518,7 +17970,7 @@

    Parameters

    -Unique identifier for a Contact Group +Unique identifier for BatchPayment
    @@ -16540,7 +17992,7 @@

    Parameters

    -
    +
    @@ -16559,15 +18011,71 @@

    Parameters

    + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + + + + +
    Body parameters
    + + + + + + + +
    NameDescription
    batchPaymentDeleteByUrlParam * +
    +
    + + BatchPaymentDeleteByUrlParam + +
    + +
    +
    +
    + Required +
    +
    +

    -
    -
    +
    +
    -

    deleteItem

    -

    Deletes a specific item

    +

    deleteContactGroupContact

    +

    Deletes a specific contact from a contact group using a unique contact Id

    @@ -16575,17 +18083,17 @@

    deleteItem


    -
    /Items/{ItemID}
    +
    /ContactGroups/{ContactGroupID}/Contacts/{ContactID}

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -16599,23 +18107,24 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_item(): +def accounting_delete_contact_group_contact(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - item_id = '00000000-0000-0000-0000-000000000000' + contact_group_id = '00000000-0000-0000-0000-000000000000' + contact_id = '00000000-0000-0000-0000-000000000000' try: - api_instance.delete_item(xero_tenant_id, item_id) + api_instance.delete_contact_group_contact(xero_tenant_id, contact_group_id, contact_id) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->deleteItem: %s\n" % e)
    + print("Exception when calling AccountingApi->deleteContactGroupContact: %s\n" % e)

    Scopes

    - - + +
    accounting.settingsGrant read-write access to organisation and account settingsaccounting.contactsGrant read-write access to contacts and contact groups
    @@ -16626,11 +18135,11 @@

    Parameters

    Name Description - ItemID* + ContactGroupID* -
    +
    @@ -16641,7 +18150,33 @@

    Parameters

    -Unique identifier for an Item +Unique identifier for a Contact Group +
    +
    +
    + Required +
    +
    +
    + + + + ContactID* + + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Contact
    @@ -16663,7 +18198,7 @@

    Parameters

    -
    +
    @@ -16686,11 +18221,11 @@

    Parameters


    -
    -
    +
    +
    -

    deleteLinkedTransaction

    -

    Deletes a specific linked transactions (billable expenses)

    +

    deleteContactGroupContacts

    +

    Deletes all contacts from a specific contact group

    @@ -16698,17 +18233,17 @@

    deleteLinkedTransaction


    -
    /LinkedTransactions/{LinkedTransactionID}
    +
    /ContactGroups/{ContactGroupID}/Contacts

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -16722,23 +18257,23 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_linked_transaction(): +def accounting_delete_contact_group_contacts(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - linked_transaction_id = '00000000-0000-0000-0000-000000000000' + contact_group_id = '00000000-0000-0000-0000-000000000000' try: - api_instance.delete_linked_transaction(xero_tenant_id, linked_transaction_id) + api_instance.delete_contact_group_contacts(xero_tenant_id, contact_group_id) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->deleteLinkedTransaction: %s\n" % e)
    + print("Exception when calling AccountingApi->deleteContactGroupContacts: %s\n" % e)

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.contactsGrant read-write access to contacts and contact groups
    @@ -16749,11 +18284,11 @@

    Parameters

    Name Description - LinkedTransactionID* + ContactGroupID* -
    +
    @@ -16764,7 +18299,7 @@

    Parameters

    -Unique identifier for a LinkedTransaction +Unique identifier for a Contact Group
    @@ -16786,7 +18321,7 @@

    Parameters

    -
    +
    @@ -16809,11 +18344,11 @@

    Parameters


    -
    -
    +
    +
    -

    deletePayment

    -

    Updates a specific payment for invoices and credit notes

    +

    deleteCreditNoteAllocations

    +

    Deletes an Allocation from a Credit Note

    @@ -16821,17 +18356,17 @@

    deletePayment


    -
    /Payments/{PaymentID}
    +
    /CreditNotes/{CreditNoteID}/Allocations/{AllocationID}

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -16845,19 +18380,17 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_payment(): +def accounting_delete_credit_note_allocations(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - payment_id = '00000000-0000-0000-0000-000000000000' - - paymentDelete = PaymentDelete( - status = "DELETED") + credit_note_id = '00000000-0000-0000-0000-000000000000' + allocation_id = '00000000-0000-0000-0000-000000000000' try: - api_response = api_instance.delete_payment(xero_tenant_id, payment_id, paymentDelete) + api_response = api_instance.delete_credit_note_allocations(xero_tenant_id, credit_note_id, allocation_id) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->deletePayment: %s\n" % e)
    + print("Exception when calling AccountingApi->deleteCreditNoteAllocations: %s\n" % e)

    Scopes

    @@ -16876,11 +18409,11 @@

    Parameters

    Name Description - PaymentID* + CreditNoteID* -
    +
    @@ -16891,7 +18424,33 @@

    Parameters

    -Unique identifier for a Payment +Unique identifier for a Credit Note +
    +
    +
    + Required +
    +
    +
    + + + + AllocationID* + + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Allocation object
    @@ -16913,7 +18472,7 @@

    Parameters

    -
    +
    @@ -16933,50 +18492,14 @@

    Parameters

    -
    Body parameters
    - - - - - - - -
    NameDescription
    paymentDelete * -
    -
    - - PaymentDelete - -
    - -
    -
    -
    - Required -
    -
    - -

    -
    -
    +
    +
    -

    deleteTrackingCategory

    -

    Deletes a specific tracking category

    +

    deleteItem

    +

    Deletes a specific item

    @@ -16984,17 +18507,17 @@

    deleteTrackingCategory


    -
    /TrackingCategories/{TrackingCategoryID}
    +
    /Items/{ItemID}

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -17008,16 +18531,15 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_tracking_category(): +def accounting_delete_item(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - tracking_category_id = '00000000-0000-0000-0000-000000000000' + item_id = '00000000-0000-0000-0000-000000000000' try: - api_response = api_instance.delete_tracking_category(xero_tenant_id, tracking_category_id) - print(api_response) + api_instance.delete_item(xero_tenant_id, item_id) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->deleteTrackingCategory: %s\n" % e)
    + print("Exception when calling AccountingApi->deleteItem: %s\n" % e)

    Scopes

    @@ -17036,11 +18558,11 @@

    Parameters

    Name Description - TrackingCategoryID* + ItemID* -
    +
    @@ -17051,7 +18573,7 @@

    Parameters

    -Unique identifier for a TrackingCategory +Unique identifier for an Item
    @@ -17073,7 +18595,7 @@

    Parameters

    -
    +
    @@ -17096,11 +18618,11 @@

    Parameters


    -
    -
    +
    +
    -

    deleteTrackingOptions

    -

    Deletes a specific option for a specific tracking category

    +

    deleteLinkedTransaction

    +

    Deletes a specific linked transactions (billable expenses)

    @@ -17108,17 +18630,17 @@

    deleteTrackingOptions


    -
    /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}
    +
    /LinkedTransactions/{LinkedTransactionID}

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -17132,25 +18654,23 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_tracking_options(): +def accounting_delete_linked_transaction(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - tracking_category_id = '00000000-0000-0000-0000-000000000000' - tracking_option_id = '00000000-0000-0000-0000-000000000000' + linked_transaction_id = '00000000-0000-0000-0000-000000000000' try: - api_response = api_instance.delete_tracking_options(xero_tenant_id, tracking_category_id, tracking_option_id) - print(api_response) + api_instance.delete_linked_transaction(xero_tenant_id, linked_transaction_id) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->deleteTrackingOptions: %s\n" % e)
    + print("Exception when calling AccountingApi->deleteLinkedTransaction: %s\n" % e)

    Scopes

    - - + +
    accounting.settingsGrant read-write access to organisation and account settingsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -17161,37 +18681,11 @@

    Parameters

    Name Description - TrackingCategoryID* - - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for a TrackingCategory -
    -
    -
    - Required -
    -
    -
    - - - - TrackingOptionID* + LinkedTransactionID* -
    +
    @@ -17202,7 +18696,7 @@

    Parameters

    -Unique identifier for a Tracking Option +Unique identifier for a LinkedTransaction
    @@ -17224,7 +18718,768 @@

    Parameters

    -
    +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    +

    deleteOverpaymentAllocations

    +

    Deletes an Allocation from an overpayment

    +
    +
    +
    +

    +

    +

    +
    +
    /Overpayments/{OverpaymentID}/Allocations/{AllocationID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_delete_overpayment_allocations():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    overpayment_id = '00000000-0000-0000-0000-000000000000'
    +    allocation_id = '00000000-0000-0000-0000-000000000000'
    +    
    +    try:
    +        api_response = api_instance.delete_overpayment_allocations(xero_tenant_id, overpayment_id, allocation_id)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->deleteOverpaymentAllocations: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    OverpaymentID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Overpayment +
    +
    +
    + Required +
    +
    +
    +
    AllocationID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Allocation object +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    deletePayment

    +

    Updates a specific payment for invoices and credit notes

    +
    +
    +
    +

    +

    +

    +
    +
    /Payments/{PaymentID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_delete_payment():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    payment_id = '00000000-0000-0000-0000-000000000000'
    +    idempotency_key = 'KEY_VALUE'
    +
    +    paymentDelete = PaymentDelete(
    +        status = "DELETED")
    +    
    +    try:
    +        api_response = api_instance.delete_payment(xero_tenant_id, payment_id, paymentDelete, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->deletePayment: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    PaymentID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Payment +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    paymentDelete * +
    +
    + + PaymentDelete + +
    + +
    +
    +
    + Required +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    deletePrepaymentAllocations

    +

    Deletes an Allocation from a Prepayment

    +
    +
    +
    +

    +

    +

    +
    +
    /Prepayments/{PrepaymentID}/Allocations/{AllocationID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_delete_prepayment_allocations():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    prepayment_id = '00000000-0000-0000-0000-000000000000'
    +    allocation_id = '00000000-0000-0000-0000-000000000000'
    +    
    +    try:
    +        api_response = api_instance.delete_prepayment_allocations(xero_tenant_id, prepayment_id, allocation_id)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->deletePrepaymentAllocations: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    PrepaymentID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a PrePayment +
    +
    +
    + Required +
    +
    +
    +
    AllocationID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Allocation object +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    deleteTrackingCategory

    +

    Deletes a specific tracking category

    +
    +
    +
    +

    +

    +

    +
    +
    /TrackingCategories/{TrackingCategoryID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_delete_tracking_category():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    tracking_category_id = '00000000-0000-0000-0000-000000000000'
    +    
    +    try:
    +        api_response = api_instance.delete_tracking_category(xero_tenant_id, tracking_category_id)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->deleteTrackingCategory: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.settingsGrant read-write access to organisation and account settings
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    TrackingCategoryID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a TrackingCategory +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    deleteTrackingOptions

    +

    Deletes a specific option for a specific tracking category

    +
    +
    +
    +

    +

    +

    +
    +
    /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_delete_tracking_options():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    tracking_category_id = '00000000-0000-0000-0000-000000000000'
    +    tracking_option_id = '00000000-0000-0000-0000-000000000000'
    +    
    +    try:
    +        api_response = api_instance.delete_tracking_options(xero_tenant_id, tracking_category_id, tracking_option_id)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->deleteTrackingOptions: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.settingsGrant read-write access to organisation and account settings
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    TrackingCategoryID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a TrackingCategory +
    +
    +
    + Required +
    +
    +
    +
    TrackingOptionID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Tracking Option +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    @@ -17287,11 +19542,12 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' invoice_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' requestEmpty = RequestEmpty() try: - api_instance.email_invoice(xero_tenant_id, invoice_id, requestEmpty) + api_instance.email_invoice(xero_tenant_id, invoice_id, requestEmpty, idempotency_key) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->emailInvoice: %s\n" % e)
    @@ -17366,6 +19622,26 @@

    Parameters

    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    @@ -19476,11 +21752,191 @@

    Parameters


    -
    -
    +
    +
    +
    +

    getBankTransferAttachmentById

    +

    Retrieves a specific attachment from a specific bank transfer using a unique attachment ID

    +
    +
    +
    +

    +

    +

    +
    +
    /BankTransfers/{BankTransferID}/Attachments/{AttachmentID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_get_bank_transfer_attachment_by_id():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    bank_transfer_id = '00000000-0000-0000-0000-000000000000'
    +    attachment_id = '00000000-0000-0000-0000-000000000000'
    +    content_type = 'image/jpg'
    +    
    +    try:
    +        api_response = api_instance.get_bank_transfer_attachment_by_id(xero_tenant_id, bank_transfer_id, attachment_id, content_type)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->getBankTransferAttachmentById: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + + + + + + +
    accounting.attachmentsGrant read-write access to attachments
    accounting.attachments.readGrant read-only access to attachments
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    BankTransferID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Xero generated unique identifier for a bank transfer +
    +
    +
    + Required +
    +
    +
    +
    AttachmentID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Attachment object +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    contentType* + + +
    +
    +
    + + String + + +
    +The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf +
    +
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +
    +
    -

    getBankTransferAttachmentById

    -

    Retrieves a specific attachment from a specific bank transfer using a unique attachment ID

    +

    getBankTransferAttachments

    +

    Retrieves attachments from a specific bank transfer

    @@ -19488,17 +21944,17 @@

    getBankTransferAttachmentById


    -
    /BankTransfers/{BankTransferID}/Attachments/{AttachmentID}
    +
    /BankTransfers/{BankTransferID}/Attachments

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -19512,18 +21968,16 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_get_bank_transfer_attachment_by_id(): +def accounting_get_bank_transfer_attachments(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' bank_transfer_id = '00000000-0000-0000-0000-000000000000' - attachment_id = '00000000-0000-0000-0000-000000000000' - content_type = 'image/jpg' try: - api_response = api_instance.get_bank_transfer_attachment_by_id(xero_tenant_id, bank_transfer_id, attachment_id, content_type) + api_response = api_instance.get_bank_transfer_attachments(xero_tenant_id, bank_transfer_id) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->getBankTransferAttachmentById: %s\n" % e)
    + print("Exception when calling AccountingApi->getBankTransferAttachments: %s\n" % e)

    Scopes

    @@ -19551,7 +22005,7 @@

    Parameters

    -
    +
    @@ -19571,32 +22025,6 @@

    Parameters

    - - - AttachmentID* - - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for Attachment object -
    -
    -
    - Required -
    -
    -
    - @@ -19610,7 +22038,7 @@

    Parameters

    -
    +
    @@ -19627,40 +22055,17 @@

    Parameters

    - - - contentType* - - - -
    -
    -
    - - String - - -
    -The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf -
    -
    -
    - Required -
    -
    -
    -

    -
    -
    +
    +
    -

    getBankTransferAttachments

    -

    Retrieves attachments from a specific bank transfer

    +

    getBankTransferHistory

    +

    Retrieves history from a specific bank transfer using a unique bank transfer Id

    @@ -19668,17 +22073,17 @@

    getBankTransferAttachments


    -
    /BankTransfers/{BankTransferID}/Attachments
    +
    /BankTransfers/{BankTransferID}/History

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -19692,29 +22097,29 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_get_bank_transfer_attachments(): +def accounting_get_bank_transfer_history(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' bank_transfer_id = '00000000-0000-0000-0000-000000000000' try: - api_response = api_instance.get_bank_transfer_attachments(xero_tenant_id, bank_transfer_id) + api_response = api_instance.get_bank_transfer_history(xero_tenant_id, bank_transfer_id) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->getBankTransferAttachments: %s\n" % e)
    + print("Exception when calling AccountingApi->getBankTransferHistory: %s\n" % e)

    Scopes

    - - + + - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    accounting.attachments.readGrant read-only access to attachmentsaccounting.transactions.readGrant read-only access to invoices
    @@ -19729,7 +22134,7 @@

    Parameters

    -
    +
    @@ -19762,7 +22167,7 @@

    Parameters

    -
    +
    @@ -19785,11 +22190,11 @@

    Parameters


    -
    -
    +
    +
    -

    getBankTransferHistory

    -

    Retrieves history from a specific bank transfer using a unique bank transfer Id

    +

    getBankTransfers

    +

    Retrieves all bank transfers

    @@ -19797,17 +22202,17 @@

    getBankTransferHistory


    -
    /BankTransfers/{BankTransferID}/History
    +
    /BankTransfers

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -19821,16 +22226,18 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_get_bank_transfer_history(): +def accounting_get_bank_transfers(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - bank_transfer_id = '00000000-0000-0000-0000-000000000000' + if_modified_since = dateutil.parser.parse("2020-02-06T12:17:43.202-08:00") + where = 'HasAttachments==true' + order = 'Amount ASC' try: - api_response = api_instance.get_bank_transfer_history(xero_tenant_id, bank_transfer_id) + api_response = api_instance.get_bank_transfers(xero_tenant_id, if_modified_since, where, order) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->getBankTransferHistory: %s\n" % e)
    + print("Exception when calling AccountingApi->getBankTransfers: %s\n" % e)

    Scopes

    @@ -19848,28 +22255,25 @@

    Scopes

    Parameters

    -
    Path parameters
    +
    Header parameters
    - + + + + +
    Name Description
    BankTransferID*
    xero-tenant-id* -
    +
    - UUID + String - - (uuid) -
    -Xero generated unique identifier for a bank transfer +Xero identifier for Tenant
    @@ -19878,20 +22282,43 @@

    Parameters

    If-Modified-Since + + +
    +
    +
    + + Date + + + (date-time) + + +
    +Only records created or modified since this timestamp will be returned +
    +
    +
    +
    +
    -
    Header parameters
    +
    Query parameters
    - + + + + + @@ -19914,11 +22358,11 @@

    Parameters


    -
    -
    +
    +
    -

    getBankTransfers

    -

    Retrieves all bank transfers

    +

    getBatchPayment

    +

    Retrieves a specific batch payment using a unique batch payment Id

    @@ -19926,17 +22370,17 @@

    getBankTransfers


    -
    /BankTransfers
    +
    /BatchPayments/{BatchPaymentID}

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -19950,18 +22394,16 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_get_bank_transfers(): +def accounting_get_batch_payment(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' - if_modified_since = dateutil.parser.parse("2020-02-06T12:17:43.202-08:00") - where = 'HasAttachments==true' - order = 'Amount ASC' + batch_payment_id = '00000000-0000-0000-0000-000000000000' try: - api_response = api_instance.get_bank_transfers(xero_tenant_id, if_modified_since, where, order) + api_response = api_instance.get_batch_payment(xero_tenant_id, batch_payment_id) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling AccountingApi->getBankTransfers: %s\n" % e)
    + print("Exception when calling AccountingApi->getBatchPayment: %s\n" % e)

    Scopes

    @@ -19979,25 +22421,28 @@

    Scopes

    Name Description
    xero-tenant-id*
    where -
    +
    @@ -19899,12 +22326,29 @@

    Parameters

    -Xero identifier for Tenant +Filter by an any element +
    +
    +
    +
    +
    order + + +
    +
    +
    + + String + + +
    +Order by an any element
    -
    - Required -

    Parameters

    -
    Header parameters
    +
    Path parameters
    - + - - - -
    Name Description
    xero-tenant-id*
    BatchPaymentID* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Unique identifier for BatchPayment
    @@ -20006,63 +22451,20 @@

    Parameters

    If-Modified-Since - - -
    -
    -
    - - Date - - - (date-time) - - -
    -Only records created or modified since this timestamp will be returned -
    -
    -
    -
    -
    -
    Query parameters
    +
    Header parameters
    - - - - - + @@ -22392,7 +24797,7 @@

    Usage and SDK Samples

    ids = ["00000000-0000-0000-0000-000000000000"] include_archived = 'True' summary_only = 'True' - search_term = 'searchTerm=Joe Bloggs' + search_term = 'Joe Bloggs' try: api_response = api_instance.get_contacts(xero_tenant_id, if_modified_since, where, order, ids, page, include_archived, summary_only, search_term) @@ -26544,6 +28949,126 @@

    Parameters

    + + +
    Name Description
    where - - -
    -
    -
    - - String - - -
    -Filter by an any element -
    -
    -
    -
    -
    order
    xero-tenant-id* -
    +
    @@ -20070,9 +22472,12 @@

    Parameters

    -Order by an any element +Xero identifier for Tenant
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +

    getJournalByNumber

    +

    Retrieves a specific journal using a unique journal number.

    +
    +
    +
    +

    +

    +

    +
    +
    /Journals/{JournalNumber}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_get_journal_by_number():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    
    +    try:
    +        api_response = api_instance.get_journal_by_number(xero_tenant_id, journal_number)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->getJournalByNumber: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.journals.readGrant read-only access to journals
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    JournalNumber* + + +
    +
    +
    + + Integer + + +
    +Number of a Journal +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    @@ -30023,18 +32548,271 @@

    Parameters

    - -
    Header parameters
    - - - - - - +
    NameDescription
    xero-tenant-id*
    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    getPurchaseOrderAsPdf

    +

    Retrieves specific purchase order as PDF files using a unique purchase order Id

    +
    +
    +
    +

    +

    +

    +
    +
    /PurchaseOrders/{PurchaseOrderID}/pdf
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_get_purchase_order_as_pdf():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    purchase_order_id = '00000000-0000-0000-0000-000000000000'
    +    
    +    try:
    +        api_response = api_instance.get_purchase_order_as_pdf(xero_tenant_id, purchase_order_id)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->getPurchaseOrderAsPdf: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + + + + + + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    accounting.transactions.readGrant read-only access to invoices
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    PurchaseOrderID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for an Purchase Order +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    getPurchaseOrderAttachmentByFileName

    +

    Retrieves a specific attachment for a specific purchase order by filename

    +
    +
    +
    +

    +

    +

    +
    +
    /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_get_purchase_order_attachment_by_file_name():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    purchase_order_id = '00000000-0000-0000-0000-000000000000'
    +    file_name = 'xero-dev.jpg'
    +    content_type = 'image/jpg'
    +    
    +    try:
    +        api_response = api_instance.get_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, content_type)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->getPurchaseOrderAttachmentByFileName: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + + + + + + +
    accounting.attachmentsGrant read-write access to attachments
    accounting.attachments.readGrant read-only access to attachments
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    PurchaseOrderID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for an Purchase Order +
    +
    +
    + Required +
    +
    +
    +
    FileName* -
    +
    @@ -30042,7 +32820,7 @@

    Parameters

    -Xero identifier for Tenant +Name of the attachment
    @@ -30054,94 +32832,25 @@

    Parameters

    -
    -
    -
    -
    -
    -
    -

    getPurchaseOrderAsPdf

    -

    Retrieves specific purchase order as PDF files using a unique purchase order Id

    -
    -
    -
    -

    -

    -

    -
    -
    /PurchaseOrders/{PurchaseOrderID}/pdf
    -

    -

    Usage and SDK Samples

    -

    - -
    - -
    -
    # configure api_client for use with xero-python sdk client
    -api_client = ApiClient(
    -    Configuration(
    -        debug=false,
    -        oauth2_token=OAuth2Token(
    -            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    -        ),
    -    ),
    -    pool_threads=1,
    -)
    -
    -api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    -
    -def accounting_get_purchase_order_as_pdf():
    -    api_instance = AccountingApi(api_client)
    -    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    -    purchase_order_id = '00000000-0000-0000-0000-000000000000'
    -    
    -    try:
    -        api_response = api_instance.get_purchase_order_as_pdf(xero_tenant_id, purchase_order_id)
    -        print(api_response)
    -    except AccountingBadRequestException as e:
    -        print("Exception when calling AccountingApi->getPurchaseOrderAsPdf: %s\n" % e)
    -
    -
    -

    Scopes

    - - - - - - - - - - - - -
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    accounting.transactions.readGrant read-only access to invoices
    -

    Parameters

    -
    Path parameters
    +
    Header parameters
    - + -
    Name Description
    PurchaseOrderID*
    xero-tenant-id* -
    +
    - UUID + String - - (uuid) -
    -Unique identifier for an Purchase Order +Xero identifier for Tenant
    @@ -30152,18 +32861,11 @@

    Parameters

    -
    Header parameters
    - - - - - - + - - -
    NameDescription
    xero-tenant-id*
    contentType* -
    +
    @@ -30171,7 +32873,7 @@

    Parameters

    -Xero identifier for Tenant +The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
    @@ -30974,183 +33676,6 @@

    Parameters

    -
    -
    -
    -
    -
    -
    -

    getPurchaseOrder≠AttachmentByFileName

    -

    Retrieves a specific attachment for a specific purchase order by filename

    -
    -
    -
    -

    -

    -

    -
    -
    /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}
    -

    -

    Usage and SDK Samples

    -

    - -
    - -
    -
    # configure api_client for use with xero-python sdk client
    -api_client = ApiClient(
    -    Configuration(
    -        debug=false,
    -        oauth2_token=OAuth2Token(
    -            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    -        ),
    -    ),
    -    pool_threads=1,
    -)
    -
    -api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    -
    -def accounting_get_purchase_order≠attachment_by_file_name():
    -    api_instance = AccountingApi(api_client)
    -    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    -    purchase_order_id = '00000000-0000-0000-0000-000000000000'
    -    file_name = 'xero-dev.jpg'
    -    content_type = 'image/jpg'
    -    
    -    try:
    -        api_response = api_instance.get_purchase_order≠attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, content_type)
    -        print(api_response)
    -    except AccountingBadRequestException as e:
    -        print("Exception when calling AccountingApi->getPurchaseOrder≠AttachmentByFileName: %s\n" % e)
    -
    -
    -

    Scopes

    - - - - - - - - - - - - -
    accounting.attachmentsGrant read-write access to attachments
    accounting.attachments.readGrant read-only access to attachments
    -

    Parameters

    -
    Path parameters
    - - - - - - - - - - - - - -
    NameDescription
    PurchaseOrderID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for an Purchase Order -
    -
    -
    - Required -
    -
    -
    -
    FileName* - - -
    -
    -
    - - String - - -
    -Name of the attachment -
    -
    -
    - Required -
    -
    -
    -
    -
    Header parameters
    - - - - - - - - - - -
    NameDescription
    xero-tenant-id* - - -
    -
    -
    - - String - - -
    -Xero identifier for Tenant -
    -
    -
    - Required -
    -
    -
    -
    contentType* - - -
    -
    -
    - - String - - -
    -The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf -
    -
    -
    - Required -
    -
    -
    -
    @@ -36854,6 +39379,7 @@

    Usage and SDK Samples

    def accounting_post_setup(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' account = Account( code = "123", @@ -36875,7 +39401,7 @@

    Usage and SDK Samples

    conversion_balances = conversion_balances) try: - api_response = api_instance.post_setup(xero_tenant_id, setup) + api_response = api_instance.post_setup(xero_tenant_id, setup, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->postSetup: %s\n" % e) @@ -36918,6 +39444,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -37001,6 +39547,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' account_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' account = Account( code = "123456", @@ -37013,7 +39560,7 @@

    Usage and SDK Samples

    accounts = [account]) try: - api_response = api_instance.update_account(xero_tenant_id, account_id, accounts) + api_response = api_instance.update_account(xero_tenant_id, account_id, accounts, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateAccount: %s\n" % e) @@ -37089,6 +39636,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -37173,13 +39740,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' account_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body) + api_response = api_instance.update_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateAccountAttachmentByFileName: %s\n" % e) @@ -37278,6 +39846,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -37361,6 +39949,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' bank_transaction_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' contact = Contact( contact_id = "00000000-0000-0000-0000-000000000000") @@ -37388,7 +39977,7 @@

    Usage and SDK Samples

    bank_transactions = [bank_transaction]) try: - api_response = api_instance.update_bank_transaction(xero_tenant_id, bank_transaction_id, bankTransactions, unitdp) + api_response = api_instance.update_bank_transaction(xero_tenant_id, bank_transaction_id, bankTransactions, idempotency_key, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateBankTransaction: %s\n" % e) @@ -37464,6 +40053,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -37574,13 +40183,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' bank_transaction_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body) + api_response = api_instance.update_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: %s\n" % e) @@ -37662,7 +40272,217 @@

    Parameters

    -
    +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    + + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + + + + +
    Body parameters
    + + + + + + + +
    NameDescription
    body * +
    +
    + + byte[] + +
    + Byte array of file in body of request +
    +
    +
    + Required +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    updateBankTransferAttachmentByFileName

    +

    +
    +
    +
    +

    +

    +

    +
    +
    /BankTransfers/{BankTransferID}/Attachments/{FileName}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_update_bank_transfer_attachment_by_file_name():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    bank_transfer_id = '00000000-0000-0000-0000-000000000000'
    +    file_name = 'xero-dev.jpg'
    +    idempotency_key = 'KEY_VALUE'
    +    
    +    path_to_upload = Path(__file__).resolve().parent.joinpath(fileName)
    +    open_file = open(path_to_upload, 'rb')
    +        body = open_file.read()
    +    
    +    try:
    +        api_response = api_instance.update_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.attachmentsGrant read-write access to attachments
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    BankTransferID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Xero generated unique identifier for a bank transfer +
    +
    +
    + Required +
    +
    +
    +
    FileName* + + +
    +
    +
    + + String + + +
    +Name of the attachment +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + -
    NameDescription
    xero-tenant-id* + + +
    @@ -37681,147 +40501,11 @@

    Parameters

    -
    Body parameters
    - - - - - - - -
    NameDescription
    body * -
    -
    - - byte[] - -
    - Byte array of file in body of request -
    -
    -
    - Required -
    -
    - -
    -
    -
    -
    -
    -
    -
    -

    updateBankTransferAttachmentByFileName

    -

    -
    -
    -
    -

    -

    -

    -
    -
    /BankTransfers/{BankTransferID}/Attachments/{FileName}
    -

    -

    Usage and SDK Samples

    -

    - -
    - -
    -
    # configure api_client for use with xero-python sdk client
    -api_client = ApiClient(
    -    Configuration(
    -        debug=false,
    -        oauth2_token=OAuth2Token(
    -            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    -        ),
    -    ),
    -    pool_threads=1,
    -)
    -
    -api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    -
    -def accounting_update_bank_transfer_attachment_by_file_name():
    -    api_instance = AccountingApi(api_client)
    -    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    -    bank_transfer_id = '00000000-0000-0000-0000-000000000000'
    -    file_name = 'xero-dev.jpg'
    -    
    -    path_to_upload = Path(__file__).resolve().parent.joinpath(fileName)
    -    open_file = open(path_to_upload, 'rb')
    -        body = open_file.read()
    -    
    -    try:
    -        api_response = api_instance.update_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body)
    -        print(api_response)
    -    except AccountingBadRequestException as e:
    -        print("Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: %s\n" % e)
    -
    -
    -

    Scopes

    - - - - - - - -
    accounting.attachmentsGrant read-write access to attachments
    -

    Parameters

    -
    Path parameters
    - - - - - - - - - - + - - -
    NameDescription
    BankTransferID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Xero generated unique identifier for a bank transfer -
    -
    -
    - Required -
    -
    -
    -
    FileName*
    Idempotency-Key -
    +
    @@ -37829,42 +40513,9 @@

    Parameters

    -Name of the attachment +This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
    -
    - Required -
    -
    -
    -
    -
    Header parameters
    - - - - - - - @@ -37951,6 +40602,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' contact_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' contact = Contact( name = "Thanos", @@ -37960,7 +40612,7 @@

    Usage and SDK Samples

    contacts = [contact]) try: - api_response = api_instance.update_contact(xero_tenant_id, contact_id, contacts) + api_response = api_instance.update_contact(xero_tenant_id, contact_id, contacts, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateContact: %s\n" % e) @@ -38036,6 +40688,26 @@

    Parameters

    + + + +
    NameDescription
    xero-tenant-id* - - -
    -
    -
    - - String - - -
    -Xero identifier for Tenant -
    -
    -
    - Required -
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    @@ -38120,13 +40792,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' contact_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body) + api_response = api_instance.update_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateContactAttachmentByFileName: %s\n" % e) @@ -38225,6 +40898,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -38308,6 +41001,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' contact_group_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' contact_group = ContactGroup( name = "Vendor") @@ -38316,7 +41010,7 @@

    Usage and SDK Samples

    contact_groups = [contact_group]) try: - api_response = api_instance.update_contact_group(xero_tenant_id, contact_group_id, contactGroups) + api_response = api_instance.update_contact_group(xero_tenant_id, contact_group_id, contactGroups, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateContactGroup: %s\n" % e) @@ -38392,6 +41086,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -38475,6 +41189,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' credit_note_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' curr_date = dateutil.parser.parse('2020-12-03T00:00:00Z') contact = Contact( @@ -38501,7 +41216,7 @@

    Usage and SDK Samples

    credit_notes = [credit_note]) try: - api_response = api_instance.update_credit_note(xero_tenant_id, credit_note_id, creditNotes, unitdp) + api_response = api_instance.update_credit_note(xero_tenant_id, credit_note_id, creditNotes, idempotency_key, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateCreditNote: %s\n" % e) @@ -38577,6 +41292,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -38688,13 +41423,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' credit_note_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, body) + api_response = api_instance.update_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: %s\n" % e) @@ -38793,6 +41529,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -38876,6 +41632,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' expense_claim_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' curr_date = dateutil.parser.parse('2020-12-03T00:00:00Z') user = User( @@ -38897,7 +41654,7 @@

    Usage and SDK Samples

    expense_claims = [expense_claim]) try: - api_response = api_instance.update_expense_claim(xero_tenant_id, expense_claim_id, expenseClaims) + api_response = api_instance.update_expense_claim(xero_tenant_id, expense_claim_id, expenseClaims, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateExpenseClaim: %s\n" % e) @@ -38973,6 +41730,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -39055,6 +41832,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' invoice_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' invoice = Invoice( reference = "I am Iron man") @@ -39063,7 +41841,7 @@

    Usage and SDK Samples

    invoices = [invoice]) try: - api_response = api_instance.update_invoice(xero_tenant_id, invoice_id, invoices, unitdp) + api_response = api_instance.update_invoice(xero_tenant_id, invoice_id, invoices, idempotency_key, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateInvoice: %s\n" % e) @@ -39139,6 +41917,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -39249,13 +42047,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' invoice_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, body) + api_response = api_instance.update_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: %s\n" % e) @@ -39354,6 +42153,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -39437,6 +42256,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' item_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' item = Item( code = "ItemCode123", @@ -39446,7 +42266,7 @@

    Usage and SDK Samples

    items = [item]) try: - api_response = api_instance.update_item(xero_tenant_id, item_id, items, unitdp) + api_response = api_instance.update_item(xero_tenant_id, item_id, items, idempotency_key, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateItem: %s\n" % e) @@ -39522,6 +42342,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -39631,6 +42471,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' linked_transaction_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' linked_transaction = LinkedTransaction( source_line_item_id = "00000000-0000-0000-0000-000000000000", @@ -39640,7 +42481,7 @@

    Usage and SDK Samples

    linked_transactions = [linked_transaction]) try: - api_response = api_instance.update_linked_transaction(xero_tenant_id, linked_transaction_id, linkedTransactions) + api_response = api_instance.update_linked_transaction(xero_tenant_id, linked_transaction_id, linkedTransactions, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateLinkedTransaction: %s\n" % e) @@ -39716,6 +42557,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -39798,6 +42659,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' manual_journal_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' date_value = dateutil.parser.parse('2020-12-03T00:00:00Z') manual_journal_lines = [] @@ -39823,7 +42685,7 @@

    Usage and SDK Samples

    manual_journals = [manual_journal]) try: - api_response = api_instance.update_manual_journal(xero_tenant_id, manual_journal_id, manualJournals) + api_response = api_instance.update_manual_journal(xero_tenant_id, manual_journal_id, manualJournals, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateManualJournal: %s\n" % e) @@ -39871,18 +42733,197 @@

    Parameters

    - -
    Header parameters
    - - - - - - +
    NameDescription
    xero-tenant-id*
    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    manualJournals * +
    +
    + + ManualJournals + +
    + +
    +
    +
    + Required +
    +
    + +
    + + +
    +
    +
    +
    +

    updateManualJournalAttachmentByFileName

    +

    Updates a specific attachment from a specific manual journal by file name

    +
    +
    +
    +

    +

    +

    +
    +
    /ManualJournals/{ManualJournalID}/Attachments/{FileName}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_update_manual_journal_attachment_by_file_name():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    manual_journal_id = '00000000-0000-0000-0000-000000000000'
    +    file_name = 'xero-dev.jpg'
    +    idempotency_key = 'KEY_VALUE'
    +    
    +    path_to_upload = Path(__file__).resolve().parent.joinpath(fileName)
    +    open_file = open(path_to_upload, 'rb')
    +        body = open_file.read()
    +    
    +    try:
    +        api_response = api_instance.update_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, body, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.attachmentsGrant read-write access to attachments
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    ManualJournalID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a ManualJournal +
    +
    +
    + Required +
    +
    +
    +
    FileName* -
    +
    @@ -39890,7 +42931,7 @@

    Parameters

    -Xero identifier for Tenant +Name of the attachment
    @@ -39902,145 +42943,17 @@

    Parameters

    -
    Body parameters
    - - - - - - - -
    NameDescription
    manualJournals * -
    -
    - - ManualJournals - -
    - -
    -
    -
    - Required -
    -
    - -
    -
    -
    -
    -
    -
    -
    -

    updateManualJournalAttachmentByFileName

    -

    Updates a specific attachment from a specific manual journal by file name

    -
    -
    -
    -

    -

    -

    -
    -
    /ManualJournals/{ManualJournalID}/Attachments/{FileName}
    -

    -

    Usage and SDK Samples

    -

    - -
    - -
    -
    # configure api_client for use with xero-python sdk client
    -api_client = ApiClient(
    -    Configuration(
    -        debug=false,
    -        oauth2_token=OAuth2Token(
    -            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    -        ),
    -    ),
    -    pool_threads=1,
    -)
    -
    -api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    -
    -def accounting_update_manual_journal_attachment_by_file_name():
    -    api_instance = AccountingApi(api_client)
    -    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    -    manual_journal_id = '00000000-0000-0000-0000-000000000000'
    -    file_name = 'xero-dev.jpg'
    -    
    -    path_to_upload = Path(__file__).resolve().parent.joinpath(fileName)
    -    open_file = open(path_to_upload, 'rb')
    -        body = open_file.read()
    -    
    -    try:
    -        api_response = api_instance.update_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, body)
    -        print(api_response)
    -    except AccountingBadRequestException as e:
    -        print("Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: %s\n" % e)
    -
    -
    -

    Scopes

    - - - - - - - -
    accounting.attachmentsGrant read-write access to attachments
    -

    Parameters

    -
    Path parameters
    +
    Header parameters
    - - - - - + -
    Name Description
    ManualJournalID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for a ManualJournal -
    -
    -
    - Required -
    -
    -
    -
    FileName*
    xero-tenant-id* -
    +
    @@ -40048,7 +42961,7 @@

    Parameters

    -Name of the attachment +Xero identifier for Tenant
    @@ -40059,18 +42972,11 @@

    Parameters

    -
    Header parameters
    - - - - - - + @@ -40169,6 +43072,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_bank_transactions(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' contact = Contact( @@ -40196,7 +43100,7 @@

    Usage and SDK Samples

    bank_transactions = [bank_transaction]) try: - api_response = api_instance.update_or_create_bank_transactions(xero_tenant_id, bankTransactions, summarize_errors, unitdp) + api_response = api_instance.update_or_create_bank_transactions(xero_tenant_id, bankTransactions, idempotency_key, summarize_errors, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreateBankTransactions: %s\n" % e) @@ -40239,6 +43143,26 @@

    Parameters

    + + + +
    NameDescription
    xero-tenant-id*
    Idempotency-Key -
    +
    @@ -40078,12 +42984,9 @@

    Parameters

    -Xero identifier for Tenant +This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
    -
    - Required -
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    @@ -40367,6 +43291,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_contacts(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' phone = Phone( @@ -40385,7 +43310,7 @@

    Usage and SDK Samples

    contacts = [contact]) try: - api_response = api_instance.update_or_create_contacts(xero_tenant_id, contacts, summarize_errors) + api_response = api_instance.update_or_create_contacts(xero_tenant_id, contacts, idempotency_key, summarize_errors) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreateContacts: %s\n" % e) @@ -40428,6 +43353,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -40536,6 +43481,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_credit_notes(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' curr_date = dateutil.parser.parse('2020-12-03T00:00:00Z') @@ -40561,7 +43507,7 @@

    Usage and SDK Samples

    credit_notes = [credit_note]) try: - api_response = api_instance.update_or_create_credit_notes(xero_tenant_id, creditNotes, summarize_errors, unitdp) + api_response = api_instance.update_or_create_credit_notes(xero_tenant_id, creditNotes, idempotency_key, summarize_errors, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreateCreditNotes: %s\n" % e) @@ -40604,6 +43550,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -40733,6 +43699,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_employees(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' employee = Employee( @@ -40743,7 +43710,7 @@

    Usage and SDK Samples

    employees = [employee]) try: - api_response = api_instance.update_or_create_employees(xero_tenant_id, employees, summarize_errors) + api_response = api_instance.update_or_create_employees(xero_tenant_id, employees, idempotency_key, summarize_errors) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreateEmployees: %s\n" % e) @@ -40786,6 +43753,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -40895,6 +43882,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_invoices(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' date_value = dateutil.parser.parse('2020-10-10T00:00:00Z') due_date_value = dateutil.parser.parse('2020-10-28T00:00:00Z') @@ -40924,7 +43912,7 @@

    Usage and SDK Samples

    invoices = [invoice]) try: - api_response = api_instance.update_or_create_invoices(xero_tenant_id, invoices, summarize_errors, unitdp) + api_response = api_instance.update_or_create_invoices(xero_tenant_id, invoices, idempotency_key, summarize_errors, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreateInvoices: %s\n" % e) @@ -40967,6 +43955,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -41095,6 +44103,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_items(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' item = Item( @@ -41106,7 +44115,7 @@

    Usage and SDK Samples

    items = [item]) try: - api_response = api_instance.update_or_create_items(xero_tenant_id, items, summarize_errors, unitdp) + api_response = api_instance.update_or_create_items(xero_tenant_id, items, idempotency_key, summarize_errors, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreateItems: %s\n" % e) @@ -41149,6 +44158,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -41277,6 +44306,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_manual_journals(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' date_value = dateutil.parser.parse('2020-12-03T00:00:00Z') @@ -41303,7 +44333,7 @@

    Usage and SDK Samples

    manual_journals = [manual_journal]) try: - api_response = api_instance.update_or_create_manual_journals(xero_tenant_id, manualJournals, summarize_errors) + api_response = api_instance.update_or_create_manual_journals(xero_tenant_id, manualJournals, idempotency_key, summarize_errors) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreateManualJournals: %s\n" % e) @@ -41346,6 +44376,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -41455,6 +44505,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_purchase_orders(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' date_value = dateutil.parser.parse('2020-12-03T00:00:00Z') @@ -41479,7 +44530,7 @@

    Usage and SDK Samples

    purchase_orders = [purchase_order]) try: - api_response = api_instance.update_or_create_purchase_orders(xero_tenant_id, purchaseOrders, summarize_errors) + api_response = api_instance.update_or_create_purchase_orders(xero_tenant_id, purchaseOrders, idempotency_key, summarize_errors) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreatePurchaseOrders: %s\n" % e) @@ -41522,6 +44573,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -41630,6 +44701,7 @@

    Usage and SDK Samples

    def accounting_update_or_create_quotes(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' summarize_errors = 'True' date_value = dateutil.parser.parse('2020-12-03T00:00:00Z') @@ -41654,7 +44726,7 @@

    Usage and SDK Samples

    quotes = [quote]) try: - api_response = api_instance.update_or_create_quotes(xero_tenant_id, quotes, summarize_errors) + api_response = api_instance.update_or_create_quotes(xero_tenant_id, quotes, idempotency_key, summarize_errors) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateOrCreateQuotes: %s\n" % e) @@ -41697,6 +44769,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -41760,6 +44852,182 @@

    Parameters

    + + + + + +
    +
    +
    +
    +

    updateOrCreateRepeatingInvoices

    +

    Creates or deletes one or more repeating invoice templates

    +
    +
    +
    +

    +

    +

    +
    +
    /RepeatingInvoices
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_update_or_create_repeating_invoices():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    idempotency_key = 'KEY_VALUE'
    +    summarize_errors = 'True'
    +    
    +    try:
    +        api_response = api_instance.update_or_create_repeating_invoices(xero_tenant_id, repeatingInvoices, idempotency_key, summarize_errors)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->updateOrCreateRepeatingInvoices: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    +

    Parameters

    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    repeatingInvoices * +
    +
    + + RepeatingInvoices + +
    + RepeatingInvoices with an array of repeating invoice objects in body of request +
    +
    +
    + Required +
    +
    + +
    +
    Query parameters
    + + + + + + +
    NameDescription
    summarizeErrors + + +
    +
    +
    + + Boolean + + +
    +If false return 200 OK and mix of successfully created objects and any with validation errors +
    +
    +
    +
    +
    @@ -41806,6 +45074,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' purchase_order_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' purchase_order = PurchaseOrder( attentionTo = "Peter Parker") @@ -41814,7 +45083,7 @@

    Usage and SDK Samples

    purchase_orders = [purchase_order]) try: - api_response = api_instance.update_purchase_order(xero_tenant_id, purchase_order_id, purchaseOrders) + api_response = api_instance.update_purchase_order(xero_tenant_id, purchase_order_id, purchaseOrders, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updatePurchaseOrder: %s\n" % e) @@ -41890,6 +45159,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -41973,13 +45262,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' purchase_order_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, body) + api_response = api_instance.update_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updatePurchaseOrderAttachmentByFileName: %s\n" % e) @@ -42078,6 +45368,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -42161,6 +45471,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' quote_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' date_value = dateutil.parser.parse('2020-12-03T00:00:00Z') contact = Contact( @@ -42175,7 +45486,7 @@

    Usage and SDK Samples

    quotes = [quote]) try: - api_response = api_instance.update_quote(xero_tenant_id, quote_id, quotes) + api_response = api_instance.update_quote(xero_tenant_id, quote_id, quotes, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateQuote: %s\n" % e) @@ -42251,6 +45562,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -42334,13 +45665,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' quote_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body) + api_response = api_instance.update_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateQuoteAttachmentByFileName: %s\n" % e) @@ -42439,6 +45771,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -42522,6 +45874,7 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' receipt_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' dateValue = dateutil.parser.parse('2020-10-10T00:00:00Z') user = User( @@ -42536,7 +45889,7 @@

    Usage and SDK Samples

    receipts = [receipt]) try: - api_response = api_instance.update_receipt(xero_tenant_id, receipt_id, receipts, unitdp) + api_response = api_instance.update_receipt(xero_tenant_id, receipt_id, receipts, idempotency_key, unitdp) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateReceipt: %s\n" % e) @@ -42612,6 +45965,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -42722,13 +46095,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' receipt_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, body) + api_response = api_instance.update_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateReceiptAttachmentByFileName: %s\n" % e) @@ -42827,6 +46201,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -42864,6 +46258,187 @@

    Parameters

    } }, "required" : true +} + + + + +
    +
    +
    +
    +

    updateRepeatingInvoice

    +

    Deletes a specific repeating invoice template

    +
    +
    +
    +

    +

    +

    +
    +
    /RepeatingInvoices/{RepeatingInvoiceID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_update_repeating_invoice():
    +    api_instance = AccountingApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
    +    idempotency_key = 'KEY_VALUE'
    +    
    +    try:
    +        api_response = api_instance.update_repeating_invoice(xero_tenant_id, repeating_invoice_id, repeatingInvoices, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AccountingApi->updateRepeatingInvoice: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    RepeatingInvoiceID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Repeating Invoice +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    repeatingInvoices * +
    +
    + + RepeatingInvoices + +
    + +
    +
    +
    + Required +
    +
    +
    @@ -42911,13 +46486,14 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' repeating_invoice_id = '00000000-0000-0000-0000-000000000000' file_name = 'xero-dev.jpg' + idempotency_key = 'KEY_VALUE' path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) open_file = open(path_to_upload, 'rb') body = open_file.read() try: - api_response = api_instance.update_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body) + api_response = api_instance.update_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateRepeatingInvoiceAttachmentByFileName: %s\n" % e) @@ -43016,6 +46592,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -43098,6 +46694,7 @@

    Usage and SDK Samples

    def accounting_update_tax_rate(): api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' tax_component = TaxComponent( name = "State Tax", @@ -43114,7 +46711,7 @@

    Usage and SDK Samples

    tax_rates = [tax_rate]) try: - api_response = api_instance.update_tax_rate(xero_tenant_id, taxRates) + api_response = api_instance.update_tax_rate(xero_tenant_id, taxRates, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateTaxRate: %s\n" % e) @@ -43157,6 +46754,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -43239,12 +46856,13 @@

    Usage and SDK Samples

    api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' tracking_category_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' trackingCategory = TrackingCategory( name = "Foobar") try: - api_response = api_instance.update_tracking_category(xero_tenant_id, tracking_category_id, trackingCategory) + api_response = api_instance.update_tracking_category(xero_tenant_id, tracking_category_id, trackingCategory, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateTrackingCategory: %s\n" % e) @@ -43320,6 +46938,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -43403,12 +47041,13 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' tracking_category_id = '00000000-0000-0000-0000-000000000000' tracking_option_id = '00000000-0000-0000-0000-000000000000' + idempotency_key = 'KEY_VALUE' trackingOption = TrackingOption( name = "Foobar") try: - api_response = api_instance.update_tracking_options(xero_tenant_id, tracking_category_id, tracking_option_id, trackingOption) + api_response = api_instance.update_tracking_options(xero_tenant_id, tracking_category_id, tracking_option_id, trackingOption, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AccountingApi->updateTrackingOptions: %s\n" % e) @@ -43510,6 +47149,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + diff --git a/docs/v1/appstore/index.html b/docs/v1/appstore/index.html index d77b5230..943e8d9f 100644 --- a/docs/v1/appstore/index.html +++ b/docs/v1/appstore/index.html @@ -862,6 +862,25 @@ + + + +
    +
    +
    +
    +

    putUsageRecords

    +

    Update and existing metered usage belonging to this subscription and subscription item

    +
    +
    +
    +

    +

    +

    +
    +
    /subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records/{usageRecordId}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_put_usage_records():
    +    api_instance = AppStoreApi(api_client)
    +    subscription_id = '00000000-0000-0000-0000-000000000000'
    +    subscription_item_id = '00000000-0000-0000-0000-000000000000'
    +    usage_record_id = '00000000-0000-0000-0000-000000000000'
    +    idempotency_key = 'KEY_VALUE'
    +    
    +    try:
    +        api_response = api_instance.put_usage_records(subscription_id, subscription_item_id, usage_record_id, updateUsageRecord, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling AppStoreApi->putUsageRecords: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    marketplace.billingGrant read-only access to fixed assets
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + + + + + +
    NameDescription
    subscriptionId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Subscription object +
    +
    +
    + Required +
    +
    +
    +
    subscriptionItemId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +The unique identifier of the subscriptionItem +
    +
    +
    + Required +
    +
    +
    +
    usageRecordId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +The unique identifier of the usage record +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    updateUsageRecord * +
    +
    + + UpdateUsageRecord + +
    + Contains the quantity for the usage record to update +
    +
    +
    + Required +
    +
    + +
    +
    +
    +
    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -1601,6 +1622,7 @@

    Usage and SDK Samples

    def accounting_create_asset_type(): api_instance = AssetApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' book_depreciation_setting = BookDepreciationSetting( depreciation_method = "DiminishingValue100", @@ -1616,7 +1638,7 @@

    Usage and SDK Samples

    book_depreciation_setting = book_depreciation_setting) try: - api_response = api_instance.create_asset_type(xero_tenant_id, assetType) + api_response = api_instance.create_asset_type(xero_tenant_id, idempotency_key, assetType) print(api_response) except AccountingBadRequestException as e: print("Exception when calling AssetApi->createAssetType: %s\n" % e) @@ -1659,6 +1681,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + diff --git a/docs/v1/files/index.html b/docs/v1/files/index.html index 38fb202d..2cd67923 100644 --- a/docs/v1/files/index.html +++ b/docs/v1/files/index.html @@ -1175,6 +1175,9 @@
  • getAssociationsByObject
  • +
  • + getAssociationsCount +
  • getFile
  • @@ -1266,9 +1269,10 @@

    Usage and SDK Samples

    api_instance = FilesApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.create_file_association(xero_tenant_id, file_id, association) + api_response = api_instance.create_file_association(xero_tenant_id, file_id, idempotency_key, association) print(api_response) except AccountingBadRequestException as e: print("Exception when calling FilesApi->createFileAssociation: %s\n" % e) @@ -1344,6 +1348,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -1421,9 +1445,10 @@

    Usage and SDK Samples

    def accounting_create_folder(): api_instance = FilesApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.create_folder(xero_tenant_id, folder) + api_response = api_instance.create_folder(xero_tenant_id, idempotency_key, folder) print(api_response) except AccountingBadRequestException as e: print("Exception when calling FilesApi->createFolder: %s\n" % e) @@ -1466,6 +1491,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -1909,7 +1954,7 @@

    getAssociationsByObject

    -

    By passing in the appropriate options,

    +

    By passing in the appropriate options, you can retrieve an association


    /Associations/{ObjectId}
    @@ -1940,9 +1985,11 @@

    Usage and SDK Samples

    api_instance = FilesApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' object_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + sort = 'Associations/{ObjectId}?sort=CreatedDateUtc' + direction = 'Associations/{ObjectId}?sort=CreatedDateUtc&direction=DESC' try: - api_response = api_instance.get_associations_by_object(xero_tenant_id, object_id) + api_response = api_instance.get_associations_by_object(xero_tenant_id, object_id, pagesize, page, sort, direction) print(api_response) except AccountingBadRequestException as e: print("Exception when calling FilesApi->getAssociationsByObject: %s\n" % e) @@ -2023,6 +2070,222 @@

    Parameters

    + + + +
    Query parameters
    + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    pagesize + + +
    +
    +
    + + Integer + + +
    +pass an optional page size value +
    +
    +
    +
    +
    page + + +
    +
    +
    + + Integer + + +
    +number of records to skip for pagination +
    +
    +
    +
    +
    sort + + +
    +
    +
    + + String + + +
    +values to sort by +
    +
    +
    +
    +
    direction + + +
    +
    +
    + + String + + +
    +direction to sort by +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +

    getAssociationsCount

    +

    Retrieves a count of associations for a list of objects.

    +
    +
    +
    +

    +

    By passing in the appropriate options, you can retrieve the association count for objects

    +

    +
    +
    /Associations/Count
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_get_associations_count():
    +    api_instance = FilesApi(api_client)
    +    xero_tenant_id = 'YOUR_XERO_TENANT_ID'
    +    objectIds = []
    +    
    +    try:
    +        api_response = api_instance.get_associations_count(xero_tenant_id, objectIds)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling FilesApi->getAssociationsCount: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + + + + + + +
    filesGrant read-write access to files and folders
    files.readGrant read-only access to files and folders
    +

    Parameters

    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    +
    Query parameters
    + + + + + + +
    NameDescription
    ObjectIds* + + +
    +
    +
    + + array[UUID] + + + (uuid) + + +
    +A comma-separated list of object ids +
    +
    +
    + Required +
    +
    +
    +
    @@ -2966,9 +3229,10 @@

    Usage and SDK Samples

    api_instance = FilesApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.update_file(xero_tenant_id, file_id, fileObject) + api_response = api_instance.update_file(xero_tenant_id, file_id, idempotency_key, fileObject) print(api_response) except AccountingBadRequestException as e: print("Exception when calling FilesApi->updateFile: %s\n" % e) @@ -3044,6 +3308,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -3122,9 +3406,10 @@

    Usage and SDK Samples

    api_instance = FilesApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.update_folder(xero_tenant_id, folder_id, folder) + api_response = api_instance.update_folder(xero_tenant_id, folder_id, folder, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling FilesApi->updateFolder: %s\n" % e) @@ -3200,6 +3485,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -3283,10 +3588,11 @@

    Usage and SDK Samples

    xero_tenant_id = 'YOUR_XERO_TENANT_ID' name = 'name_example' filename = 'filename_example' + idempotency_key = 'KEY_VALUE' mimeType = 'mimeType_example' try: - api_response = api_instance.upload_file(xero_tenant_id, body, name, filename, mimeType) + api_response = api_instance.upload_file(xero_tenant_id, body, name, filename, idempotency_key, mimeType) print(api_response) except AccountingBadRequestException as e: print("Exception when calling FilesApi->uploadFile: %s\n" % e) @@ -3329,6 +3635,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -3476,10 +3802,11 @@

    Usage and SDK Samples

    folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' name = 'name_example' filename = 'filename_example' + idempotency_key = 'KEY_VALUE' mimeType = 'mimeType_example' try: - api_response = api_instance.upload_file_to_folder(xero_tenant_id, folder_id, body, name, filename, mimeType) + api_response = api_instance.upload_file_to_folder(xero_tenant_id, folder_id, body, name, filename, idempotency_key, mimeType) print(api_response) except AccountingBadRequestException as e: print("Exception when calling FilesApi->uploadFileToFolder: %s\n" % e) @@ -3555,6 +3882,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + diff --git a/docs/v1/finance/index.html b/docs/v1/finance/index.html index 10176966..6d731eeb 100644 --- a/docs/v1/finance/index.html +++ b/docs/v1/finance/index.html @@ -2052,7 +2052,7 @@ "title" : "", "type" : "string", "description" : "", - "enum" : [ "NotSet", "bank-account-not-found", "internal-error", "invalid-application", "invalid-request", "organisation-not-found", "organisation-offline", "request-timeout", "service-unavailable", "unauthorized" ] + "enum" : [ "NotSet", "bank-account-not-found", "internal-error", "invalid-application", "invalid-request", "organisation-not-found", "organisation-offline", "request-timeout", "service-unavailable", "unauthorized", "rate-limit-error" ] }; defs["ProfitAndLossResponse"] = { "title" : "", @@ -2161,6 +2161,10 @@ "description" : "Date of when statement line was posted", "format" : "date" }, + "payee" : { + "type" : "string", + "description" : "Payee description of statement line" + }, "reference" : { "type" : "string", "description" : "Reference description of statement line" @@ -2345,7 +2349,31 @@ }, "importSource" : { "type" : "string", - "description" : "Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF, STMTIMPORTSRC/OFX, XeroApi)" + "description" : "Identifies where the statement data in Xero was sourced, 1) direct bank feed, automatically loaded from the bank (eg STMTIMPORTSRC/CBAFEED); 2) indirect bank feed, automatically loaded from a 3rd party provider (eg STMTIMPORTSRC/YODLEE); 3) manually uploaded bank feed (eg STMTIMPORTSRC/CSV) or 4) manually entered statement data (STMTIMPORTSRC/MANUAL)." + }, + "startBalance" : { + "type" : "number", + "description" : "Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0.", + "format" : "double", + "x-is-money" : true + }, + "endBalance" : { + "type" : "number", + "description" : "Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0.", + "format" : "double", + "x-is-money" : true + }, + "indicativeStartBalance" : { + "type" : "number", + "description" : "Opening statement balance calculated in Xero (= bank account conversion balance plus sum of imported bank statement lines). Note: If indicative statement balance doesn't match imported statement balance for the same date, either the conversion (opening at inception) balance in Xero is wrong or there's an error in the bank statement lines in Xero. Ref: https://central.xero.com/s/article/Compare-the-statement-balance-in-Xero-to-your-actual-bank-balance?userregion=true\n", + "format" : "double", + "x-is-money" : true + }, + "indicativeEndBalance" : { + "type" : "number", + "description" : "Closing statement balance calculated in Xero (= bank account conversion balance plus sum of imported bank statement lines). Note: If indicative statement balance doesn't match imported statement balance for the same date, either the conversion (opening at inception) balance in Xero is wrong or there's an error in the bank statement lines in Xero. Ref: https://central.xero.com/s/article/Compare-the-statement-balance-in-Xero-to-your-actual-bank-balance?userregion=true \n", + "format" : "double", + "x-is-money" : true }, "statementLines" : { "type" : "array", diff --git a/docs/v1/payroll-au/index.html b/docs/v1/payroll-au/index.html index 366d8a17..802c895d 100644 --- a/docs/v1/payroll-au/index.html +++ b/docs/v1/payroll-au/index.html @@ -973,6 +973,13 @@ "type" : "string", "description" : "", "enum" : [ "WEEKLY", "FORTNIGHTLY", "FOURWEEKLY", "MONTHLY", "TWICEMONTHLY", "QUARTERLY" ] +}; + defs["CountryOfResidence"] = { + "title" : "", + "type" : "string", + "description" : "Country of residence as a valid ISO 3166-1 alpha-2 country code e.g. "AU", "NZ", "CA". Only applicable, and mandatory if income type is WORKINGHOLIDAYMAKER.", + "example" : "AU", + "enum" : [ "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "GS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW", "BQ", "CW", "SX", "SS" ] }; defs["DeductionLine"] = { "title" : "", @@ -1175,6 +1182,16 @@ "description" : "Boolean to determine if the earnings rate is reportable or exempt from W1", "example" : false }, + "AllowanceContributesToAnnualLeaveRate" : { + "type" : "boolean", + "description" : "Boolean to determine if the allowance earnings rate contributes towards annual leave rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT", + "example" : false + }, + "AllowanceContributesToOvertimeRate" : { + "type" : "boolean", + "description" : "Boolean to determine if the allowance earnings rate contributes towards overtime allowance rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT", + "example" : false + }, "EarningsType" : { "$ref" : "#/components/schemas/EarningsType" }, @@ -1245,7 +1262,7 @@ "title" : "", "type" : "string", "description" : "", - "enum" : [ "FIXED", "ORDINARYTIMEEARNINGS", "OVERTIMEEARNINGS", "ALLOWANCE", "LUMPSUMD", "EMPLOYMENTTERMINATIONPAYMENT", "LUMPSUMA", "LUMPSUMB", "BONUSESANDCOMMISSIONS", "LUMPSUME", "LUMPSUMW", "DIRECTORSFEES" ] + "enum" : [ "FIXED", "ORDINARYTIMEEARNINGS", "OVERTIMEEARNINGS", "ALLOWANCE", "LUMPSUMD", "EMPLOYMENTTERMINATIONPAYMENT", "LUMPSUMA", "LUMPSUMB", "BONUSESANDCOMMISSIONS", "LUMPSUME", "LUMPSUMW", "DIRECTORSFEES", "PAIDPARENTALLEAVE", "WORKERSCOMPENSATION" ] }; defs["Employee"] = { "title" : "", @@ -1294,7 +1311,7 @@ }, "Gender" : { "type" : "string", - "description" : "The employee’s gender. See Employee Gender", + "description" : "The employee’s gender. See Employee Gender", "example" : "F", "enum" : [ "N", "M", "F", "I" ] }, @@ -1382,6 +1399,20 @@ "TaxDeclaration" : { "$ref" : "#/components/schemas/TaxDeclaration" }, + "IncomeType" : { + "$ref" : "#/components/schemas/IncomeType" + }, + "EmploymentType" : { + "$ref" : "#/components/schemas/EmploymentType" + }, + "CountryOfResidence" : { + "$ref" : "#/components/schemas/CountryOfResidence" + }, + "IsSTP2Qualified" : { + "type" : "boolean", + "description" : "Indicates if the employee has been updated for STP Phase 2 compliance. Doesn't indicate that the employee is payable.", + "example" : true + }, "LeaveBalances" : { "type" : "array", "items" : { @@ -1444,13 +1475,19 @@ "title" : "", "type" : "string", "description" : "", - "enum" : [ "FULLTIME", "PARTTIME", "CASUAL", "LABOURHIRE", "SUPERINCOMESTREAM" ] + "enum" : [ "FULLTIME", "PARTTIME", "CASUAL", "LABOURHIRE", "SUPERINCOMESTREAM", "NONEMPLOYEE" ] }; defs["EmploymentTerminationPaymentType"] = { "title" : "", "type" : "string", "description" : "", "enum" : [ "O", "R" ] +}; + defs["EmploymentType"] = { + "title" : "", + "type" : "string", + "description" : "", + "enum" : [ "EMPLOYEE", "CONTRACTOR" ] }; defs["EntitlementFinalPayPayoutType"] = { "title" : "", @@ -1493,6 +1530,12 @@ } }, "description" : "" +}; + defs["IncomeType"] = { + "title" : "", + "type" : "string", + "description" : "", + "enum" : [ "SALARYANDWAGES", "WORKINGHOLIDAYMAKER", "NONEMPLOYEE", "CLOSELYHELDPAYEES", "LABOURHIRE" ] }; defs["LeaveAccrualLine"] = { "title" : "", @@ -1563,6 +1606,9 @@ "description" : "The Description of the Leave", "example" : "My leave" }, + "PayOutType" : { + "$ref" : "#/components/schemas/PayOutType" + }, "LeavePeriods" : { "type" : "array", "items" : { @@ -1628,6 +1674,13 @@ } }, "description" : "" +}; + defs["LeaveCategoryCode"] = { + "title" : "", + "type" : "string", + "description" : "Code used to identify the Leave Category", + "example" : "ANNUALLEAVE", + "enum" : [ "ANNUALLEAVE", "LONGSERVICELEAVE", "PERSONALSICKCARERSLEAVE", "ROSTEREDDAYOFF", "TIMEOFFINLIEU", "COMPASSIONATEANDBEREAVEMENTLEAVE", "STUDYLEAVE", "FAMILYANDDOMESTICVIOLENCELEAVE", "SPECIALPAIDLEAVE", "COMMUNITYSERVICELEAVE", "JURYDUTYLEAVE", "DEFENCERESERVELEAVE" ] }; defs["LeaveEarningsLine"] = { "title" : "", @@ -1652,6 +1705,9 @@ "format" : "double", "example" : 2.5, "x-is-money" : true + }, + "PayOutType" : { + "$ref" : "#/components/schemas/PayOutType" } }, "description" : "" @@ -1757,7 +1813,7 @@ "title" : "", "type" : "string", "description" : "", - "enum" : [ "SCHEDULED", "PROCESSED" ] + "enum" : [ "SCHEDULED", "PROCESSED", "REQUESTED", "REJECTED" ] }; defs["LeaveType"] = { "title" : "", @@ -1813,6 +1869,14 @@ "type" : "boolean", "description" : "Is the current record", "example" : true + }, + "LeaveCategoryCode" : { + "$ref" : "#/components/schemas/LeaveCategoryCode" + }, + "SGCExempt" : { + "type" : "boolean", + "description" : "Set this to indicate that the leave type is exempt from superannuation guarantee contribution", + "example" : true } }, "description" : "" @@ -1873,6 +1937,52 @@ "items" : { "$ref" : "#/components/schemas/LeaveLine" } + }, + "PaidLeaveEarningsLines" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaidLeaveEarningsLine" + } + } + }, + "description" : "" +}; + defs["PaidLeaveEarningsLine"] = { + "title" : "", + "required" : [ "Amount", "LeaveTypeID" ], + "type" : "object", + "properties" : { + "LeaveTypeID" : { + "type" : "string", + "description" : "Xero leave type identifier", + "format" : "uuid", + "example" : "742998cb-7584-4ecf-aa88-d694f59c50f9" + }, + "Amount" : { + "type" : "number", + "description" : "Paid leave amount", + "format" : "double", + "example" : 500.0, + "x-is-money" : true + }, + "SGCAppliedLeaveLoadingAmount" : { + "type" : "number", + "description" : "The amount of leave loading applied for the leave type that is subject to Superannuation Guarantee Contributions. *Only applicable for Leave Types with Annual Leave Categories", + "format" : "double", + "example" : 50.0, + "x-is-money" : true + }, + "SGCExemptedLeaveLoadingAmount" : { + "type" : "number", + "description" : "The amount of leave loading applied for the leave type that is exempt from Superannuation Guarantee Contributions. *Only applicable for Leave Types with Annual Leave Categories", + "format" : "double", + "example" : 60.0, + "x-is-money" : true + }, + "ResetSTPCategorisation" : { + "type" : "boolean", + "description" : "Reset the STP categorisations for the leave type. *Only applicable for Leave Types with Annual Leave Categories", + "example" : true } }, "description" : "" @@ -1918,6 +2028,12 @@ }, "description" : "", "x-isObjectArray" : true +}; + defs["PayOutType"] = { + "title" : "", + "type" : "string", + "description" : "How the requested leave will be paid out, e.g. cashed out.", + "enum" : [ "DEFAULT", "CASHED_OUT" ] }; defs["PayRun"] = { "title" : "", @@ -2538,6 +2654,12 @@ "type" : "string", "description" : "", "enum" : [ "AUSTRALIANRESIDENT", "FOREIGNRESIDENT", "WORKINGHOLIDAYMAKER" ] +}; + defs["SeniorMaritalStatus"] = { + "title" : "", + "type" : "string", + "description" : "", + "enum" : [ "MEMBEROFCOUPLE", "MEMBEROFILLNESSSEPARATEDCOUPLE", "SINGLE" ] }; defs["Settings"] = { "title" : "", @@ -2558,6 +2680,11 @@ "description" : "Number of days in the Payroll year", "format" : "int32", "example" : 365 + }, + "EmployeesAreSTP2" : { + "type" : "boolean", + "description" : "Indicates if the organisation has been enabled for STP Phase 2 editing of employees.", + "example" : true } }, "description" : "" @@ -2929,6 +3056,11 @@ "description" : "The tax file number e.g 123123123.", "example" : "123123123" }, + "ABN" : { + "type" : "string", + "description" : "11-digit Australian Business Number e.g 21006819692 or an empty string (\"\") to unset a previously set value. Only applicable, and mandatory if income type is NONEMPLOYEE.", + "example" : "21006819692" + }, "AustralianResidentForTaxPurposes" : { "type" : "boolean", "description" : "If the employee is Australian resident for tax purposes. e.g true or false", @@ -2937,6 +3069,15 @@ "ResidencyStatus" : { "$ref" : "#/components/schemas/ResidencyStatus" }, + "TaxScaleType" : { + "$ref" : "#/components/schemas/TaxScaleType" + }, + "WorkCondition" : { + "$ref" : "#/components/schemas/WorkCondition" + }, + "SeniorMaritalStatus" : { + "$ref" : "#/components/schemas/SeniorMaritalStatus" + }, "TaxFreeThresholdClaimed" : { "type" : "boolean", "description" : "If tax free threshold claimed. e.g true or false", @@ -2985,6 +3126,11 @@ "description" : "If the employee is eligible for student startup loan rules", "example" : true }, + "HasLoanOrStudentDebt" : { + "type" : "boolean", + "description" : "If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL)", + "example" : true + }, "UpdatedDateUTC" : { "type" : "string", "description" : "Last modified timestamp", @@ -3031,6 +3177,12 @@ } }, "description" : "" +}; + defs["TaxScaleType"] = { + "title" : "", + "type" : "string", + "description" : "", + "enum" : [ "REGULAR", "ACTORSARTISTSENTERTAINERS", "HORTICULTURISTORSHEARER", "SENIORORPENSIONER", "WORKINGHOLIDAYMAKER", "FOREIGN" ] }; defs["Timesheet"] = { "title" : "", @@ -3171,6 +3323,12 @@ "url" : "https://developer.xero.com/documentation/api/http-response-codes" } }; + defs["WorkCondition"] = { + "title" : "", + "type" : "string", + "description" : "", + "enum" : [ "PROMOTIONAL", "THREELESSPERFORMANCESPERWEEK", "NONE" ] +}; var errs = {}; @@ -3256,6 +3414,9 @@ +
  • + approveLeaveApplication +
  • createEmployee
  • @@ -3289,6 +3450,9 @@
  • getLeaveApplications
  • +
  • + getLeaveApplicationsV2 +
  • getPayItems
  • @@ -3325,6 +3489,9 @@
  • getTimesheets
  • +
  • + rejectLeaveApplication +
  • updateEmployee
  • @@ -3361,6 +3528,151 @@

    SDK Documentation

    PayrollAu

    +
    +
    +
    +

    approveLeaveApplication

    +

    Approve a requested leave application by a unique leave application id

    +
    +
    +
    +

    +

    +

    +
    +
    /LeaveApplications/{LeaveApplicationID}/approve
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_approve_leave_application():
    +    api_instance = PayrollAuApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    leave_application_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
    +    idempotency_key = 'KEY_VALUE'
    +    
    +    try:
    +        api_response = api_instance.approve_leave_application(xero_tenant_id, leave_application_id, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling PayrollAuApi->approveLeaveApplication: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    payroll.employeesGrant read-write access to payroll employees
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    LeaveApplicationID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Leave Application id for single object +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    +
    +
    @@ -3400,6 +3712,7 @@

    Usage and SDK Samples

    def accounting_create_employee(): api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' date_of_birth = dateutil.parser.parse('2000-10-28T00:00:00Z') home_address = HomeAddress( @@ -3415,7 +3728,7 @@

    Usage and SDK Samples

    homeAddress = home_address) try: - api_response = api_instance.create_employee(xero_tenant_id, employee) + api_response = api_instance.create_employee(xero_tenant_id, employee, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->createEmployee: %s\n" % e) @@ -3458,6 +3771,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -3542,6 +3875,7 @@

    Usage and SDK Samples

    def accounting_create_leave_application(): api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -3553,7 +3887,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.create_leave_application(xero_tenant_id, leaveApplication) + api_response = api_instance.create_leave_application(xero_tenant_id, leaveApplication, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->createLeaveApplication: %s\n" % e) @@ -3598,21 +3932,41 @@

    Parameters

    - -
    Body parameters
    - - - - - - - - + + + +
    NameDescription
    leaveApplication * -
    -
    - - array[LeaveApplication] - +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + + + + + +
    NameDescription
    leaveApplication * +
    +
    + + array[LeaveApplication] +
    @@ -3680,6 +4034,7 @@

    Usage and SDK Samples

    def accounting_create_pay_item(): api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' earnings_rate = EarningsRate( name = "Ordinary Hours 123", @@ -3723,7 +4078,7 @@

    Usage and SDK Samples

    reimbursementTypes = reimbursement_types) try: - api_response = api_instance.create_pay_item(xero_tenant_id, payItem) + api_response = api_instance.create_pay_item(xero_tenant_id, payItem, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->createPayItem: %s\n" % e) @@ -3766,6 +4121,26 @@

    Parameters

    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    @@ -3798,7 +4173,7 @@

    Parameters

    "schema" : { "$ref" : "#/components/schemas/PayItem" }, - "example" : "{ \"EarningsRates\": [ { \"Name\": \"MyRate\", \"AccountCode\": \"400\", \"TypeOfUnits\": \"4.00\", \"IsExemptFromTax\": true, \"IsExemptFromSuper\": true, \"IsReportableAsW1\": false, \"EarningsType\": \"ORDINARYTIMEEARNINGS\", \"EarningsRateID\": \"1fa4e226-b711-46ba-a8a7-4344c9c5fb87\", \"RateType\": \"MULTIPLE\", \"RatePerUnit\": \"10.0\", \"Multiplier\": 1.5, \"Amount\": 5, \"EmploymentTerminationPaymentType\": \"O\" } ] }" + "example" : "{ \"EarningsRates\": [ { \"Name\": \"MyRate\", \"AccountCode\": \"400\", \"TypeOfUnits\": \"4.00\", \"IsExemptFromTax\": true, \"IsExemptFromSuper\": true, \"IsReportableAsW1\": false, \"AllowanceContributesToAnnualLeaveRate\": false, \"AllowanceContributesToOvertimeRate\": false, \"EarningsType\": \"ORDINARYTIMEEARNINGS\", \"EarningsRateID\": \"1fa4e226-b711-46ba-a8a7-4344c9c5fb87\", \"RateType\": \"MULTIPLE\", \"RatePerUnit\": \"10.0\", \"Multiplier\": 1.5, \"Amount\": 5, \"EmploymentTerminationPaymentType\": \"O\" } ] }" } }, "required" : true @@ -3847,12 +4222,13 @@

    Usage and SDK Samples

    def accounting_create_pay_run(): api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' pay_run = PayRun( payroll_calendar_id = "00000000-0000-0000-0000-000000000000") try: - api_response = api_instance.create_pay_run(xero_tenant_id, payRun) + api_response = api_instance.create_pay_run(xero_tenant_id, payRun, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->createPayRun: %s\n" % e) @@ -3895,6 +4271,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -3979,6 +4375,7 @@

    Usage and SDK Samples

    def accounting_create_payroll_calendar(): api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') payment_date = dateutil.parser.parse('2000-10-30T00:00:00Z') @@ -3992,7 +4389,7 @@

    Usage and SDK Samples

    payroll_calendars.append(payroll_calendar) try: - api_response = api_instance.create_payroll_calendar(xero_tenant_id, payrollCalendar) + api_response = api_instance.create_payroll_calendar(xero_tenant_id, payrollCalendar, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->createPayrollCalendar: %s\n" % e) @@ -4035,6 +4432,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4119,13 +4536,14 @@

    Usage and SDK Samples

    def accounting_create_superfund(): api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' super_fund = SuperFund( type = "REGULATED", USI = "40022701955002") try: - api_response = api_instance.create_superfund(xero_tenant_id, superFund) + api_response = api_instance.create_superfund(xero_tenant_id, superFund, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->createSuperfund: %s\n" % e) @@ -4168,6 +4586,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4252,6 +4690,7 @@

    Usage and SDK Samples

    def accounting_create_timesheet(): api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-23T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -4262,7 +4701,7 @@

    Usage and SDK Samples

    status = "DRAFT") try: - api_response = api_instance.create_timesheet(xero_tenant_id, timesheet) + api_response = api_instance.create_timesheet(xero_tenant_id, timesheet, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->createTimesheet: %s\n" % e) @@ -4305,6 +4744,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4773,20 +5232,208 @@

    Parameters

    -
    +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +

    getLeaveApplications

    +

    Retrieves leave applications

    +
    +
    +
    +

    +

    +

    +
    +
    /LeaveApplications
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_get_leave_applications():
    +    api_instance = PayrollAuApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    if_modified_since = dateutil.parser.parse("2020-02-06T12:17:43.202-08:00")
    +    where = 'Status=="ACTIVE"'
    +    order = 'EmailAddress%20DESC'
    +    
    +    try:
    +        api_response = api_instance.get_leave_applications(xero_tenant_id, if_modified_since, where, order, page)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling PayrollAuApi->getLeaveApplications: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + + + + + + +
    payroll.employeesGrant read-write access to payroll employees
    payroll.employees.readGrant read-only access to payroll employees
    +

    Parameters

    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    If-Modified-Since + + +
    +
    +
    + + Date + + + (date-time) + + +
    +Only records created or modified since this timestamp will be returned +
    +
    +
    +
    +
    +
    Query parameters
    + + + + + + + + + + + + + + + @@ -4796,11 +5443,11 @@

    Parameters


    -
    -
    +
    +
    -

    getLeaveApplications

    -

    Retrieves leave applications

    +

    getLeaveApplicationsV2

    +

    Retrieves leave applications including leave requests

    @@ -4808,17 +5455,17 @@

    getLeaveApplications


    -
    /LeaveApplications
    +
    /LeaveApplications/v2

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -4832,7 +5479,7 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_get_leave_applications(): +def accounting_get_leave_applications_v2(): api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' if_modified_since = dateutil.parser.parse("2020-02-06T12:17:43.202-08:00") @@ -4840,10 +5487,10 @@

    Usage and SDK Samples

    order = 'EmailAddress%20DESC' try: - api_response = api_instance.get_leave_applications(xero_tenant_id, if_modified_since, where, order, page) + api_response = api_instance.get_leave_applications_v2(xero_tenant_id, if_modified_since, where, order, page) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling PayrollAuApi->getLeaveApplications: %s\n" % e)
    + print("Exception when calling PayrollAuApi->getLeaveApplicationsV2: %s\n" % e)

    Scopes

    @@ -4871,7 +5518,7 @@

    Parameters

    + + +
    NameDescription
    where + + +
    +
    +
    + + String + + +
    +Filter by an any element +
    +
    +
    +
    +
    order + + +
    +
    +
    + + String + + +
    +Order by an any element +
    +
    +
    +
    +
    page + + +
    - String + Integer
    -Xero identifier for Tenant +e.g. page=1 – Up to 100 objects will be returned in a single API call
    -
    - Required -
    -
    +
    @@ -4894,7 +5541,7 @@

    Parameters

    -
    +
    @@ -4924,7 +5571,7 @@

    Parameters

    -
    +
    @@ -4944,7 +5591,7 @@

    Parameters

    -
    +
    @@ -4964,7 +5611,7 @@

    Parameters

    -
    +
    @@ -6802,6 +7449,151 @@

    Parameters

    +
    +
    +
    +
    +
    +
    +

    rejectLeaveApplication

    +

    Reject a leave application by a unique leave application id

    +
    +
    +
    +

    +

    +

    +
    +
    /LeaveApplications/{LeaveApplicationID}/reject
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_reject_leave_application():
    +    api_instance = PayrollAuApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    leave_application_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
    +    idempotency_key = 'KEY_VALUE'
    +    
    +    try:
    +        api_response = api_instance.reject_leave_application(xero_tenant_id, leave_application_id, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling PayrollAuApi->rejectLeaveApplication: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    payroll.employeesGrant read-write access to payroll employees
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    LeaveApplicationID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Leave Application id for single object +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    @@ -6848,6 +7640,7 @@

    Usage and SDK Samples

    api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' date_of_birth = dateutil.parser.parse('2000-10-28T00:00:00Z') home_address = HomeAddress( @@ -6863,7 +7656,7 @@

    Usage and SDK Samples

    homeAddress = home_address) try: - api_response = api_instance.update_employee(xero_tenant_id, employee_id, employee) + api_response = api_instance.update_employee(xero_tenant_id, employee_id, idempotency_key, employee) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->updateEmployee: %s\n" % e) @@ -6939,6 +7732,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7020,6 +7833,7 @@

    Usage and SDK Samples

    api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' leave_application_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -7031,7 +7845,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.update_leave_application(xero_tenant_id, leave_application_id, leaveApplication) + api_response = api_instance.update_leave_application(xero_tenant_id, leave_application_id, leaveApplication, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->updateLeaveApplication: %s\n" % e) @@ -7107,6 +7921,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7142,7 +7976,7 @@

    Parameters

    "$ref" : "#/components/schemas/LeaveApplication" } }, - "example" : "[ { \"EmployeeID\": \"cdfb8371-0b21-4b8a-8903-1024df6c391e\", \"LeaveTypeID\": \"184ea8f7-d143-46dd-bef3-0c60e1aa6fca\", \"StartDate\": \"/Date(1572559200000+0000)/\", \"EndDate\": \"/Date(1572645600000+0000)/\", \"Description\": \"My updated Description\" } ]" + "example" : "[ { \"EmployeeID\": \"cdfb8371-0b21-4b8a-8903-1024df6c391e\", \"LeaveApplicationID\": \"1d4cd583-0107-4386-936b-672eb3d1f624\", \"LeaveTypeID\": \"184ea8f7-d143-46dd-bef3-0c60e1aa6fca\", \"LeavePeriods\": [ { \"PayPeriodStartDate\": \"/Date(1572566400000+0000)/\", \"PayPeriodEndDate\": \"/Date(1573084800000+0000)/\", \"LeavePeriodStatus\": \"SCHEDULED\", \"NumberOfUnits\": 7.6 } ], \"Title\": \"vacation\", \"Description\": \"My updated Description\", \"StartDate\": \"/Date(1572559200000+0000)/\", \"EndDate\": \"/Date(1572645600000+0000)/\", \"PayOutType\": \"DEFAULT\" } ]" } }, "required" : true @@ -7192,12 +8026,13 @@

    Usage and SDK Samples

    api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' pay_run_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' pay_run = PayRun( payroll_calendar_id = "00000000-0000-0000-0000-000000000000") try: - api_response = api_instance.update_pay_run(xero_tenant_id, pay_run_id, payRun) + api_response = api_instance.update_pay_run(xero_tenant_id, pay_run_id, idempotency_key, payRun) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->updatePayRun: %s\n" % e) @@ -7273,6 +8108,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7354,6 +8209,7 @@

    Usage and SDK Samples

    api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' payslip_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' earnings_line = EarningsLine( earnings_rate_id = "00000000-0000-0000-0000-000000000000", @@ -7370,7 +8226,7 @@

    Usage and SDK Samples

    payslip_lines.append(payslip_line) try: - api_response = api_instance.update_payslip(xero_tenant_id, payslip_id, payslipLines) + api_response = api_instance.update_payslip(xero_tenant_id, payslip_id, idempotency_key, payslipLines) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->updatePayslip: %s\n" % e) @@ -7446,6 +8302,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7527,13 +8403,14 @@

    Usage and SDK Samples

    api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' super_fund_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' super_fund = SuperFund( type = "REGULATED", USI = "40022701955002") try: - api_response = api_instance.update_superfund(xero_tenant_id, super_fund_id, superFund) + api_response = api_instance.update_superfund(xero_tenant_id, super_fund_id, idempotency_key, superFund) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->updateSuperfund: %s\n" % e) @@ -7609,6 +8486,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -7690,6 +8587,7 @@

    Usage and SDK Samples

    api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xeroTenantId_example' timesheet_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-23T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -7700,7 +8598,7 @@

    Usage and SDK Samples

    status = "DRAFT") try: - api_response = api_instance.update_timesheet(xero_tenant_id, timesheet_id, timesheet) + api_response = api_instance.update_timesheet(xero_tenant_id, timesheet_id, idempotency_key, timesheet) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollAuApi->updateTimesheet: %s\n" % e) @@ -7776,6 +8674,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + diff --git a/docs/v1/payroll-nz/index.html b/docs/v1/payroll-nz/index.html index 79012ae9..f120e4e8 100644 --- a/docs/v1/payroll-nz/index.html +++ b/docs/v1/payroll-nz/index.html @@ -1502,6 +1502,11 @@ "description" : "UTC timestamp when the employee was created in Xero", "format" : "date-time", "x-is-datetime" : true + }, + "jobTitle" : { + "type" : "string", + "description" : "Employee's job title", + "example" : "General Manager" } }, "description" : "" @@ -4102,9 +4107,10 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.approve_timesheet(xero_tenant_id, timesheet_id) + api_response = api_instance.approve_timesheet(xero_tenant_id, timesheet_id, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->approveTimesheet: %s\n" % e) @@ -4180,6 +4186,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4225,6 +4251,7 @@

    Usage and SDK Samples

    def accounting_create_deduction(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' deduction = Deduction( deduction_name = "Deduction test", @@ -4232,7 +4259,7 @@

    Usage and SDK Samples

    liability_account_id = "00000000-0000-0000-0000-000000000000") try: - api_response = api_instance.create_deduction(xero_tenant_id, deduction) + api_response = api_instance.create_deduction(xero_tenant_id, deduction, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createDeduction: %s\n" % e) @@ -4275,6 +4302,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4356,6 +4403,7 @@

    Usage and SDK Samples

    def accounting_create_earnings_rate(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' earnings_rate = EarningsRate( earnings_type = "RegularEarnings", @@ -4363,7 +4411,7 @@

    Usage and SDK Samples

    expense_account_ID = "00000000-0000-0000-0000-000000000000") try: - api_response = api_instance.create_earnings_rate(xero_tenant_id, earningsRate) + api_response = api_instance.create_earnings_rate(xero_tenant_id, earningsRate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEarningsRate: %s\n" % e) @@ -4406,6 +4454,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4487,6 +4555,7 @@

    Usage and SDK Samples

    def accounting_create_employee(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' date_of_birth = dateutil.parser.parse('2000-10-28T00:00:00Z') address = Address( @@ -4502,7 +4571,7 @@

    Usage and SDK Samples

    address = address) try: - api_response = api_instance.create_employee(xero_tenant_id, employee) + api_response = api_instance.create_employee(xero_tenant_id, employee, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployee: %s\n" % e) @@ -4545,6 +4614,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4627,6 +4716,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' earnings_template = EarningsTemplate( pay_template_earning_id = "00000000-0000-0000-0000-000000000000", @@ -4640,7 +4730,7 @@

    Usage and SDK Samples

    earnings_templates.append(earnings_template) try: - api_response = api_instance.create_employee_earnings_template(xero_tenant_id, employee_id, earningsTemplate) + api_response = api_instance.create_employee_earnings_template(xero_tenant_id, employee_id, earningsTemplate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: %s\n" % e) @@ -4716,6 +4806,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4798,6 +4908,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -4807,7 +4918,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.create_employee_leave(xero_tenant_id, employee_id, employeeLeave) + api_response = api_instance.create_employee_leave(xero_tenant_id, employee_id, employeeLeave, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployeeLeave: %s\n" % e) @@ -4883,6 +4994,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4965,6 +5096,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' employee_leave_setup = EmployeeLeaveSetup( include_holiday_pay = false, @@ -4975,7 +5107,7 @@

    Usage and SDK Samples

    sick_leave_opening_balance = 10.5) try: - api_response = api_instance.create_employee_leave_setup(xero_tenant_id, employee_id, employeeLeaveSetup) + api_response = api_instance.create_employee_leave_setup(xero_tenant_id, employee_id, employeeLeaveSetup, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployeeLeaveSetup: %s\n" % e) @@ -5051,6 +5183,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5133,6 +5285,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' employee_leave_type = EmployeeLeaveType( leave_type_id = "00000000-0000-0000-0000-000000000000", @@ -5140,7 +5293,7 @@

    Usage and SDK Samples

    opening_balance = 5.25) try: - api_response = api_instance.create_employee_leave_type(xero_tenant_id, employee_id, employeeLeaveType) + api_response = api_instance.create_employee_leave_type(xero_tenant_id, employee_id, employeeLeaveType, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployeeLeaveType: %s\n" % e) @@ -5216,6 +5369,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5298,6 +5471,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' period_end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') employee_opening_balance = EmployeeOpeningBalance( @@ -5310,7 +5484,7 @@

    Usage and SDK Samples

    employee_opening_balances.append(employee_opening_balance) try: - api_response = api_instance.create_employee_opening_balances(xero_tenant_id, employee_id, employeeOpeningBalance) + api_response = api_instance.create_employee_opening_balances(xero_tenant_id, employee_id, employeeOpeningBalance, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployeeOpeningBalances: %s\n" % e) @@ -5386,6 +5560,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5468,6 +5662,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' bank_account = BankAccount( account_name = "Charlotte Danes", @@ -5481,7 +5676,7 @@

    Usage and SDK Samples

    bankAccounts = bankAccounts) try: - api_response = api_instance.create_employee_payment_method(xero_tenant_id, employee_id, paymentMethod) + api_response = api_instance.create_employee_payment_method(xero_tenant_id, employee_id, paymentMethod, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployeePaymentMethod: %s\n" % e) @@ -5557,6 +5752,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5638,6 +5853,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' salary_and_wage = SalaryAndWage( earnings_rate_id = "00000000-0000-0000-0000-000000000000", @@ -5646,7 +5862,7 @@

    Usage and SDK Samples

    payment_type = payment_type_enum.Hourly) try: - api_response = api_instance.create_employee_salary_and_wage(xero_tenant_id, employee_id, salaryAndWage) + api_response = api_instance.create_employee_salary_and_wage(xero_tenant_id, employee_id, salaryAndWage, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: %s\n" % e) @@ -5722,6 +5938,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5804,6 +6040,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') employment = Employment( @@ -5811,7 +6048,7 @@

    Usage and SDK Samples

    start_date = start_date) try: - api_response = api_instance.create_employment(xero_tenant_id, employee_id, employment) + api_response = api_instance.create_employment(xero_tenant_id, employee_id, employment, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createEmployment: %s\n" % e) @@ -5887,6 +6124,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5968,6 +6225,7 @@

    Usage and SDK Samples

    def accounting_create_leave_type(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' leave_type = LeaveType( name = "LeaveType", @@ -5975,7 +6233,7 @@

    Usage and SDK Samples

    show_on_payslip = true) try: - api_response = api_instance.create_leave_type(xero_tenant_id, leaveType) + api_response = api_instance.create_leave_type(xero_tenant_id, leaveType, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createLeaveType: %s\n" % e) @@ -6018,6 +6276,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6100,6 +6378,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' earnings_template = EarningsTemplate( pay_template_earning_id = "00000000-0000-0000-0000-000000000000", @@ -6113,7 +6392,7 @@

    Usage and SDK Samples

    earnings_templates.append(earnings_template) try: - api_response = api_instance.create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earningsTemplate) + api_response = api_instance.create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earningsTemplate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: %s\n" % e) @@ -6189,6 +6468,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6270,13 +6569,14 @@

    Usage and SDK Samples

    def accounting_create_pay_run(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' pay_run = PayRun( pay_run_type = pay_run_type_enum.Scheduled, payroll_calendar_id = "00000000-0000-0000-0000-000000000000") try: - api_response = api_instance.create_pay_run(xero_tenant_id, payRun) + api_response = api_instance.create_pay_run(xero_tenant_id, payRun, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createPayRun: %s\n" % e) @@ -6319,6 +6619,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6400,6 +6720,7 @@

    Usage and SDK Samples

    def accounting_create_pay_run_calendar(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') payment_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -6409,7 +6730,7 @@

    Usage and SDK Samples

    payment_date = payment_date) try: - api_response = api_instance.create_pay_run_calendar(xero_tenant_id, payRunCalendar) + api_response = api_instance.create_pay_run_calendar(xero_tenant_id, payRunCalendar, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createPayRunCalendar: %s\n" % e) @@ -6452,6 +6773,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6533,6 +6874,7 @@

    Usage and SDK Samples

    def accounting_create_reimbursement(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' reimbursement = Reimbursement( name = "Test Reimbursement", @@ -6541,7 +6883,7 @@

    Usage and SDK Samples

    reimbursement_category = reimbursement_category_enum.GST) try: - api_response = api_instance.create_reimbursement(xero_tenant_id, reimbursement) + api_response = api_instance.create_reimbursement(xero_tenant_id, reimbursement, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createReimbursement: %s\n" % e) @@ -6584,6 +6926,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6665,6 +7027,7 @@

    Usage and SDK Samples

    def accounting_create_superannuation(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' benefit = Benefit( category = "ComplyingFund", @@ -6675,7 +7038,7 @@

    Usage and SDK Samples

    standard_amount = 100) try: - api_response = api_instance.create_superannuation(xero_tenant_id, benefit) + api_response = api_instance.create_superannuation(xero_tenant_id, benefit, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createSuperannuation: %s\n" % e) @@ -6718,6 +7081,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6799,6 +7182,7 @@

    Usage and SDK Samples

    def accounting_create_timesheet(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -6809,7 +7193,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.create_timesheet(xero_tenant_id, timesheet) + api_response = api_instance.create_timesheet(xero_tenant_id, timesheet, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createTimesheet: %s\n" % e) @@ -6852,6 +7236,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6934,6 +7338,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' date = dateutil.parser.parse('2020-10-28T00:00:00Z') timesheet_line = TimesheetLine( @@ -6944,7 +7349,7 @@

    Usage and SDK Samples

    number_of_units = 6) try: - api_response = api_instance.create_timesheet_line(xero_tenant_id, timesheet_id, timesheetLine) + api_response = api_instance.create_timesheet_line(xero_tenant_id, timesheet_id, timesheetLine, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->createTimesheetLine: %s\n" % e) @@ -7020,6 +7425,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -12375,9 +12800,10 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.revert_timesheet(xero_tenant_id, timesheet_id) + api_response = api_instance.revert_timesheet(xero_tenant_id, timesheet_id, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->revertTimesheet: %s\n" % e) @@ -12453,6 +12879,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -12499,6 +12945,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' date_of_birth = dateutil.parser.parse('2000-10-28T00:00:00Z') address = Address( @@ -12514,7 +12961,7 @@

    Usage and SDK Samples

    address = address) try: - api_response = api_instance.update_employee(xero_tenant_id, employee_id, employee) + api_response = api_instance.update_employee(xero_tenant_id, employee_id, employee, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->updateEmployee: %s\n" % e) @@ -12590,6 +13037,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -12673,6 +13140,7 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' pay_template_earning_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' + idempotency_key = 'KEY_VALUE' earnings_template = EarningsTemplate( pay_template_earning_id = "00000000-0000-0000-0000-000000000000", @@ -12686,7 +13154,7 @@

    Usage and SDK Samples

    earnings_templates.append(earnings_template) try: - api_response = api_instance.update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earningsTemplate) + api_response = api_instance.update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earningsTemplate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->updateEmployeeEarningsTemplate: %s\n" % e) @@ -12788,6 +13256,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -12871,6 +13359,7 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' leave_id = 'c4be24e5-e840-4c92-9eaa-2d86cd596314' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -12880,7 +13369,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.update_employee_leave(xero_tenant_id, employee_id, leave_id, employeeLeave) + api_response = api_instance.update_employee_leave(xero_tenant_id, employee_id, leave_id, employeeLeave, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->updateEmployeeLeave: %s\n" % e) @@ -12982,6 +13471,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13065,6 +13574,7 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' salary_and_wages_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' + idempotency_key = 'KEY_VALUE' salary_and_wage = SalaryAndWage( earnings_rate_id = "00000000-0000-0000-0000-000000000000", @@ -13073,7 +13583,7 @@

    Usage and SDK Samples

    payment_type = payment_type_enum.Hourly) try: - api_response = api_instance.update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salaryAndWage) + api_response = api_instance.update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salaryAndWage, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->updateEmployeeSalaryAndWage: %s\n" % e) @@ -13175,6 +13685,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13257,6 +13787,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' student_loan_as_at = dateutil.parser.parse('2020-10-30T00:00:00Z') employee_tax = EmployeeTax( @@ -13274,7 +13805,7 @@

    Usage and SDK Samples

    student_loan_as_at = student_loan_as_at) try: - api_response = api_instance.update_employee_tax(xero_tenant_id, employee_id, employeeTax) + api_response = api_instance.update_employee_tax(xero_tenant_id, employee_id, employeeTax, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->updateEmployeeTax: %s\n" % e) @@ -13350,6 +13881,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13431,6 +13982,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' pay_run_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') payment_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -13440,7 +13992,7 @@

    Usage and SDK Samples

    payment_date = payment_date) try: - api_response = api_instance.update_pay_run(xero_tenant_id, pay_run_id, payRun) + api_response = api_instance.update_pay_run(xero_tenant_id, pay_run_id, payRun, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->updatePayRun: %s\n" % e) @@ -13516,6 +14068,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13598,6 +14170,7 @@

    Usage and SDK Samples

    api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' pay_slip_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' earnings_line = EarningsLine( earnings_line_id = "00000000-0000-0000-0000-000000000000", @@ -13614,7 +14187,7 @@

    Usage and SDK Samples

    earningsLines = earnings_lines) try: - api_response = api_instance.update_pay_slip_line_items(xero_tenant_id, pay_slip_id, paySlip) + api_response = api_instance.update_pay_slip_line_items(xero_tenant_id, pay_slip_id, paySlip, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->updatePaySlipLineItems: %s\n" % e) @@ -13690,6 +14263,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13773,6 +14366,7 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' timesheet_line_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' date = dateutil.parser.parse('2020-10-28T00:00:00Z') timesheet_line = TimesheetLine( @@ -13783,7 +14377,7 @@

    Usage and SDK Samples

    number_of_units = 6) try: - api_response = api_instance.update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheetLine) + api_response = api_instance.update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheetLine, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollNzApi->updateTimesheetLine: %s\n" % e) @@ -13885,6 +14479,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + diff --git a/docs/v1/payroll-uk/index.html b/docs/v1/payroll-uk/index.html index 1a29855d..73380eef 100644 --- a/docs/v1/payroll-uk/index.html +++ b/docs/v1/payroll-uk/index.html @@ -1381,7 +1381,7 @@ "earningsType" : { "type" : "string", "description" : "Indicates how an employee will be paid when taking this type of earning", - "enum" : [ "Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay" ] + "enum" : [ "Allowance", "BackPay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay" ] }, "rateType" : { "type" : "string", @@ -2278,7 +2278,7 @@ "type" : "string", "description" : "The NI Category of the employee", "example" : "A", - "enum" : [ "A", "B", "C", "H", "J", "M", "Z", "X" ] + "enum" : [ "A", "B", "C", "F", "H", "I", "J", "L", "M", "S", "V", "X", "Z" ] } }, "description" : "" @@ -3780,9 +3780,10 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.approve_timesheet(xero_tenant_id, timesheet_id) + api_response = api_instance.approve_timesheet(xero_tenant_id, timesheet_id, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->approveTimesheet: %s\n" % e) @@ -3858,6 +3859,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -3903,6 +3924,7 @@

    Usage and SDK Samples

    def accounting_create_benefit(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' benefit = Benefit( name = "Benefit Name", @@ -3911,7 +3933,7 @@

    Usage and SDK Samples

    is_calculating_on_qualifying_earnings = true) try: - api_response = api_instance.create_benefit(xero_tenant_id, benefit) + api_response = api_instance.create_benefit(xero_tenant_id, benefit, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createBenefit: %s\n" % e) @@ -3954,6 +3976,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4035,6 +4077,7 @@

    Usage and SDK Samples

    def accounting_create_deduction(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' deduction = Deduction( deduction_name = "Test Deduction", @@ -4043,7 +4086,7 @@

    Usage and SDK Samples

    calculation_type = calculation_type_enum::PERCENTAGEOFGROSS) try: - api_response = api_instance.create_deduction(xero_tenant_id, deduction) + api_response = api_instance.create_deduction(xero_tenant_id, deduction, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createDeduction: %s\n" % e) @@ -4086,6 +4129,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4167,6 +4230,7 @@

    Usage and SDK Samples

    def accounting_create_earnings_rate(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' earnings_rate = EarningsRate( earnings_type = earnings_type_enum::REGULAREARNINGS, @@ -4175,7 +4239,7 @@

    Usage and SDK Samples

    type_of_units = "Type") try: - api_response = api_instance.create_earnings_rate(xero_tenant_id, earningsRate) + api_response = api_instance.create_earnings_rate(xero_tenant_id, earningsRate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEarningsRate: %s\n" % e) @@ -4218,6 +4282,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4299,6 +4383,7 @@

    Usage and SDK Samples

    def accounting_create_employee(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' date_of_birth = dateutil.parser.parse('2000-10-28T00:00:00Z') address = Address( @@ -4314,7 +4399,7 @@

    Usage and SDK Samples

    address = address) try: - api_response = api_instance.create_employee(xero_tenant_id, employee) + api_response = api_instance.create_employee(xero_tenant_id, employee, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployee: %s\n" % e) @@ -4357,6 +4442,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4439,6 +4544,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' earnings_template = EarningsTemplate( pay_template_earning_id = "00000000-0000-0000-0000-000000000000", @@ -4452,7 +4558,7 @@

    Usage and SDK Samples

    earnings_templates.append(earnings_template) try: - api_response = api_instance.create_employee_earnings_template(xero_tenant_id, employee_id, earningsTemplate) + api_response = api_instance.create_employee_earnings_template(xero_tenant_id, employee_id, earningsTemplate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployeeEarningsTemplate: %s\n" % e) @@ -4528,6 +4634,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4609,6 +4735,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -4618,7 +4745,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.create_employee_leave(xero_tenant_id, employee_id, employeeLeave) + api_response = api_instance.create_employee_leave(xero_tenant_id, employee_id, employeeLeave, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployeeLeave: %s\n" % e) @@ -4694,6 +4821,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4776,6 +4923,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' employee_leave_type = EmployeeLeaveType( leave_type_id = "00000000-0000-0000-0000-000000000000", @@ -4783,7 +4931,7 @@

    Usage and SDK Samples

    opening_balance = 5.25) try: - api_response = api_instance.create_employee_leave_type(xero_tenant_id, employee_id, employeeLeaveType) + api_response = api_instance.create_employee_leave_type(xero_tenant_id, employee_id, employeeLeaveType, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployeeLeaveType: %s\n" % e) @@ -4859,6 +5007,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -4941,6 +5109,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' employee_opening_balances = EmployeeOpeningBalances( statutory_maternity_pay = 0.0, @@ -4950,7 +5119,7 @@

    Usage and SDK Samples

    statutory_sick_pay = 0.0) try: - api_response = api_instance.create_employee_opening_balances(xero_tenant_id, employee_id, employeeOpeningBalances) + api_response = api_instance.create_employee_opening_balances(xero_tenant_id, employee_id, employeeOpeningBalances, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployeeOpeningBalances: %s\n" % e) @@ -5026,6 +5195,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5108,6 +5297,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' bank_account = BankAccount( account_name = "Charlotte Danes", @@ -5121,7 +5311,7 @@

    Usage and SDK Samples

    bankAccounts = bankAccounts) try: - api_response = api_instance.create_employee_payment_method(xero_tenant_id, employee_id, paymentMethod) + api_response = api_instance.create_employee_payment_method(xero_tenant_id, employee_id, paymentMethod, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployeePaymentMethod: %s\n" % e) @@ -5197,6 +5387,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5279,6 +5489,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' salary_and_wage = SalaryAndWage( earnings_rate_id = "00000000-0000-0000-0000-000000000000", @@ -5288,7 +5499,7 @@

    Usage and SDK Samples

    status = status_enum.Active) try: - api_response = api_instance.create_employee_salary_and_wage(xero_tenant_id, employee_id, salaryAndWage) + api_response = api_instance.create_employee_salary_and_wage(xero_tenant_id, employee_id, salaryAndWage, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployeeSalaryAndWage: %s\n" % e) @@ -5364,6 +5575,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5445,6 +5676,7 @@

    Usage and SDK Samples

    def accounting_create_employee_statutory_sick_leave(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -5455,7 +5687,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.create_employee_statutory_sick_leave(xero_tenant_id, employeeStatutorySickLeave) + api_response = api_instance.create_employee_statutory_sick_leave(xero_tenant_id, employeeStatutorySickLeave, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployeeStatutorySickLeave: %s\n" % e) @@ -5498,6 +5730,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5580,6 +5832,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') employment = Employment( @@ -5587,7 +5840,7 @@

    Usage and SDK Samples

    start_date = start_date) try: - api_response = api_instance.create_employment(xero_tenant_id, employee_id, employment) + api_response = api_instance.create_employment(xero_tenant_id, employee_id, employment, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createEmployment: %s\n" % e) @@ -5663,6 +5916,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5744,6 +6017,7 @@

    Usage and SDK Samples

    def accounting_create_leave_type(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' leave_type = LeaveType( name = "LeaveType", @@ -5751,7 +6025,7 @@

    Usage and SDK Samples

    show_on_payslip = true) try: - api_response = api_instance.create_leave_type(xero_tenant_id, leaveType) + api_response = api_instance.create_leave_type(xero_tenant_id, leaveType, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createLeaveType: %s\n" % e) @@ -5794,6 +6068,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -5876,6 +6170,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' earnings_template = EarningsTemplate( pay_template_earning_id = "00000000-0000-0000-0000-000000000000", @@ -5889,7 +6184,7 @@

    Usage and SDK Samples

    earnings_templates.append(earnings_template) try: - api_response = api_instance.create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earningsTemplate) + api_response = api_instance.create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earningsTemplate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createMultipleEmployeeEarningsTemplate: %s\n" % e) @@ -5965,6 +6260,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6046,6 +6361,7 @@

    Usage and SDK Samples

    def accounting_create_pay_run_calendar(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') payment_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -6055,7 +6371,7 @@

    Usage and SDK Samples

    payment_date = payment_date) try: - api_response = api_instance.create_pay_run_calendar(xero_tenant_id, payRunCalendar) + api_response = api_instance.create_pay_run_calendar(xero_tenant_id, payRunCalendar, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createPayRunCalendar: %s\n" % e) @@ -6098,6 +6414,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6179,13 +6515,14 @@

    Usage and SDK Samples

    def accounting_create_reimbursement(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' reimbursement = Reimbursement( name = "Test Reimbursement", account_id = "00000000-0000-0000-0000-000000000000") try: - api_response = api_instance.create_reimbursement(xero_tenant_id, reimbursement) + api_response = api_instance.create_reimbursement(xero_tenant_id, reimbursement, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createReimbursement: %s\n" % e) @@ -6228,6 +6565,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6309,6 +6666,7 @@

    Usage and SDK Samples

    def accounting_create_timesheet(): api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -6319,7 +6677,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.create_timesheet(xero_tenant_id, timesheet) + api_response = api_instance.create_timesheet(xero_tenant_id, timesheet, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createTimesheet: %s\n" % e) @@ -6362,6 +6720,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -6444,6 +6822,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' date = dateutil.parser.parse('2020-10-28T00:00:00Z') timesheet_line = TimesheetLine( @@ -6454,7 +6833,7 @@

    Usage and SDK Samples

    number_of_units = 6) try: - api_response = api_instance.create_timesheet_line(xero_tenant_id, timesheet_id, timesheetLine) + api_response = api_instance.create_timesheet_line(xero_tenant_id, timesheet_id, timesheetLine, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->createTimesheetLine: %s\n" % e) @@ -6530,6 +6909,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -12506,9 +12905,10 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.revert_timesheet(xero_tenant_id, timesheet_id) + api_response = api_instance.revert_timesheet(xero_tenant_id, timesheet_id, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->revertTimesheet: %s\n" % e) @@ -12584,6 +12984,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -12630,6 +13050,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' date_of_birth = dateutil.parser.parse('2000-10-28T00:00:00Z') address = Address( @@ -12645,7 +13066,7 @@

    Usage and SDK Samples

    address = address) try: - api_response = api_instance.update_employee(xero_tenant_id, employee_id, employee) + api_response = api_instance.update_employee(xero_tenant_id, employee_id, employee, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->updateEmployee: %s\n" % e) @@ -12721,6 +13142,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -12804,6 +13245,7 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' pay_template_earning_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' + idempotency_key = 'KEY_VALUE' earnings_template = EarningsTemplate( pay_template_earning_id = "00000000-0000-0000-0000-000000000000", @@ -12817,7 +13259,7 @@

    Usage and SDK Samples

    earnings_templates.append(earnings_template) try: - api_response = api_instance.update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earningsTemplate) + api_response = api_instance.update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earningsTemplate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->updateEmployeeEarningsTemplate: %s\n" % e) @@ -12919,6 +13361,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13002,6 +13464,7 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' leave_id = 'c4be24e5-e840-4c92-9eaa-2d86cd596314' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') end_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -13011,7 +13474,7 @@

    Usage and SDK Samples

    end_date = end_date) try: - api_response = api_instance.update_employee_leave(xero_tenant_id, employee_id, leave_id, employeeLeave) + api_response = api_instance.update_employee_leave(xero_tenant_id, employee_id, leave_id, employeeLeave, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->updateEmployeeLeave: %s\n" % e) @@ -13113,6 +13576,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13195,6 +13678,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + idempotency_key = 'KEY_VALUE' employee_opening_balances = EmployeeOpeningBalances( statutory_maternity_pay = 0.0, @@ -13204,7 +13688,7 @@

    Usage and SDK Samples

    statutory_sick_pay = 0.0) try: - api_response = api_instance.update_employee_opening_balances(xero_tenant_id, employee_id, employeeOpeningBalances) + api_response = api_instance.update_employee_opening_balances(xero_tenant_id, employee_id, employeeOpeningBalances, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->updateEmployeeOpeningBalances: %s\n" % e) @@ -13280,6 +13764,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13363,6 +13867,7 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' salary_and_wages_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' + idempotency_key = 'KEY_VALUE' salary_and_wage = SalaryAndWage( earnings_rate_id = "00000000-0000-0000-0000-000000000000", @@ -13372,7 +13877,7 @@

    Usage and SDK Samples

    status = status_enum.Active) try: - api_response = api_instance.update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salaryAndWage) + api_response = api_instance.update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salaryAndWage, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->updateEmployeeSalaryAndWage: %s\n" % e) @@ -13474,6 +13979,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13556,6 +14081,7 @@

    Usage and SDK Samples

    api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xeroTenantId_example' pay_run_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') payment_date = dateutil.parser.parse('2020-10-30T00:00:00Z') @@ -13565,7 +14091,7 @@

    Usage and SDK Samples

    payment_date = payment_date) try: - api_response = api_instance.update_pay_run(xero_tenant_id, pay_run_id, payRun) + api_response = api_instance.update_pay_run(xero_tenant_id, pay_run_id, payRun, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->updatePayRun: %s\n" % e) @@ -13641,6 +14167,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -13724,6 +14270,7 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' timesheet_line_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' date = dateutil.parser.parse('2020-10-28T00:00:00Z') timesheet_line = TimesheetLine( @@ -13734,7 +14281,7 @@

    Usage and SDK Samples

    number_of_units = 6) try: - api_response = api_instance.update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheetLine) + api_response = api_instance.update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheetLine, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling PayrollUkApi->updateTimesheetLine: %s\n" % e) @@ -13836,6 +14383,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + diff --git a/docs/v1/projects/index.html b/docs/v1/projects/index.html index 060ed95d..ca41a311 100644 --- a/docs/v1/projects/index.html +++ b/docs/v1/projects/index.html @@ -1173,9 +1173,8 @@ "$ref" : "#/components/schemas/ChargeType" }, "estimateMinutes" : { - "type" : "number", - "description" : "An estimated time to perform the task", - "format" : "double" + "type" : "integer", + "description" : "An estimated time to perform the task" }, "projectId" : { "type" : "string", @@ -1184,32 +1183,27 @@ "example" : "00000000-0000-0000-0000-000000000000" }, "totalMinutes" : { - "type" : "number", - "description" : "Total minutes which have been logged against the task. Logged by assigning a time entry to a task", - "format" : "double" + "type" : "integer", + "description" : "Total minutes which have been logged against the task. Logged by assigning a time entry to a task" }, "totalAmount" : { "$ref" : "#/components/schemas/Amount" }, "minutesInvoiced" : { - "type" : "number", - "description" : "Minutes on this task which have been invoiced.", - "format" : "double" + "type" : "integer", + "description" : "Minutes on this task which have been invoiced." }, "minutesToBeInvoiced" : { - "type" : "number", - "description" : "Minutes on this task which have not been invoiced.", - "format" : "double" + "type" : "integer", + "description" : "Minutes on this task which have not been invoiced." }, "fixedMinutes" : { - "type" : "number", - "description" : "Minutes logged against this task if its charge type is `FIXED`.", - "format" : "double" + "type" : "integer", + "description" : "Minutes logged against this task if its charge type is `FIXED`." }, "nonChargeableMinutes" : { - "type" : "number", - "description" : "Minutes logged against this task if its charge type is `NON_CHARGEABLE`.", - "format" : "double" + "type" : "integer", + "description" : "Minutes logged against this task if its charge type is `NON_CHARGEABLE`." }, "amountToBeInvoiced" : { "$ref" : "#/components/schemas/Amount" @@ -1246,7 +1240,7 @@ }, "estimateMinutes" : { "type" : "integer", - "description" : "Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided." + "description" : "An estimated time to perform the task" } }, "description" : "", @@ -1473,9 +1467,15 @@
  • createProject
  • +
  • + createTask +
  • createTimeEntry
  • +
  • + deleteTask +
  • deleteTimeEntry
  • @@ -1506,6 +1506,9 @@
  • updateProject
  • +
  • + updateTask +
  • updateTimeEntry
  • @@ -1566,9 +1569,10 @@

    Usage and SDK Samples

    def accounting_create_project(): api_instance = ProjectApi(api_client) xero_tenant_id = 'xeroTenantId_example' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.create_project(xero_tenant_id, projectCreateOrUpdate) + api_response = api_instance.create_project(xero_tenant_id, projectCreateOrUpdate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling ProjectApi->createProject: %s\n" % e) @@ -1611,6 +1615,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -1648,6 +1672,188 @@

    Parameters

    } }, "required" : true +} + + + + +
    +
    +
    +
    +

    createTask

    +

    Allows you to create a task

    +
    +
    +
    +

    +

    Allows you to create a specific task

    +

    +
    +
    /Projects/{projectId}/Tasks
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_create_task():
    +    api_instance = ProjectApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    project_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
    +    idempotency_key = 'KEY_VALUE'
    +    
    +    try:
    +        api_response = api_instance.create_task(xero_tenant_id, project_id, taskCreateOrUpdate, idempotency_key)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling ProjectApi->createTask: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    projectsGrant read-write access to projects
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    projectId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +You can create a task on a specified projectId +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    taskCreateOrUpdate * +
    +
    + + TaskCreateOrUpdate + +
    + The task object you are creating +
    +
    +
    + Required +
    +
    +
    @@ -1694,9 +1900,10 @@

    Usage and SDK Samples

    api_instance = ProjectApi(api_client) xero_tenant_id = 'xeroTenantId_example' project_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' try: - api_response = api_instance.create_time_entry(xero_tenant_id, project_id, timeEntryCreateOrUpdate) + api_response = api_instance.create_time_entry(xero_tenant_id, project_id, timeEntryCreateOrUpdate, idempotency_key) print(api_response) except AccountingBadRequestException as e: print("Exception when calling ProjectApi->createTimeEntry: %s\n" % e) @@ -1772,6 +1979,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -1792,25 +2019,175 @@

    Parameters

    The time entry object you are creating
    - -
    - Required -
    + +
    + Required +
    + + + + + +
    +
    +
    +
    +

    deleteTask

    +

    Allows you to delete a task

    +
    +
    +
    +

    +

    Allows you to delete a specific task

    +

    +
    +
    /Projects/{projectId}/Tasks/{taskId}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_delete_task():
    +    api_instance = ProjectApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    project_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
    +    task_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
    +    
    +    try:
    +        api_instance.delete_task(xero_tenant_id, project_id, task_id)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling ProjectApi->deleteTask: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    projectsGrant read-write access to projects
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    projectId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +You can specify an individual project by appending the projectId to the endpoint +
    +
    +
    + Required +
    +
    +
    +
    taskId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +You can specify an individual task by appending the id to the endpoint +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    - +
    @@ -2788,7 +3165,7 @@

    Parameters

    -taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID} +Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}
    @@ -3378,9 +3755,10 @@

    Usage and SDK Samples

    api_instance = ProjectApi(api_client) xero_tenant_id = 'xeroTenantId_example' project_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' try: - api_instance.patch_project(xero_tenant_id, project_id, projectPatch) + api_instance.patch_project(xero_tenant_id, project_id, projectPatch, idempotency_key) except AccountingBadRequestException as e: print("Exception when calling ProjectApi->patchProject: %s\n" % e) @@ -3455,6 +3833,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -3538,9 +3936,10 @@

    Usage and SDK Samples

    api_instance = ProjectApi(api_client) xero_tenant_id = 'xeroTenantId_example' project_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' try: - api_instance.update_project(xero_tenant_id, project_id, projectCreateOrUpdate) + api_instance.update_project(xero_tenant_id, project_id, projectCreateOrUpdate, idempotency_key) except AccountingBadRequestException as e: print("Exception when calling ProjectApi->updateProject: %s\n" % e) @@ -3615,6 +4014,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + @@ -3652,6 +4071,213 @@

    Parameters

    } }, "required" : true +} + + + + +
    +
    +
    +
    +

    updateTask

    +

    Allows you to update a task

    +
    +
    +
    +

    +

    Allows you to update a specific task

    +

    +
    +
    /Projects/{projectId}/Tasks/{taskId}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_update_task():
    +    api_instance = ProjectApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    project_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
    +    task_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
    +    idempotency_key = 'KEY_VALUE'
    +    
    +    try:
    +        api_instance.update_task(xero_tenant_id, project_id, task_id, taskCreateOrUpdate, idempotency_key)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling ProjectApi->updateTask: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    projectsGrant read-write access to projects
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    projectId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +You can specify an individual project by appending the projectId to the endpoint +
    +
    +
    + Required +
    +
    +
    +
    taskId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +You can specify an individual task by appending the id to the endpoint +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    taskCreateOrUpdate * +
    +
    + + TaskCreateOrUpdate + +
    + The task object you are updating +
    +
    +
    + Required +
    +
    +
    @@ -3699,9 +4325,10 @@

    Usage and SDK Samples

    xero_tenant_id = 'xeroTenantId_example' project_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' time_entry_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + idempotency_key = 'KEY_VALUE' try: - api_instance.update_time_entry(xero_tenant_id, project_id, time_entry_id, timeEntryCreateOrUpdate) + api_instance.update_time_entry(xero_tenant_id, project_id, time_entry_id, timeEntryCreateOrUpdate, idempotency_key) except AccountingBadRequestException as e: print("Exception when calling ProjectApi->updateTimeEntry: %s\n" % e)
    @@ -3802,6 +4429,26 @@

    Parameters

    + + + Idempotency-Key + + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    + diff --git a/setup.py b/setup.py index 14ff0b5a..e9a4955b 100644 --- a/setup.py +++ b/setup.py @@ -48,5 +48,5 @@ def read_file(filename): keywords="xero python sdk API oAuth", name="xero_python", packages=find_packages(include=["xero_python", "xero_python.*"]), - version="1.26.0", + version="1.27.0", ) diff --git a/xero_python/__init__.py b/xero_python/__init__.py index 775f17f3..2bcbeeb8 100644 --- a/xero_python/__init__.py +++ b/xero_python/__init__.py @@ -2,4 +2,4 @@ __author__ = """Xero Developer API""" __email__ = "api@xero.com" -__version__ = "1.26.0" +__version__ = "1.27.0" diff --git a/xero_python/rest.py b/xero_python/rest.py index 6bcf709b..aea4ba26 100644 --- a/xero_python/rest.py +++ b/xero_python/rest.py @@ -30,6 +30,7 @@ class RESTResponse(io.IOBase): + def __init__(self, resp): self.urllib3_response = resp self.status = resp.status @@ -52,6 +53,7 @@ def getheader(self, name, default=None): class RESTClientObject(object): + def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -74,9 +76,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args[ - "assert_hostname" - ] = configuration.assert_hostname # noqa: E501 + addition_pool_args["assert_hostname"] = ( + configuration.assert_hostname + ) # noqa: E501 if maxsize is None: if configuration.connection_pool_maxsize is not None: