Create overpayment
documentedCreate an overpayment.
POST /OverpaymentsOverpaymentsno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api.xero.com/api.xro/2.0/BankTransactions" \
-X POST \
-H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "xero-tenant-id: {{XERO_TENANT_ID}}" \
-d '{"BankTransactions": [ {"Type": "RECEIVE-OVERPAYMENT", "Contact": {"ContactID": "{{$contact_id}}"}, "LineItems": [ {"Description": "{{$description}}", "Quantity": {{$quantity}}, "UnitAmount": {{$unit_amount}}, "AccountCode": "{{$account_code}}", "TaxType": "NONE" } ], "BankAccount": {"AccountID": "{{$bank_account_id}}"}, "Date": "{{$overpayment_date}}", "Reference": "{{$reference}}" } ] }' \
&& npx -y keychains@latest curl "https://api.xero.com/api.xro/2.0/Overpayments/{{$overpayment_id}}/Allocations" \
-X POST \
-H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "xero-tenant-id: {{XERO_TENANT_ID}}" \
-d '{"Allocations": [ {"Invoice": {"InvoiceID": "{{$invoice_id}}"}, "Amount": {{$allocation_amount}}, "Date": "{{$allocation_date}}" } ] }'