Language and currency
Login
Cases Plans
Search on the site
Language and currency
Smartbis Public API v1.9.0

Integrate sales, customers, dependents, benefits and eligibility with the loyalty engine.

REST API v2 for server-to-server integrations with Bearer Token authentication, explicit scopes, idempotent writes and control of primary and dependent access to plans.

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

Obtain credentials in the Developers area of the panel. Send the authorized identity’s API Key and a valid Secret Key; the token expires in 24 hours.

02 Create or locate customer

Use document, phone, or ID to locate and keep the customer synchronized.

03 Register sale

Send `sale_amount` by document, phone, 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

List customers or filter by document, phone, or ID, with optional pagination.

Customers
POST /customers

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

Customers
PATCH /customers/{customer_id}

Updates the supported registration data and allows activating or deactivating the customer via the `active` field.

Customers
GET /customers/{customer_id}/referrals

Lists only the customers directly referred by the specified customer, respecting view permissions. The query does not generate credits; any rewards follow the existing process and appear in the transaction statement.

Referrals
GET /partners

Lists own partners and allows querying the details of each record.

Partners
POST /partners

Registers a partner in accordance with the plan rules and limits.

Partners
PATCH /partners/{partner_id}

Updates, activates, or deactivates an owned partner.

Partners
POST /sales

The administrator registers on the main operation. To register in a specific store, use an authorized operator's API Key for that store.

Sales
GET /customers/{customer_id}/transactions

Retrieves the paginated statement, the current balance and, when applicable, the balance composition by partner.

Transactions
POST /transactions/{transaction_id}/refund

Fully refunds the amount generated by the eligible transaction, a single time. Check refundable in the statement; the operator only refunds their own authorized sales.

Transactions
GET /coupons

Lists available coupons/rewards for the operation.

Coupons
POST /coupons

Registers a reward using the operation's existing rules and limits.

Coupons
PATCH /coupons/{coupon_id}

Updates, activates, or deactivates an existing reward.

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
POST /vouchers/manual-redemptions

Executes an existing manual redemption, checking balance and recording the voucher and the transaction atomically.

Vouchers
GET /plans

Lists the plans for participants configured in the club.

Plans
GET /subscriptions

Lists subscriptions and allows filtering for active, delinquent, expired or canceled accesses.

Subscriptions
GET /customers/{customer_id}/dependents

Retrieves dependents linked to the primary and their inherited eligibility.

Dependents
POST /customers/{customer_id}/dependents

Registers a dependent respecting company, primary and plan limit.

Dependents
PATCH /dependents/{dependent_id}

Updates the supported dependent data; eligibility remains inherited from the primary holder.

Dependents
PATCH /categories/{category_id}

Updates, activates, or deactivates a category without removing its existing links.

Categories
GET /eligibility/reconciliation

Reconciles active lives by plan and period, with pagination.

Eligibility
POST /webhooks

Register HTTPS endpoints for signed events of activation, default, expiration and subscription cancellation.

Webhooks
GET /webhooks/deliveries

Query the delivery history to investigate attempts and failures of subscription events.

Webhooks
POST /access-links

Issues a signed, short-lived, single-use access link for linked vendors.

Access
PATCH /subscriptions/{customer_id}

Activates, suspends or terminates a participant’s access to a plan without changing billing at the gateway.

Subscriptions
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, update, activation and deactivation by document, phone, or ID, respecting operator visibility.

Sales

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

Coupons

Registration, update, activation, deactivation and stock control of rewards.

Vouchers

Query, validation and manual redemption through the official process, with balance verification.

Categories

Creation, update, activation and deactivation of the operation's categories.

Partners and referrals

Maintains owned partners and queries direct referrals without creating a multi-level network or altering rewards.

Plans and subscriptions

Queries plans and synchronizes participants’ access status with external systems and providers.

Dependents and eligibility

Maintains family links and reconciles active primaries and dependents without transferring clinical data.

Webhooks and federated access

Delivers supported subscription events with signature and retries. For linked providers, issues temporary single-use access.

Authentication

The API Key identifies who registers the operation. The administrator records sales on the main operation; for a specific store, use an authorized operator's API Key for that store.

Choose the path of your integration.

The examples below organize existing resources. Check the OpenAPI for the fields, permissions and responses of each step.

ERP and post-sale

Locate or register the customer, record the sale in POST /sales and consult GET /customers/{customer_id}/transactions. If a refund is necessary, use the transaction_id of a movement with refundable: true; the integration does not choose a partial value.

Operation with multiple stores

Generate a token for the authorized operator in each store’s operation. The administrative API Key registers in the main operation; POST /sales does not receive store_id to distribute sales. Ambiguous links return 409 to correct the context.

Club and external provider

Check plans and subscriptions, maintain primary members and dependents, and reconcile eligibility. Register the beneficiary's relationship with the provider before issuing temporary access. Updating access in Smartbis does not create charges or cancel subscriptions in the gateway.

Handle authentication, retries and events from the start.

Keep credentials in the backend and respect the scopes returned by authentication. The interactive documentation contains the contracts to implement and validate each flow.

Token and permissions

Renew the 24-hour token when necessary and handle 401 responses. Authorization follows the user's API Key: using the administrative Secret Key with an operator's API Key does not expand their permissions.

Idempotent retries

Writes require an Idempotency-Key. Resend the same request with the same key to obtain the stored response within the 24-hour window. Another payload with the same key returns 409; an operation in processing may also return 409 and indicate a retry.

Subscription events

The current catalog includes subscription.activated, subscription.past_due, subscription.expired and subscription.cancelled. Use GET /webhooks/deliveries to track deliveries; the catalog does not represent events for all platform changes.

Subscription and retries

Validate the HMAC signature over the raw body and the timestamp, with a five-minute tolerance. The delivery mechanism allows up to eight attempts; HTTP 2xx responses conclude delivery. See the documentation to implement validation and handle failures.

One-time access

Links for connected providers use tokens valid for 60 to 900 seconds. Exchanging via POST /access-links/consume consumes the token once; request new access when it expires or has already been used.

Need to connect your own system?

Use the interactive documentation to test endpoints, validate payloads, and implement the appropriate flow for your integration.

Open Swagger