1. App API
Salla Platform Docs
  • Get Started
  • Create Your First App
  • Authorization
  • App Events
  • Handling Add-On Subscriptions
  • Server-Created Checkouts (Checkout SDK)
  • Root
  • App Snippets
    • Intro to App Snippets
    • HTML to JavaScript Snippet Migration
  • App Details Builder
    • Get Started
    • App Information
    • App Features
    • App Reviews
    • App Brands
    • App FAQ
    • App Statistics
  • Settings
    • App Setting Details
      GET
    • Update App Settings
      POST
  • Subscriptions
    • App Subscription Details
      GET
    • Subscription Renew
      POST
    • Update Subscription Balance
      POST
  • Affiliates
    • List Affiliate Links
      GET
    • Get Affiliate Link
      GET
    • Get Insights
      GET
    • Create Affiliate Link
      POST
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight (React)
  • Twilight SDK
  • Web Components (Deprecated)
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Twilight Engine (Deprecated)
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla Apps Playbook
  • Salla CLI
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight (React)
  • Twilight SDK
  • Web Components (Deprecated)
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Twilight Engine (Deprecated)
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla Apps Playbook
  • Salla CLI
Salla - Opensource
Salla - Developers Community
  1. App API

Authorization

Partner API
Partner APIs let a Salla Partner read and manage their own partner-account data from their own systems, such as scripts, reports, BI tools or backends, without signing in to the Partners Portal.
Every Partner API call acts on your partner company, using an access token you create in the Partners Portal. There is no OAuth flow and no merchant consent: the token belongs to your company, and it only reaches your company's data.
Partner API Token Format
All calls to the Partner APIs go to https://api.salla.dev/partners/v1 and require an Authorization header in this format:
Authorization: Bearer prtapi_<ACCESS_TOKEN>

What You will Need Before You Start:#

1
Open Connections
Sign in to Salla Partners and go to Settings › Connections. Find the Partner API clients section.
Partner API clients section
2
Create a client
Click Create client. In Create Partner API client, enter a Client name (for example, Reporting service) and choose the Permissions the integration needs: tick a resource, then pick Read or Read and write. Click Create client.
Create Partner API client
3
Copy the access token
The client opens with its Credentials. Copy the Access token; it starts with prtapi_.
Client credentials
4
Call the API
Send the token in the Authorization header of every Partner API request.
Who can manage API clients?
Only partner users with the Manage company settings permission can see the Partner API clients section and create, edit or delete clients and their tokens. If the section doesn't appear for an account that has this permission, Partner API isn't enabled for your company yet; contact Salla Partners support.

Partner API Benefits#

🔐 Scoped Access
Each client gets only the permissions you select, and every token is limited to your own partner company's data.
⛓️‍💥 Revoke Anytime
Delete a token or a whole client from Settings › Connections at any time to stop its access.
🔄 Zero-Downtime Rotation
Each client can hold an access token and a secondary access token, so you can rotate keys without interrupting your integration.

How a Request Works#

Every request goes to the Partner API base URL with your token. Salla checks the token (401), the client's permissions (403) and the rate limit (429) before the request reaches the service that owns the data, and the answer only ever contains your company's data.
Partner API request flow

API Clients and Tokens#

An API client represents one integration (for example, your reporting script). Each client has a name, a set of permissions, and its own access tokens.
RuleLimit
API clients per companyUp to 5 active clients. Delete an existing client to create a new one.
Client nameUp to 100 characters, unique within your company.
Tokens per clientUp to 2 active tokens: an Access token and a Secondary access token.
Minimum tokensA client always keeps at least 1 token. To remove the last one, delete the client.
Token formatprtapi_ followed by 48 letters and digits.
Token expiryTokens don't expire. They stay valid until you delete them or their client.
Use Show token or Copy token in the client's Credentials to get a token again later. Every time a token is shown or copied, it is recorded in your company's activity log. A few older tokens can't be shown again; for those, generate a secondary token, switch your integration to it, and delete the old one.

Token Lifecycle#

Partner API token lifecycle
A client's tokens keep working until you delete them. The cycle is: create a client → copy its access token → call the API → when it's time to rotate, generate a secondary token → switch your integration → delete the old token, and keep calling with the new one. Rotate on your own schedule, or right away if a token may have leaked; deleting the client revokes all of its tokens at once.

Scopes#

Scopes define what an API client can access. In the portal you pick them as Permissions, per resource: Read or Read and write, grouped by service (Partners Portal, Experts Marketplace, Marketing). In the API they follow the format resource.read or resource.read_write:
GET requests need the read scope (or read_write).
Requests that change data (POST, PUT, PATCH, DELETE) need the read_write scope.
The affiliate endpoints in this section use the Marketing scopes:
ScopeServiceGrants
affiliates.readMarketingRead your affiliate links, their terms and their insights.
affiliates.read_writeMarketingEverything in affiliates.read, plus create links and sub-links (sub-affiliates).
NOTE
More scopes will be added as new Partner API endpoints become available.

Rotating a Token#

1
Generate a secondary token
In Settings › Connections, open the API client and click Generate secondary token under Credentials.
2
Switch your integration
Update your integration to use the new token and confirm that requests succeed.
3
Delete the old token
Click Delete token on the old token. The new token becomes the client's access token.
After a token or client is deleted, Salla services may keep accepting it for up to 60 seconds while their cached checks expire.

Conventions#

Language#

Send Accept-Language: en or Accept-Language: ar. Error messages and labels (such as status.label) come back in that language only.

IDs#

IDs such as a link id or an opportunity.id are opaque integers. Don't parse or compute them; pass them back as you received them (for example, a link id as parent_link_id or link_id, an opportunity.id as opportunity_id).

Pagination#

List endpoints use Salla's simple pagination. They accept page (default 1) and per_page (default 15, maximum 60; a larger value is capped, not rejected) and always return a cursor object next to data. There are no totals: request page = cursor.next until it is null.
{
    "status": 200,
    "success": true,
    "data": [],
    "cursor": {
        "current": 1,
        "previous": null,
        "next": 2,
        "count": 15
    }
}

Amounts#

Amounts are plain numbers, never formatted strings. The currency is given next to them (for example "currency": "SAR" in the insights); earnings and sales are always in SAR.

Rate Limit#

Each API client can make up to 4 requests per second. Every response includes:
HeaderDescription
X-RateLimit-LimitRequests allowed per second.
X-RateLimit-RemainingRequests left in the current second.
X-RateLimit-ResetWhen the current window resets.
Requests over the limit return 429 Too Many Requests with:
a Retry-After header, the number of seconds to wait;
the same value in error.retry_after.

Errors#

Errors use this format:
{
    "status": 403,
    "success": false,
    "error": {
        "code": "insufficient_scope",
        "message": "The access token needs one of these scopes: affiliates.read.",
        "required_scopes": ["affiliates.read"]
    }
}
Statuserror.codeDescription
401missing_tokenNo access token was sent, or it isn't a Partner API token (prtapi_…).
401invalid_tokenThe token is invalid, expired or revoked. Generate a new token from Settings › Connections.
403insufficient_scopeThe client doesn't have the scope this endpoint needs. error.required_scopes lists the accepted scopes.
403endpoint_not_accessibleThis endpoint isn't available to Partner API clients.
404page_not_foundThe resource doesn't exist or doesn't belong to your partner company.
422validation_errorA parameter is invalid. error.fields lists the messages per field.
422parent_link_inactiveThe parent link is inactive or expired, so a sub-link can't be created under it.
422company_not_verifiedYour partner company must be verified before it can create links.
422affiliate_link_restrictedThe opportunity doesn't allow this link right now (for example, outside its dates or for this opportunity type).
422upstream_rejectedA Salla service rejected the request (for example, the coupon could not be created).
429rate_limitedToo many requests. Wait error.retry_after seconds (also in the Retry-After header) before retrying.
429request_in_progressThe same request is already being processed. Retry shortly.
502upstream_errorA Salla service failed. Nothing was created; retry later.
503auth_unavailablePartner API authentication is temporarily unavailable. Retry shortly.
504upstream_timeoutA Salla service didn't answer in time. Nothing was created; retry.
401 responses also include a WWW-Authenticate: Bearer realm="Salla Partner API" header.
Keep your tokens secret
Partner API tokens give access to your partner company's data.
Store them on your server only. Never put them in frontend code, mobile apps or public repositories.
If a token leaks, generate a new one and delete the leaked token right away.
Modified at 2026-12-03 09:39:29
Previous
Create Your First App
Next
App Events