Customer Credit Update
The PostUpdateCustomerCredit endpoint is responsible for updating a customer's credit in the MIMS system.
How to update customer credit
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostUpdateCustomerCredit |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostUpdateCustomerCredit" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| CustomerNo | String(25) | Yes | External code of the customer |
| CustomerAuxiliaryNo | String(25) | No | Auxiliary external code of the customer |
| PaymentTotal | Float | Yes | Total payment amount (must be different from zero) |
| PaymentDate | DataHora | Yes | Payment date |
| PaymentNo | String(40) | No | Payment number |
Note
- When
PaymentTotalis greater than zero, the customer's credit will be released (increased). - When
PaymentTotalis less than zero, the customer's credit will be used (decreased).
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostUpdateCustomerCredit"' \
--header 'Content-Type: application/json' \
--data '{
"CustomerNo": "CUST001",
"CustomerAuxiliaryNo": "",
"PaymentTotal": 1000.00,
"PaymentDate": "2024-01-15T10:30:00",
"PaymentNo": "PAG001"
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| DSO‑005 | Error message returned by the customer credit adjustment system |