Payments REST API and its dependence on Supplier Site setup:
Payments REST API is a useful automated way to create payments (partial or full) against open Payables Invoices. Sample REST API Payload to achieve this is shown below.
API Name: fscmRestApi/resources/latest/payablesPayments
PayeeSite field on the payload corresponds to the supplier site name that the Payables Invoice belongs to. While submitting this payload via this web service, it can sometimes give the below error on the response message.
“The value for the attribute Site is invalid. Provide a valid value. (AP-810667)”
This error can happen due to the same site being associated with multiple Business Units, and API cannot differentiate between either Business Units, even though Business Unit is part of the payload.
Also, note that the Payment Business Unit could be different from than Invoice Business Unit.
Resolution:
Create Supplier sites in supplier maintenance with a unique site name. For example, appending a prefix or a suffix as shown in the payload below:
Once sites are set up like above, the below payload should work (assuming all other values are valid) and create the payment against the Invoice.