Skip to main content
POST
/
v1
/
pvt
/
Customer
/
upsert
Creates or updates a customer using the OriginalId provided in the request body.
curl --request POST \
  --url https://api.bonifiq.com.br/v1/pvt/Customer/upsert \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "OriginalId": "<string>",
  "Name": "<string>",
  "Email": "<string>",
  "Phone": "<string>",
  "BirthdayDate": "2023-11-07T05:31:56Z",
  "SignupDate": "2023-11-07T05:31:56Z",
  "Document": "<string>",
  "IsEnrolled": true,
  "EnrolledDate": "2023-11-07T05:31:56Z"
}
'
{
  "ErrorMessage": "<string>",
  "ErrorCode": 123,
  "Result": {
    "OriginalId": "<string>",
    "PublicId": "<string>",
    "Name": "<string>",
    "Email": "<string>",
    "Phone": "<string>",
    "BirthdayDate": "2023-11-07T05:31:56Z",
    "SignupDate": "2023-11-07T05:31:56Z",
    "Document": "<string>",
    "IsEnrolled": true,
    "ReferralURL": "<string>",
    "WhatsappReferralUrl": "<string>",
    "CurrentTier": {
      "Name": "<string>",
      "Color": "<string>",
      "IconUrl": "<string>"
    },
    "BalanceOfPoints": 123,
    "BalanceCashback": 123,
    "Operation": "<string>"
  },
  "Code": "<string>",
  "CodeName": "<string>",
  "Severity": 0,
  "HasWarning": true,
  "HasError": true
}

Authorizations

Authorization
string
header
required

Use API Basic Auth Keys

Body

application/json

Customer data. OriginalId is required.

Creater Customer body Request

OriginalId
string

This is the Id in the client store.

Name
string

Customer name.

Email
string | null

Customer email.

Phone
string | null

Customer Contact Phone.

BirthdayDate
string<date-time> | null

Customer Birthdate.

SignupDate
string<date-time> | null

Date when the customer made the register on client store.

Document
string | null

Some document number from the customer, accepts any string.

IsEnrolled
boolean

If true the customer is participating on the points plan from the store.

EnrolledDate
string<date-time> | null

Date when the customer made entered into the program. Use the OrderPlacementDate if not informed.

Response

200 - application/json

Upsert result containing customer data and operation metadata.

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.