Allows you to update OR create one or more sales invoices or purchase bills
POST {{baseUrl}}/Invoices?summarizeErrors=false&unitdp=<integer>
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
summarizeErrors | boolean | If false return 200 OK and mix of successfully created objects and any with validation errors | |
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":"ccece84a-075c-4fcd-9073-149d4f7a91cf","Status":"OK","ProviderName":"Provider Name Example","DateTimeUTC":"/Date(1552327126164)/","Invoices":[{"Type":"ACCREC","InvoiceID":"ed255415-e141-4150-aab7-89c3bbbb851c","InvoiceNumber":"INV-0007","Reference":"Website Design","Prepayments":[],"Overpayments":[],"AmountDue":40.0,"AmountPaid":0.0,"SentToContact":false,"CurrencyRate":1.0,"HasErrors":false,"IsDiscounted":false,"Contact":{"ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8","ContactStatus":"ACTIVE","Name":"Liam Gallagher","FirstName":"Liam","LastName":"Gallagher","EmailAddress":"liam@rockstar.com","BankAccountDetails":"","Addresses":[{"AddressType":"STREET","City":"","Region":"","PostalCode":"","Country":"","AttentionTo":""},{"AddressType":"POBOX","City":"Anytown","Region":"NY","PostalCode":"10101","Country":"USA","AttentionTo":""}],"Phones":[{"PhoneType":"DEFAULT","PhoneNumber":"222-2222","PhoneAreaCode":"212","PhoneCountryCode":""},{"PhoneType":"DDI","PhoneNumber":"","PhoneAreaCode":"","PhoneCountryCode":""},{"PhoneType":"FAX","PhoneNumber":"333-2233","PhoneAreaCode":"212","PhoneCountryCode":""},{"PhoneType":"MOBILE","PhoneNumber":"444-3433","PhoneAreaCode":"212","PhoneCountryCode":""}],"UpdatedDateUTC":"/Date(1551747281053+0000)/","ContactGroups":[{"ContactGroupID":"17b44ed7-4389-4162-91cb-3dd5766e4e22","Name":"Oasis","Status":"ACTIVE","Contacts":[],"HasValidationErrors":false}],"IsSupplier":true,"IsCustomer":true,"SalesTrackingCategories":[],"PurchasesTrackingCategories":[],"ContactPersons":[{"FirstName":"Debbie","LastName":"Gwyther","EmailAddress":"debbie@rockstar.com","IncludeInEmails":false}],"HasValidationErrors":false},"DateString":"2019-03-11T00:00:00","Date":"/Date(1552262400000+0000)/","DueDateString":"2018-12-10T00:00:00","DueDate":"/Date(1544400000000+0000)/","Status":"AUTHORISED","LineAmountTypes":"Exclusive","LineItems":[{"Description":"Acme Tires","UnitAmount":20.0,"TaxType":"NONE","TaxAmount":0.0,"LineAmount":40.0,"AccountCode":"200","Tracking":[],"Quantity":2.0,"LineItemID":"5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f","ValidationErrors":[]}],"SubTotal":40.0,"TotalTax":0.0,"Total":40.0,"UpdatedDateUTC":"/Date(1552327126117+0000)/","CurrencyCode":"NZD","StatusAttributeString":"OK"}]}