Hello I want to ask about REST API in customer pay...
# suitetalkapi
m
Hello I want to ask about REST API in customer payment amount, this is my payload
Copy code
{
  "account": {
    "id": "122"
  },
  "location": {
    "id": "1"
  },
  "customer": {
    "id": "501"
  },
  "payment": 100,
  "trandate": "2024-03-12",
  "memo": "LOGIFRAME TEST",
  "apply": {
    "items": [
      {
        "doc": {
          "id": "33207"
        },
        "line": 0,
        "apply": true,
        "amount": 100,
        "type": "Invoice",
        "refnum": "INV241",
        "applydate": "2024-03-12"
      }
    ]
  }
}
But I get this error :
Copy code
{
  "type": "<https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.1>",
  "title": "Bad Request",
  "status": 400,
  "o:errorDetails": [
    {
      "detail": "Error while accessing a resource. You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist.",
      "o:errorPath": "apply",
      "o:errorCode": "USER_ERROR"
    }
  ]
}
Anybody know the correct payload or any documentation on this? I tried from REST API browser but still not succeeded