Allows you to create a single allocation for an overpayment
PUT {{baseUrl}}/Overpayments/:OverpaymentID/Allocations?summarizeErrors=false
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
summarizeErrors | boolean | If false return 200 OK and mix of successfully created objects and any with validation errors |
Request Body
{"Allocations"=>[{"Amount"=>"<double>", "Invoice"=>{"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>"}]}, "Date"=>"<string>", "Overpayment"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<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>", "OverpaymentID"=>"<uuid>", "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>"}], "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "Prepayment"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<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>", "PrepaymentID"=>"<uuid>", "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>", "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "CreditNote"=>{"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>"}]}, "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}, {"Amount"=>"<double>", "Invoice"=>{"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>"}]}, "Date"=>"<string>", "Overpayment"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<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>", "OverpaymentID"=>"<uuid>", "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>"}], "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "Prepayment"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<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>", "PrepaymentID"=>"<uuid>", "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>", "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "CreditNote"=>{"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>"}]}, "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
xero-tenant-id | string | (Required) Xero identifier for Tenant | |
Content-Type | string |
RESPONSES
status: OK
{"Id":"3b7f7be2-384a-4703-bcfb-c56e9116c914","Status":"OK","ProviderName":"Provider Name Example","DateTimeUTC":"/Date(1552428952968)/","Allocations":[{"Amount":1.0,"Date":"/Date(1552348800000+0000)/","Invoice":{"InvoiceID":"c45720a1-ade3-4a38-a064-d15489be6841","Payments":[],"CreditNotes":[],"Prepayments":[],"Overpayments":[],"HasErrors":false,"IsDiscounted":false,"LineItems":[],"ValidationErrors":[]},"Overpayment":{"OverpaymentID":"ed7f6041-c915-4667-bd1d-54c48e92161e","ID":"ed7f6041-c915-4667-bd1d-54c48e92161e","LineItems":[]},"ValidationErrors":[]}]}