name must be supplied — it is required and must be unique across your credit types. status and allow_decimal default when omitted, and unit / description are optional.| Field | Required | Notes |
|---|---|---|
name | Yes | Unique name of the credit type. |
status | No | Defaults to 1 (Active). |
allow_decimal | No | Defaults to 0 (No). |
unit | No | Optional unit label. |
description | No | Optional description. |
id in the body (see Edit Credit type).curl --location --globoff 'https://.daftara.com/v2/api/entity/credit_type' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Loyalty Points",
"status": 1,
"unit": "point",
"description": "Points earned on purchases",
"allow_decimal": 1
}'{
"message": "Credit Type added Successfully",
"id": 7
}