Redi
08/29/2024, 3:05 PMCeligo AI
08/29/2024, 3:06 PMAI generated answer (using internal Slack threads):Based on the conversations, to apply a customer payment to multiple invoices via the REST API, you would need to create a customer payment and then modify the apply sublist on each matching invoice. Here is an example of how you might structure the request: 1. Create or transform a customer payment:
json
POST {{REST_SERVICES}}/record/v1/customerpayment
{
    "customer": {
        "id": 150
    },
    "apply": {
        "items": [
            {
                "amount": 368.93,
                "apply": "T",
                "applyDate": "2020-08-01",
                "createdFrom": 4960,
                "due": 368.93,
                "refNum": "INV15",
                "total": 368.93
            }
        ]
    }
}json
POST {{REST_SERVICES}}/record/v1/customer/150/!transform/customerpayment
{
    "apply": {
        "items": [
            {
                "amount": 368.93,
                "apply": "T",
                "applyDate": "2020-08-01",
                "createdFrom": 4960,
                "due": 368.93,
                "refNum": "INV15",
                "total": 368.93
            }
        ]
    }
}Celigo AI
08/29/2024, 3:07 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817690492
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809174776
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.80833292
Celigo AI
08/29/2024, 3:07 PM