Publisher API

Integrate with Revifly to discover offers and generate trackable vouchers for your audience.

Authentication

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

X-API-Key: your_publisher_api_key
X-API-Secret: your_publisher_api_secret

Get your credentials from the Publisher Portal after logging in.

Base URL

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

GET get_offers

Fetch the list of eligible offers you can promote.

Endpoint: GET /api/v1/publisher/get_offers or GET /api/v1/publisher/offers

Query parameters
ParamTypeDescription
brand_idintFilter by brand
qstringSearch in title, description, brand name
include_inactive1 or trueInclude inactive/expired offers
Response (per offer)
{
  "status": "success",
  "data": {
    "publisher": { "publisher_id": 1, "publisher_name": "..." },
    "offers": [
      {
        "offer_id": 1,
        "brand_id": 2,
        "brand_name": "Brand Name",
        "image_url": "https://...",
        "brand_logo_url": "https://...",
        "title": "20% Off",
        "description": "Get 20% off your first order",
        "discount_type": "percentage",
        "discount_value": 20.0,
        "min_purchase_amount": 500.0,
        "currency": "INR",
        "start_date": "2025-01-01",
        "end_date": "2025-12-31",
        "status": "active",
        "terms_and_conditions": "Valid on orders of ₹500 or more. One use per customer. Valid until 31 Dec 2025.",
        "shop_url": "https://brand-store.myshopify.com",
        "landing_page_url": "https://brand.com/promo/20off"
      }
    ]
  }
}

POST generate_voucher

Generate a trackable voucher for an offer.

Endpoint: POST /api/v1/publisher/generate_voucher or POST /api/v1/publisher/voucher

Content-Type: application/json

Request body
FieldTypeRequiredDescription
offer_idintYesOffer ID from get_offers
quantityintNo1–50, default 1
customer_identifierstringNoOptional customer ID
custom_codestringNoOptional custom voucher code
Example request
POST https://revifly.com/api/v1/publisher/generate_voucher
Content-Type: application/json
X-API-Key: your_api_key
X-API-Secret: your_api_secret

{
  "offer_id": 123,
  "quantity": 1
}
Response
{
  "status": "success",
  "message": "Voucher generated successfully",
  "data": {
    "publisher_id": 1,
    "offer_id": 123,
    "voucher_id": 456,
    "voucher_code": "RV-ABC123XYZ",
    "expiry": "2025-12-31 23:59:59",
    "offer_title": "20% Off",
    "brand_name": "Brand Name",
    "image_url": "https://..."
  }
}