API Reference
Complete reference for the Majir Rewards API. Base URL: https://api.majir.shop
Register
Register as an API developer and receive your API key.
/api/v1/developers/register
Creates a new developer account. Returns an API key with the prefix mjr_live_. Verify your email to activate the key for production use.
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.
Your API key. Store this securely — it won't be shown again.
Rate limit tier. Available options: free, starter, enterprise
Whether the email has been verified. Initially false.
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"
}'
{
"success": true,
"data": {
"developer_id": "d8f7a1b2-3c4d-5e6f-...",
"api_key": "mjr_live_k9x2m4p7q1w3...",
"tier": "free",
"email_verified": false
}
}
Verify Email
Email verification callback.
/api/v1/developers/verify
Called when the developer clicks the verification link in their email. Activates the API key for production use.
Query Parameters
Verification token from the email link.
Response
Confirmation that the email is now verified.
Human-readable success message.
curl https://api.majir.shop/api/v1/developers/verify\?token\=YOUR_VERIFICATION_TOKEN
{
"success": true,
"data": {
"email_verified": true,
"message": "Email verified successfully"
}
}
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: mjr_live_your_key_here"
{
"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.
Confirms the old key has been revoked.
curl -X POST https://api.majir.shop/api/v1/developers/keys/rotate \ -H "X-Majir-API-Key: mjr_live_your_key_here"
{
"success": true,
"data": {
"api_key": "mjr_live_n3w_r0t4t3d_k3y...",
"previous_key_invalidated": true
}
}
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: mjr_live_your_key_here" \
-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