Deletes a record from a customer’s credit history. This function only deletes the customer credit record. It does not remove the credit from the customer’s balance.
Before you begin#
- The API token needs
CustomerCreditHistory_Delete, either assigned directly under Functions or through a group. See Create an API token. - Requests must be signed if the token requires it. See Make a signed request with HMAC.
- You need the
CustomerCreditHistory_IDof the record.CustomerCreditHistoryList_Load_Queryreturns it asid.
Example requests#
Delete a credit history record#
Deletes the credit history record with this ID.
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "CustomerCreditHistory_Delete",
"CustomerCreditHistory_ID": "{{CustomerCreditHistory_ID}}"
}
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
CustomerCreditHistory_ID |
Number | The id of the record you wish to delete |
Example response#
{
"success": 1
}
Response parameters#
| Parameter | Type | Description |
|---|---|---|
success |
Boolean | Boolean Value if the request was successful |
Related functions#
| Function | Use it to |
|---|---|
CustomerCreditHistoryList_Load_Query |
Find the credit history record ID |
CustomerCreditHistory_Insert |
Add credit to a customer account |
CustomerList_Load_Query |
Check a customer’s current credit balance |
Try in Postman#
In the Miva: JSON API: Authenticated collection, open Customers > CustomerCreditHistory_Delete. See Set Up Postman.