v4

OpenAPI 3.0.02026-07-31811,0021.1 MB
Customer

Creates or updates a customer using the OriginalId provided in the request body.

This endpoint performs an upsert operation for customer data.

Matching rule

  • Uses OriginalId as the unique key
  • If the customer does not exist, it is created (Operation = created)
  • If the customer already exists, it is updated (Operation = updated)

Response

Returns customer data plus an Operation field with created or updated.

post/v1/pvt/Customer/upsert

Request body

OriginalIdstring

This is the Id in the client store.

Namestring

Customer name.

Emailstring nullable

Customer email.

Phonestring nullable

Customer Contact Phone.

BirthdayDatestring date-time nullable

Customer Birthdate.

SignupDatestring date-time nullable

Date when the customer made the register on client store.

Documentstring nullable

Some document number from the customer, accepts any string.

IsEnrolledboolean

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

EnrolledDatestring date-time nullable

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

Response

Upsert result containing customer data and operation metadata.

ErrorMessagestring nullable

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

ErrorCodeinteger nullable

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

Codestring nullable

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.

CodeNamestring nullable

Symbolic enum name associated with Code, such as CheckoutNotFound.

Severity0 | 1 | 2

0 = Success 1 = Warning 2 = Error

HasWarningboolean

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.

HasErrorboolean

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.