Introduction

Welcome to the API documentation. Here you'll find details on how to interact with our RESTful API.

Authentication

All requests require your API token to be included in the URL path as follows:

http://www.nexoffers.in/api/v1/<API_TOKEN>/<ENDPOINT>

Replace <API_TOKEN> with your actual API token.
Do not use the Authorization header.

Endpoints

GET /api/v1/<API_TOKEN>/offers

Retrieve all active offers for the affiliate.

Response
{
    "responseCode": 200,
    "status": true,
    "message": "Offers retrieved successfully",
    "data": [
        {
            "offer_id": 1,
            "name": "Offer Name",
            "description": "...",
            "image": "...",
            "visibility": "public",
            "capping_state": "global",
            "tracking_url_old": "...",
            "tracking_url_modern": "...",
            "payout": 100,
            "events": [
                { "event_id": 1, "name": "Signup", "default_payout": 100 }
            ]
        }
    ],
    "dateAndTime": "..."
}

GET /api/v1/<API_TOKEN>/offers/:offerId

Retrieve details for a specific offer.

URL Parameters
Parameter Type Description Required
offerId integer Offer's unique ID Yes
Response
{
    "responseCode": 200,
    "status": true,
    "message": "Offer details retrieved successfully",
    "data": {
        "offer": {
            "offer_id": 1,
            "name": "Offer Name",
            "description": "...",
            "image": "...",
            "visibility": "public",
            "capping_state": "global",
            "tracking_url_old": "...",
            "tracking_url_modern": "...",
            "payout": 100
        },
        "events": [
            { "event_id": 1, "name": "Signup", "default_payout": 100 }
        ]
    },
    "dateAndTime": "..."
}

GET /api/v1/<API_TOKEN>/caps

Get current usage and leftover caps for all offers for the affiliate.

Response
{
    "responseCode": 200,
    "status": true,
    "message": "Caps data retrieved successfully",
    "data": {
        "affiliate_id": 123,
        "current_date": "2025-08-09",
        "offers": [
            {
                "offer_id": 1,
                "name": "Offer Name",
                "capping_state": "global",
                "caps": {
                    "total_cap": 1000,
                    "total_used": 100,
                    "total_left": 900
                }
            }
        ]
    },
    "dateAndTime": "..."
}

GET /api/v1/<API_TOKEN>/caps/:offerId

Get current usage and leftover caps for a specific offer.

URL Parameters
Parameter Type Description Required
offerId integer Offer's unique ID Yes
Response
{
    "responseCode": 200,
    "status": true,
    "message": "Caps data retrieved successfully",
    "data": {
        "affiliate_id": 123,
        "current_date": "2025-08-09",
        "offer": {
            "offer_id": 1,
            "name": "Offer Name",
            "capping_state": "global",
            "caps": {
                "total_cap": 1000,
                "total_used": 100,
                "total_left": 900
            }
        }
    },
    "dateAndTime": "..."
}

GET /api/v1/<API_TOKEN>/offerStatus

Get the status of all offers for the affiliate.

Response
{
    "responseCode": 200,
    "status": true,
    "message": "All offers retrieved successfully",
    "data": {
        "affiliate_id": 123,
        "offers": [
            {
                "offer_id": 1,
                "name": "Offer Name",
                "status": "active",
                "reason": "Offer is active"
            }
        ]
    }
}

GET /api/v1/<API_TOKEN>/offerStatus/:offerId

Get the status of a specific offer for the affiliate.

URL Parameters
Parameter Type Description Required
offerId integer Offer's unique ID Yes
Response
{
    "responseCode": 200,
    "status": true,
    "message": "Offer status retrieved successfully",
    "data": {
        "affiliate_id": 123,
        "offer": {
            "offer_id": 1,
            "name": "Offer Name",
            "status": "active",
            "reason": "Offer is active"
        }
    }
}

Error Codes

Status Code Message Description
400 Bad Request Invalid input parameters.
401 Unauthorized API key missing or invalid.
404 Not Found Resource does not exist.
500 Internal server error Unexpected server error.

FAQ

Q: How do I get an API key?

A: Contact help@nexoffers.in to request your API key.