Expose Paidto / Paid from field Prepayment and Overpayemt API
I am working on Overpayments and Prepayments and when trying to fetch the Prepayments I am not able to get the 'Paid from' field in the API response (record image attached below).
below is the response that i get from the previewer for the attached record
{
"Id": "8b72a53f-5525-42e9-a959-56321ccc4ee0",
"Status": "OK",
"ProviderName": "Xero API Previewer",
"DateTimeUTC": "\/Date(1606125619612)\/",
"Prepayments": [
{
"PrepaymentID": "d7de4e66-02c6-4032-a3e0-7837a13a0cdc",
"ID": "d7de4e66-02c6-4032-a3e0-7837a13a0cdc",
"CurrencyRate": 1.000000,
"Type": "SPEND-PREPAYMENT",
"RemainingCredit": 0.00,
"Allocations": [
{
"Amount": 6559.30,
"Date": "\/Date(1479168000000+0000)\/",
"Invoice": {
"InvoiceID": "03300666-fa19-457b-a7ed-cf683850fb94",
"InvoiceNumber": "Inv.#. RG1620064",
"Payments": [],
"CreditNotes": [],
"Prepayments": [],
"Overpayments": [],
"IsDiscounted": false,
"HasErrors": false,
"LineItems": []
}
}
],
"Payments": [],
"HasAttachments": false,
"Attachments": [],
"Contact": {
"ContactID": "dfe72ef4-8515-4370-8f95-22bfce1a3c09",
"AccountNumber": "AP103",
"ContactStatus": "ACTIVE",
"Name": "XYZ S.R.L.",
"FirstName": "Tobias",
"LastName": "BCDE",
"EmailAddress": "abcd@mail.com",
"BankAccountDetails": "Transfer from Alex Loan Account, € 1,986/-",
"Addresses": [
{
"AddressType": "STREET",
"City": "",
"Region": "",
"PostalCode": "",
"Country": "",
"AttentionTo": ""
},
{
"AddressType": "POBOX",
"City": "",
"Region": "",
"PostalCode": "",
"Country": "Italy",
"AttentionTo": ""
}
],
"Phones": [
{
"PhoneType": "DEFAULT",
"PhoneNumber": "",
"PhoneAreaCode": "",
"PhoneCountryCode": "ITALY"
},
{
"PhoneType": "DDI",
"PhoneNumber": "",
"PhoneAreaCode": "",
"PhoneCountryCode": ""
},
{
"PhoneType": "FAX",
"PhoneNumber": "",
"PhoneAreaCode": "",
"PhoneCountryCode": ""
},
{
"PhoneType": "MOBILE",
"PhoneNumber": "",
"PhoneAreaCode": "",
"PhoneCountryCode": ""
}
],
"UpdatedDateUTC": "\/Date(1561705647420+0000)\/",
"ContactGroups": [],
"DefaultCurrency": "EUR",
"BatchPayments": {
"BankAccountNumber": "Transfer from Al Jabor Loan Account, € 1,986/-",
"BankAccountName": "",
"Details": "AJ7001716-€3489.62",
"Code": "",
"Reference": ""
},
"PaymentTerms": {
"Sales": {
"Day": 30,
"Type": "DAYSAFTERBILLDATE"
}
},
"ContactPersons": [],
"HasValidationErrors": false
},
"DateString": "2016-11-13T00:00:00",
"Date": "\/Date(1478995200000+0000)\/",
"Status": "PAID",
"LineAmountTypes": "Exclusive",
"LineItems": [
{
"Description": "Maromas S.R.L. - Against Inv. No. B1620066 - €1,638.80 \n",
"UnitAmount": 6559.30,
"TaxType": "NONE",
"TaxAmount": 0.00,
"LineAmount": 6559.30,
"AccountCode": "310",
"Tracking": [],
"Quantity": 1.0000,
"ValidationErrors": []
},
{
"Description": "ARABEA COFFEE 20 CAPSULES BOX",
"Tracking": [],
"LineItemID": "d8596b77-a586-41c9-ae0c-46292870c540",
"ValidationErrors": []
}
],
"SubTotal": 6559.30,
"TotalTax": 0.00,
"Total": 6559.30,
"UpdatedDateUTC": "\/Date(1489566366863+0000)\/",
"CurrencyCode": "QAR"
}
]
}
And I get the similar kind of issue for the Overpayments as well.
How can i get the 'Paid from' for Prepayments and 'Paid into' for Overpayment in API response ?