API Reference
Complete reference for the Majir Rewards API. Base URL: https://api.majir.shop
Register
Developer registration, available only when explicitly enabled.
/api/v1/developers/register
Public self-service registration is closed. The endpoint returns 403 while registration is disabled. When explicitly enabled, it creates a developer account and returns verification status. The registration response never contains an API key.
Body application/json
Developer's full name.
Email address. A verification link will be sent here.
Company or organization name.
Response
Unique identifier for your developer account.
Email address for the developer account.
Always true for a newly registered account. Email verification must finish before a key can be issued.
curl -X POST https://api.majir.shop/api/v1/developers/register \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Developer",
"email": "jane@example.com",
"company": "Acme Inc"
}'
{
"statuscode": 201,
"success": true,
"message": "Developer registered. Verification instructions will arrive by email.",
"data": {
"developerId": "d8f7a1b2-3c4d-5e6f-8a90-123456789abc",
"email": "jane@example.com",
"verificationRequired": true
},
"timestamp": "2026-11-14T12:00:00.000Z"
}
Verify Email
Email verification callback.
/api/v1/developers/verify
A valid unused verification link returns a new API key and sets the developer-session cookie. Registration can remain closed while existing verification links are processed.
Query Parameters
Verification token from the email link.
Response
Confirmation that the email is now verified.
Newly issued API key. Store it securely. The response also includes developerId, email and sessionExpiresAt. The session token is set in the majir_dev_session cookie, not in JSON.
curl https://api.majir.shop/api/v1/developers/verify\?token\=YOUR_VERIFICATION_TOKEN
{
"statuscode": 200,
"success": true,
"message": "Email verified successfully",
"data": {
"developerId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "jane@example.com",
"isVerified": true,
"apiKey": "YOUR_NEW_API_KEY",
"sessionExpiresAt": "2026-11-15T00:00:00.000Z"
},
"timestamp": "2026-11-14T00:00:00.000Z"
}
Usage Statistics
Get API key usage and rate limit status.
/api/v1/developers/usage
Returns request counts, rate limit status, and tier information for the authenticated developer.
Response
Current rate limit tier. Example: "free"
Number of API requests made today.
Maximum requests allowed per day for your tier.
Total API requests since account creation.
ISO 8601 timestamp of when the API key was created.
curl https://api.majir.shop/api/v1/developers/usage \ -H "X-Majir-API-Key:"
{
"success": true,
"data": {
"tier": "free",
"requests_today": 42,
"daily_limit": 100,
"total_requests": 1337,
"api_key_created": "2026-03-20T10:00:00Z"
}
}
Rotate Key
Invalidate your current API key and get a new one.
/api/v1/developers/keys/rotate
Rotates your API key. The previous key is immediately invalidated. Use this if your key is compromised.
Response
Your new API key. Store this securely.
Prefix identifying the newly issued key.
curl -X POST https://api.majir.shop/api/v1/developers/keys/rotate \ -H "X-Majir-API-Key:"
{
"statuscode": 200,
"success": true,
"message": "API key rotated successfully",
"data": {
"apiKey": "YOUR_ROTATED_API_KEY",
"keyPrefix": "mjr_live_example"
},
"timestamp": "2026-11-14T00:00:00.000Z"
}
Record Click
Track a click event for attribution.
/api/v1/events/click
Records a click event for attribution tracking. Use this when a user clicks on an offer or affiliate link. The click is attributed to your developer account for conversion tracking.
Body application/json
ID of the offer being clicked.
Destination URL for the click.
Response
Unique identifier for the recorded click event.
Whether the click was successfully tracked for attribution.
The attributed redirect URL to send the user to.
curl -X POST https://api.majir.shop/api/v1/events/click \ -H "Content-Type: application/json" \ -H "X-Majir-API-Key:" \ -d '{ "offer_id": "offer_abc123", "url": "https://merchant.example.com/deal" }'
{
"success": true,
"data": {
"click_id": "clk_7f8a9b0c1d2e",
"tracked": true,
"redirect_url": "https://merchant.example.com/deal?ref=majir_clk_7f8a9b0c1d2e"
}
}
Coming Soon
The following endpoints are in development and will be available in upcoming releases.
Offers
Search offers, get offer details, and browse offer categories.
GET /api/v1/offers Search offers
GET /api/v1/offers/:id Get offer detail
GET /api/v1/offers/categories List categories
Merchants
Search merchants, get details, list their offers, and find nearby locations.
GET /api/v1/merchants Search merchants
GET /api/v1/merchants/:id Get merchant detail
GET /api/v1/merchants/:id/offers Merchant offers
GET /api/v1/merchants/nearby Nearby merchants
Redemptions
Create redemptions, check status, and list redemption history.
POST /api/v1/redemptions Create redemption
GET /api/v1/redemptions/:id Redemption status
GET /api/v1/redemptions List redemptions
Webhooks
Receive real-time conversion postback notifications when attributed clicks result in purchases.
POST /api/v1/webhooks Register webhook
GET /api/v1/webhooks List webhooks
DELETE /api/v1/webhooks/:id Remove webhook