Plans
Search on the site
Smartbis Public API

Integrate sales, customers, coupons, and vouchers with the loyalty engine.

REST API v2 for server-to-server integrations with Bearer Token authentication, JSON communication, and endpoints to trigger rewards in real-time.

Basic flow

From authentication to automatic reward.

The main use of the API is to register external sales so that Smartbis can process cashback, points, vouchers, and communications according to the account rules.

01 Generate token

Send `api_key` and `api_secret` to receive the `access_token`.

02 Create or locate customer

Use CPF, phone, email, or ID to keep the customer synchronized.

03 Register sale

Send `sale_amount` by CPF or `customer_id` to trigger the loyalty engine.

04 Validate benefits

Check coupons, vouchers, categories, and stock when the operation requires it.

Quick reference of the main endpoints.

This section works as an entry point before the complete Swagger documentation.

POST /auth/token

Generates the Bearer token to authenticate subsequent calls.

Auth
GET /customers

Lists customers or filters by CPF with optional pagination.

Customers
POST /customers

Create customer with name, phone, password, and additional data.

Customers
POST /sales

Register sale by CPF or customer ID and trigger the loyalty rule.

Sales
GET /coupons

Lists available coupons/rewards for the operation.

Coupons
PATCH /coupons/{coupon_id}/stock

Update stock of a specific reward.

Coupons
GET /vouchers

Lists vouchers with optional pagination.

Vouchers
POST /vouchers/{voucher_code}/validate

Validate voucher by the provided code.

Vouchers
Main objects

API resources organized by operation usage.

This page presents the API domains in product language, while the Swagger documentation maintains schema, parameter, and response details.

Customers

Registration, search by CPF, phone, email, and data for relationship management.

Sales

Register external purchases to generate cashback, points, or vouchers.

Coupons

Listing and control of available reward stock.

Vouchers

Query and validation of vouchers used by the customer.

Categories

Creation and listing of categories used in operation organization.

Authentication

Generation of Bearer token with `api_key` and `api_secret`.

Need to connect your own system?

Use the interactive documentation to test endpoints, validate payloads, and align the ideal flow with the technical team.

Open Swagger