Allows you to update a specified sales invoices or purchase bills
POST {{baseUrl}}/Invoices/:InvoiceID?unitdp=<integer>
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
unitdp | string | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts |
Request Body
{"Invoices"=>[{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Date"=>"<string>", "DueDate"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "InvoiceNumber"=>"<string>", "Reference"=>"<string>", "BrandingThemeID"=>"<uuid>", "Url"=>"<string>", "CurrencyCode"=>"<string>", "CurrencyRate"=>"<double>", "Status"=>"<string>", "SentToContact"=>"<boolean>", "ExpectedPaymentDate"=>"<string>", "PlannedPaymentDate"=>"<string>", "InvoiceID"=>"<uuid>", "RepeatingInvoiceID"=>"<uuid>", "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "HasErrors"=>"false", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Warnings"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, {"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Date"=>"<string>", "DueDate"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "InvoiceNumber"=>"<string>", "Reference"=>"<string>", "BrandingThemeID"=>"<uuid>", "Url"=>"<string>", "CurrencyCode"=>"<string>", "CurrencyRate"=>"<double>", "Status"=>"<string>", "SentToContact"=>"<boolean>", "ExpectedPaymentDate"=>"<string>", "PlannedPaymentDate"=>"<string>", "InvoiceID"=>"<uuid>", "RepeatingInvoiceID"=>"<uuid>", "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "HasErrors"=>"false", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Warnings"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
xero-tenant-id | string | (Required) Xero identifier for Tenant | |
Content-Type | string |
RESPONSES
status: OK
{"Id":"bd83b60e-9d16-4a3b-9f59-0a2d0ccd35f2","Status":"OK","ProviderName":"Provider Name Example","DateTimeUTC":"/Date(1552329729002)/","Invoices":[{"Type":"ACCREC","InvoiceID":"4074292c-09b3-456d-84e7-add864c6c39b","InvoiceNumber":"INV-0008","Reference":"My the Force be With You","Prepayments":[],"Overpayments":[],"AmountDue":575.0,"AmountPaid":0.0,"SentToContact":false,"CurrencyRate":1.0,"HasErrors":false,"IsDiscounted":false,"Contact":{"ContactID":"be392c72-c121-4f83-9512-03ac71e54c20","ContactStatus":"ACTIVE","Name":"Luke Skywalker","EmailAddress":"","BankAccountDetails":"","Addresses":[{"AddressType":"STREET","City":"","Region":"","PostalCode":"","Country":""},{"AddressType":"POBOX","City":"","Region":"","PostalCode":"","Country":""}],"Phones":[{"PhoneType":"DEFAULT","PhoneNumber":"","PhoneAreaCode":"","PhoneCountryCode":""},{"PhoneType":"DDI","PhoneNumber":"","PhoneAreaCode":"","PhoneCountryCode":""},{"PhoneType":"FAX","PhoneNumber":"","PhoneAreaCode":"","PhoneCountryCode":""},{"PhoneType":"MOBILE","PhoneNumber":"","PhoneAreaCode":"","PhoneCountryCode":""}],"UpdatedDateUTC":"/Date(1552329691573+0000)/","ContactGroups":[],"IsSupplier":false,"IsCustomer":true,"DefaultCurrency":"NZD","SalesTrackingCategories":[],"PurchasesTrackingCategories":[],"ContactPersons":[],"HasValidationErrors":false},"DateString":"2019-03-11T00:00:00","Date":"/Date(1552262400000+0000)/","DueDateString":"2019-03-12T00:00:00","DueDate":"/Date(1552348800000+0000)/","Status":"SUBMITTED","LineAmountTypes":"Exclusive","LineItems":[{"Description":"Light Saber","UnitAmount":500.0,"TaxType":"OUTPUT2","TaxAmount":75.0,"LineAmount":500.0,"AccountCode":"200","Tracking":[],"Quantity":1.0,"LineItemID":"6de1bf9f-de95-4c47-9287-37305db758c9","ValidationErrors":[]}],"SubTotal":500.0,"TotalTax":75.0,"Total":575.0,"UpdatedDateUTC":"/Date(1552329728987+0000)/","CurrencyCode":"NZD"}]}