Skip to main content
POST
/
v1
/
pvt
/
Customer
/
{id}
/
cashback
Add or remove cashback from a customer
curl --request POST \
  --url https://api.bonifiq.com.br/v1/pvt/Customer/{id}/cashback \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Value": 123,
  "Reason": "<string>",
  "ChangeKey": "<string>",
  "CustomerReason": "<string>"
}
'
{
  "ErrorMessage": "<string>",
  "ErrorCode": 123,
  "Result": {
    "CustomerExists": true,
    "InternalId": "<string>",
    "PointsBalance": 123,
    "PointsToExpire": [
      {
        "Points": 123,
        "When": "2023-11-07T05:31:56Z"
      }
    ],
    "CashbackBalance": 123,
    "RedeemKey": "<string>",
    "PointHistory": [
      {
        "Id": 123,
        "IsCanceled": true,
        "DateReceived": "2023-11-07T05:31:56Z",
        "ExpirationDate": "2023-11-07T05:31:56Z",
        "Amount": 123,
        "CashbackAmount": 123,
        "BranchId": "<string>",
        "BranchName": "<string>",
        "OrderOriginDescription": "<string>",
        "PointType": 123,
        "PointTypeDescription": "<string>"
      }
    ],
    "Name": "<string>",
    "Error": "<string>"
  },
  "Code": "<string>",
  "CodeName": "<string>",
  "HasWarning": true,
  "HasError": true
}

Authorizations

Authorization
string
header
required

Use API Basic Auth Keys

Path Parameters

id
string
required

Body

application/json

Point changing information

Change Cashback balance from a Customer

Value
number<decimal>

Value (in R$) that will be added or removed from customer`s cashback balance

OperationType
enum<integer>

Either is adding or removing cashback from customer

Available options:
0,
1
Reason
string

Information regarding why these cashback are being add/removed. Internal information only. Required.

ChangeKey
string

This is a unique key for this add/remove cashback. If you try to use the same key more than once it will result in error

CustomerReason
string | null

Customer-facing reason displayed in the customer's points history. Optional, max 255 characters. HTML tags are stripped automatically. If null, empty, or whitespace, the default system message is shown.

Response

200 - application/json

Standard response envelope used by the External API.

ErrorMessage
string | null

Error message returned when the request fails validation or processing. For warnings and successful responses, consumers should usually inspect Result, Code and Severity first.

ErrorCode
integer<int32> | null

Legacy numeric error code derived from internal API errors when available. This field is relevant only for error flows that use ApiResponseErrorDescription.

Result
object

Business payload returned by the endpoint.

Code
string | null

Endpoint-specific business code formatted as a two-digit string, such as 03 or 07. This field is available for success, warning and error outcomes.

CodeName
string | null

Symbolic enum name associated with Code, such as CheckoutNotFound.

Severity
enum<integer>

Final severity of the response. Success means the action completed as expected, Warning means the request was valid but the business outcome is informational or non-ideal, and Error means the request should be treated as a failure.

Available options:
0,
1,
2
HasWarning
boolean

Convenience flag that is true when Severity is Warning. Warnings are valid 200 OK business outcomes and should not be handled as transport or validation errors.

HasError
boolean

Indicates whether the request failed and should be handled as an error response. This flag is reserved for real API errors; warnings must keep this property as false.