Allows you to update OR create one or more credit notes

POST {{baseUrl}}/CreditNotes?summarizeErrors=false&unitdp=<integer>

Request Params

KeyDatatypeRequiredDescription
summarizeErrorsbooleanIf false return 200 OK and mix of successfully created objects and any with validation errors
unitdpstringe.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts

Request Body

{"CreditNotes"=>[{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<string>", "DueDate"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>{"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>"}], "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "CurrencyCode"=>"<string>", "FullyPaidOnDate"=>"<string>", "CreditNoteID"=>"<uuid>", "CreditNoteNumber"=>"<string>", "Reference"=>"<string>", "CurrencyRate"=>"<double>", "RemainingCredit"=>"<double>", "Allocations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "AppliedAmount"=>"<double>", "Payments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "BrandingThemeID"=>"<uuid>", "StatusAttributeString"=>"<string>", "HasAttachments"=>"false", "HasErrors"=>"false", "ValidationErrors"=>[{"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>"}, "Date"=>"<string>", "DueDate"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>{"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>"}], "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "CurrencyCode"=>"<string>", "FullyPaidOnDate"=>"<string>", "CreditNoteID"=>"<uuid>", "CreditNoteNumber"=>"<string>", "Reference"=>"<string>", "CurrencyRate"=>"<double>", "RemainingCredit"=>"<double>", "Allocations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "AppliedAmount"=>"<double>", "Payments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "BrandingThemeID"=>"<uuid>", "StatusAttributeString"=>"<string>", "HasAttachments"=>"false", "HasErrors"=>"false", "ValidationErrors"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}]}

HEADERS

KeyDatatypeRequiredDescription
xero-tenant-idstring(Required) Xero identifier for Tenant
Content-Typestring

RESPONSES

status: OK

{&quot;Id&quot;:&quot;5e57a661-42da-4a19-96a0-00405a0e946d&quot;,&quot;Status&quot;:&quot;OK&quot;,&quot;ProviderName&quot;:&quot;Provider Name Example&quot;,&quot;DateTimeUTC&quot;:&quot;/Date(1551812702713)/&quot;,&quot;CreditNotes&quot;:[{&quot;CreditNoteID&quot;:&quot;f9256f04-5a99-4680-acb9-6b4639cc439a&quot;,&quot;CreditNoteNumber&quot;:&quot;&quot;,&quot;Payments&quot;:[],&quot;ID&quot;:&quot;f9256f04-5a99-4680-acb9-6b4639cc439a&quot;,&quot;CurrencyRate&quot;:1.0,&quot;Type&quot;:&quot;ACCPAYCREDIT&quot;,&quot;Reference&quot;:&quot;&quot;,&quot;RemainingCredit&quot;:46.0,&quot;Allocations&quot;:[],&quot;Contact&quot;:{&quot;ContactID&quot;:&quot;430fa14a-f945-44d3-9f97-5df5e28441b8&quot;,&quot;ContactStatus&quot;:&quot;ACTIVE&quot;,&quot;Name&quot;:&quot;Liam Gallagher&quot;,&quot;FirstName&quot;:&quot;Liam&quot;,&quot;LastName&quot;:&quot;Gallagher&quot;,&quot;EmailAddress&quot;:&quot;liam@rockstar.com&quot;,&quot;BankAccountDetails&quot;:&quot;&quot;,&quot;Addresses&quot;:[{&quot;AddressType&quot;:&quot;STREET&quot;,&quot;City&quot;:&quot;&quot;,&quot;Region&quot;:&quot;&quot;,&quot;PostalCode&quot;:&quot;&quot;,&quot;Country&quot;:&quot;&quot;,&quot;AttentionTo&quot;:&quot;&quot;},{&quot;AddressType&quot;:&quot;POBOX&quot;,&quot;City&quot;:&quot;Anytown&quot;,&quot;Region&quot;:&quot;NY&quot;,&quot;PostalCode&quot;:&quot;10101&quot;,&quot;Country&quot;:&quot;USA&quot;,&quot;AttentionTo&quot;:&quot;&quot;}],&quot;Phones&quot;:[{&quot;PhoneType&quot;:&quot;DEFAULT&quot;,&quot;PhoneNumber&quot;:&quot;222-2222&quot;,&quot;PhoneAreaCode&quot;:&quot;212&quot;,&quot;PhoneCountryCode&quot;:&quot;&quot;},{&quot;PhoneType&quot;:&quot;DDI&quot;,&quot;PhoneNumber&quot;:&quot;&quot;,&quot;PhoneAreaCode&quot;:&quot;&quot;,&quot;PhoneCountryCode&quot;:&quot;&quot;},{&quot;PhoneType&quot;:&quot;FAX&quot;,&quot;PhoneNumber&quot;:&quot;333-2233&quot;,&quot;PhoneAreaCode&quot;:&quot;212&quot;,&quot;PhoneCountryCode&quot;:&quot;&quot;},{&quot;PhoneType&quot;:&quot;MOBILE&quot;,&quot;PhoneNumber&quot;:&quot;444-3433&quot;,&quot;PhoneAreaCode&quot;:&quot;212&quot;,&quot;PhoneCountryCode&quot;:&quot;&quot;}],&quot;UpdatedDateUTC&quot;:&quot;/Date(1551747281053+0000)/&quot;,&quot;ContactGroups&quot;:[],&quot;ContactPersons&quot;:[],&quot;HasValidationErrors&quot;:false},&quot;DateString&quot;:&quot;2019-01-05T00:00:00&quot;,&quot;Date&quot;:&quot;/Date(1546646400000+0000)/&quot;,&quot;Status&quot;:&quot;DRAFT&quot;,&quot;LineAmountTypes&quot;:&quot;Exclusive&quot;,&quot;LineItems&quot;:[{&quot;Description&quot;:&quot;Foobar&quot;,&quot;UnitAmount&quot;:20.0,&quot;TaxType&quot;:&quot;INPUT2&quot;,&quot;TaxAmount&quot;:6.0,&quot;LineAmount&quot;:40.0,&quot;AccountCode&quot;:&quot;400&quot;,&quot;Tracking&quot;:[],&quot;Quantity&quot;:2.0,&quot;ValidationErrors&quot;:[]}],&quot;SubTotal&quot;:40.0,&quot;TotalTax&quot;:6.0,&quot;Total&quot;:46.0,&quot;UpdatedDateUTC&quot;:&quot;/Date(1551812702650+0000)/&quot;,&quot;CurrencyCode&quot;:&quot;NZD&quot;,&quot;StatusAttributeString&quot;:&quot;OK&quot;,&quot;ValidationErrors&quot;:[{&quot;Message&quot;:&quot;An existing Credit Note with the specified CreditNoteID could not be found&quot;}]}]}