Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Merchant API
  • Welcome 👋
  • Get Started
  • Create Your First App
  • Authorization
  • Webhooks
  • Conditional Webhooks
  • Security Considerations
  • Multi-Language Support
  • Responses
  • Pagination
  • Rate Limiting
  • Versioning
  • Change Log
  • Support
  • APIs
    • Orders
      • Create Order
      • List Orders
      • Order Details
      • Create Drafted Order
      • Update Order
      • Duplicate Order
      • Order Actions
    • Order Status
      • Update Order Status
      • Create Custom Order Status
      • List Order Statuses
      • Order Status Details
      • Update Custom Order Status
      • Update Bulk Orders Statuses
      • Sort Orders Statuses
    • Order Histories
      • List Order Histories
      • Create Order History
    • Order Tags
      • Create Order Tag
      • List Order Tags
      • Delete Order Tag
    • Order Invoice
      • Create Invoice
      • List Invoices
      • Invoice Details
      • Send Order Invoice
      • Create Order Invoice
    • Order Reservations
      • List Order Reservations
    • Order Items
      • List Order Items
      • Create Order Item
      • Update Order Item
      • Delete Order Item
    • Products
      • Create Product
      • List Products
      • Product Details
      • Update Product
      • Delete Product
      • Change Product Status
      • Product Details By SKU
      • Update Product By SKU
      • Delete Product By SKU
      • Update Product Price By SKU
      • Update Bulk Product Prices
      • Import Products
      • Bulk Product Actions
    • Product Options
      • Create Product Option
      • Product Option Details
      • Update Product Option
      • Delete Product Option
    • Product Quantity
      • List Product Quantities
      • Update Bulk Quantities
      • List Quantity Change Reasons
      • List Quantity Audit
      • Update Bulk Quantities by SKU
      • Update Quantity
      • Update Quantity By SKU
    • Product Variants
      • List Product Variants
      • Product Variant Details
      • Update Product Variant
      • Update Product Variant Quantity
    • Product Tags
      • Create Product Tag
      • List Product Tags
    • Product Images
      • Attach Image by SKU
      • Attach Video by SKU
      • Attach Youtube Video
      • Attach Image
      • Update Image
      • Delete Image
    • Product Option Values
      • Create Product Option Value
      • Product Option Value Details
      • Update Product Option Value
      • Delete Product Option Value
    • Abandoned Carts
      • List Abandoned Carts
      • Abandoned Cart Details
    • Customer Groups
      • Create Customer Group
      • List Customer Groups
      • Add Customers To Group Customer
      • Update Default Customer Group
      • Update Customer Group
      • Delete Customer Group
    • Customers
      • Create Customer
      • List Customers
      • Customer Details
      • Update Customer
      • Delete Customer
      • Ban Customer
      • Un-Ban customer
      • Import Customers
    • Digitals Product
      • Attach Digital Code
      • Attach Digital File
      • Delete Digital File
    • Categories
      • Create Category
      • List Categories
      • Category Details
      • Update Category
      • Delete Category
      • Category Children
      • Categories Search
      • List Category Products
    • Exports
      • Export Orders
      • Exports Logs
      • List Export Templates
      • Create Export Template
      • Update Export Template
      • Delete Export Template
      • List Export Columns
      • Export Customers
      • Export Custom URLs
      • Export Products
    • Shipments
      • Create Shipment
      • List Shipments
      • Shipment Details
      • Shipment Tracking
      • Update Shipment Details
      • Cancel Shipment
      • Return Shipment
    • Shipping Companies
      • List Shipping Companies
      • Shipping Company Details
      • List Estimate Rates
      • Create Shipping Company
      • Update Shipping Company
      • Delete Shipping Company
      • Shipping Company Options
    • Shipping Zones
      • Create Shipping Zone
      • List Shipping Zones
      • Shipping Zone Details
      • Update Shipping Zone
      • Delete Shipping Zone
    • Shipping Rules
      • List Shipping Rules
      • Shipping Rule Details
      • Delete Shipping Rule
    • Countries
      • List Countries
      • Country Details
    • Product Option Templates
      • List Option Templates
      • Option Template Details
      • Delete Option Template
      • Update Option Template
      • Create Option Template
    • Taxes
      • Create Tax
      • List Taxes
      • Tax Details
      • Update Tax
      • Delete Tax
    • Coupons
      • Create Coupon
      • List Coupons
      • Coupon Details
      • Update Coupon
      • Delete Coupon
      • List Coupon Codes
    • Affiliates
      • List Affiliates
      • Affiliate Details
      • Create Affiliate
      • Update Affiliate
      • Delete Affiliate
    • Order Assignment
      • List Auto Assignment Rules
      • Order Assigned Employees Details
      • Update Auto Assignment Rule
      • Create Auto Assignment Rules
    • Special Offers
      • Create Special Offer
      • List Special Offers
      • Special Offer Details
      • Update Special Offer
      • Delete Special Offer
      • Change Special Offer Status
    • Transactions
      • List Transactions
      • Transaction Details
      • Update Transaction
    • Payments
      • Available Payment Methods
      • List Banks
      • Payment Bank Details
    • Settlements
      • List Instant Settlements
      • Create Instant Settlement
      • Update Instant Settlement
      • Instant Settlement Details
    • Settings
      • Settings List
      • Update Setting Slug
      • Setting Details
    • Merchant
      • User Information Details
      • Store Information
    • Brands
      • Create Brand
      • List Brands
      • Brand Details
      • Update Brand
      • Delete Brand
    • Branches
      • Create Branch
      • List Branches
      • Branch Details
      • Update Branch
      • Delete Branch
    • Currencies
      • Activate Currencies
      • List Currencies
      • List Available Currencies
    • SEO
      • List SEO Settings
      • Update SEO Settings
    • Cities
      • List Cities
    • DNS Records
      • List DNS Records
      • Create DNS Record
      • Delete DNS Record
    • Languages
      • Add Language
      • List Languages
      • Update Language
    • Employees
      • List Employees
    • Advertisements
      • Create Advertisement
      • List Advertisements
      • Advertisement Details
      • Update Advertisement
      • Delete Advertisement
    • Webhooks
      • List Active Webhooks
      • List Events
      • Register Webhook
      • Deactivate Webhook
      • Update Webhook
    • Custom URLs
      • Import Custom URLs
    • Loyalty Points
      • Customer Loyalty Points
      • Update Customer Loyalty Points
    • Reviews
      • List Reviews
      • Review Details
      • Update Review
  • Webhooks - Store Events
    • Order
    • Product
    • Customer
    • Shippings
    • Shipments
    • Brand
    • Invoice
    • Category
    • Store
    • Special Offer
    • Cart
    • Miscellaneous
  1. Merchant API

Responses

Salla have applied all the technical standards have been placed by the REST principles. So, developers can always receive, read, decode, or understand the errors in responses based on the following form:
Color CodeResponseStatusMeaning
#14cc27200SuccessThe request has succeeded.
#14cc27201CreatedAPI call has been accepted for processing. The sent resource has been successfully inserted/updated at our database
#14cc27202AcceptedAPI call has been accepted for processing. This status code is used only when the sent resource has been successfully deleted from our database
#14cc27204No contentThe server successfully processed the request, but is not returning any content

INFO
With a 2xx success response, the response body will include a status field reflecting the HTTP status (2xx) and a success field set to true and , as shown in the following example:
{
  "status": 200,
  "success": true,
  "data": {
    "message": null,
    "code": 200
  }
}
Salla APIs may return the following error codes in response to any request encountering an error.:
Color CodeResponseSlugStatusMeaning
#fcba03400bad_requestBad RequestInvalid parameters, fields or filters
#fcba03401unauthorizedUnauthorizedauthorization error (invalid basic auth data or API key)
#fcba03403forbiddenForbiddenThe server understood the request, but is refusing it (blocked due to many errors in particular time) or the access is not allowed.
#fcba03404not_foundNot FoundThe specified resource/url-path could not be found
#fcba03405method_not_allowedMethod Not AllowedThe method used is not allowed.
#fcba03406not_acceptableNot AcceptableThe format used is not acceptable.
#fcba03410goneGoneThe resource requested is no longer available.
#fcba03422validation_failedUnprocessible Entityused if the server cannot process the enitity, e.g. mandatory fields are missing in the payload.
#fcba03429too_many_requestsToo Many RequestsRate limit exceeded.
#f03c15500server_errorInternal Server ErrorWe might be updating our services, please wait a while before trying again.
#f03c15503service_unavailableService UnavailableWe were unable to handle the HTTP request due to a temporary overloading or maintenance of the server. Please try again later.
Important
In case of multiple errors resulting in a 4xx response, the response will include a list of "fields" and an array of error messages as "values" for those fields, explaining the errors for each field. Here is an example for reference.
Single Error Message
Multiple Error Messages
{
    "status": 422,
    "success": false,
    "error": {
        "code": "error",
        "message": "alert.invalid_fields",
        "fields": {
            "first_name": [
                "الاسم الاول للعميل مطلوب"
            ]
        }
    }
}

#


401 Cases#

This section outlines common scenarios where the API responds with a 401 Unauthorized status. These responses typically indicate issues with user accounts, tokens, or permissions. By understanding these cases, you can troubleshoot and handle errors effectively to ensure seamless integration with our API.

1. Deleted User#

If the user installed the app and this user account is deleted. The token associated with this user will got 401 response.
{
    "status": 401,
    "success": false,
    "error": {
        "code": "Unauthorized",
        "message": "The User is not exists."
    }
}

2. Inactive User#

If the user installed the app and user account is inactive. The token associated with this user will got 401 response.
{
    "status": 401,
    "success": false,
    "error": {
        "code": "Unauthorized",
        "message": "عفوا لا يمكنك تسجيل الدخول, حسابك غير مفعل"
    }
}

3. Using The Same Refresh Token More Than Once to Generate Token#

If the refresh_token is used more than once, this will invalidate the token. The API response will be 401. Additionally, both the access token and the refresh token will be revoked.
{
    "error": "invalid_grant",
    "error_description": "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. The OAuth 2.0 Client ID from this request does not match the ID during the initial token issuance."
}

4. Not allowed Scopes#

If the user try to access the endpoint which scopes are not allowed, the API response with 401.
{
  "status": 401,
  "success": false,
  "error": {
    "code": "Unauthorized",
    "message": "The access token should have access to one of those scopes: products.read_write"
  }
}

5. Invalid Access token#

This might happen due to expired access token, uninstalled app, or invalid access token value provided in the request
{
    "status": 401,
    "success": false,
    "error": {
        "code": "Unauthorized",
        "message": "The access token is invalid"
    }
}
Modified at 2025-03-04 12:54:02
Previous
Multi-Language Support
Next
Pagination