Brand API

Integrate Revifly with your store. Create offers, manage vouchers, and validate redemptions.

Getting Started

  • Connect your Shopify store
  • Create your first offer
  • Generate vouchers for publishers
  • Validate and confirm redemptions
Go to Dashboard

Authentication

All Brand API requests require your API Key and Secret in headers:

X-API-Key: your_brand_api_key
X-API-Secret: your_brand_api_secret

Your API credentials are available on the Dashboard. Keep them secure!

View API Credentials

Base URL

https://revifly.com/api/v1/brand/

Offers

MethodPathDescription
POST/api/v1/brand/offersCreate offer
GET/api/v1/brand/offersList offers
GET/api/v1/brand/offers/{id}Get single offer
PATCH/api/v1/brand/offers/{id}Update offer

Create body: title, description, discount_type (percentage or fixed_amount), discount_value, start_date, and either duration_days (30 / 60 / 90 / 180 — recommended, triggers billing) or end_date (legacy). Optional: max_uses, min_purchase_amount, currency, limit_one_per_customer.

On update (PATCH), only title, description, max_uses, and limit_one_per_customer are editable. discount_type, discount_value, and min_purchase_amount are locked after creation.

Analytics — performance funnel

Your Analytics dashboard shows the full distribution funnel for each offer:

StageWhat it counts
ImpressionsTimes a publisher fetched your offer detail to show it to a user
ClicksUsers who landed on a Revifly-hosted voucher page for your offer
VouchersVoucher codes successfully generated
RedeemedVouchers applied at checkout (sales)

Conversion rates between each stage are shown on the dashboard. Access it via Analytics in your Revifly app menu.

Vouchers

MethodPathDescription
GET/api/v1/brand/vouchersList vouchers (filter by offer_id, status, code)
GET/api/v1/brand/vouchers/check?code=XXXCheck single voucher status
POST/api/v1/brand/vouchers/validateValidate for checkout — returns discount amount
POST/api/v1/brand/vouchers/applyMark voucher as applied (checkout step)
POST/api/v1/brand/vouchers/confirmConfirm use after order completion
PATCH/api/v1/brand/vouchers/updateCancel or revoke a voucher

Confirm is idempotent — calling it twice with the same order_id returns success. Calling it with a different order_id returns 409.

Example: Validate voucher (Brand API)
POST https://revifly.com/api/v1/brand/vouchers/validate
Content-Type: application/json
X-API-Key: your_api_key
X-API-Secret: your_api_secret

{
  "voucher_code": "RV-ABC123",
  "order_amount": 1000.00,
  "currency": "INR"
}