Pali Network API

Read your businesses and import your marketplace products from your own software. Version 1 is a beta: it only grows, and we give notice before we remove anything.

Version 1.0.0-betaDownload the OpenAPI file

Base URL

https://api.palinetwork.com/v1

Getting started

You need about five minutes. Every example reads your token and your business id from the environment (PALI_TOKEN and BUSINESS_ID), so you can copy it as it is. The prices are in minor units: 3500 is 35.00.

  1. Step 1

    Create a token for one business

    In your dashboard open API tokens and create a token. Bind it to the one business you want to work with, and pick the scopes businesses:read, products:read and products:write.

    The token starts with pali_ and is shown once. Copy it now and keep it as a secret, then put it in your environment:

    Opens your dashboard (sign in first).

    export PALI_TOKEN="pali_…"

  2. Step 2

    Find your business

    Call GET /businesses. A token bound to one business sees only that one. Copy its id: it goes into every path below.

    export BUSINESS_ID="<id>"

    curl -X GET "https://api.palinetwork.com/v1/businesses" \
      -H "Authorization: Bearer $PALI_TOKEN"

    A response looks like this

    {
      "data": [
        {
          "id": "0198e6f2-8d47-7c3e-a6b1-2f4d9c0a7e53",
          "name": "Nablus Soap House",
          "slug": "nablus-soap-house",
          "role": "owner",
          "marketplace": {
            "enabled": true,
            "suspended": false,
            "plan_allows_selling": true
          }
        }
      ]
    }

  3. Step 3

    Import one product

    Send the product with PUT under a key of your own (OLIVE-SOAP here). The first send creates it, and sending it again updates it. Read outcome to see what happened, and status and awaiting_review to see what buyers will see.

    curl -X PUT "https://api.palinetwork.com/v1/businesses/$BUSINESS_ID/products/by-external-id/OLIVE-SOAP" \
      -H "Authorization: Bearer $PALI_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "title": "Olive soap",
        "description": "Handmade in Nablus.",
        "status": "active",
        "currency": "ILS",
        "variants": [
            {
                "external_id": "OLIVE-SOAP-1",
                "sku": "OLIVE-SOAP",
                "price": 3500,
                "quantity": 12,
                "weight_grams": 100
            }
        ]
    }'

    A response looks like this

    {
      "external_id": "OLIVE-SOAP",
      "outcome": "created",
      "product_id": "0198e6f4-3c1a-7b52-9d0e-5a1f2b7c9e10",
      "status": "active",
      "awaiting_review": false,
      "images": "none",
      "missing": [],
      "reason": null,
      "errors": [],
      "warnings": []
    }

  4. Step 4

    Import a batch

    Send up to 100 products in one call. Every product gets its own result, in the order you sent them. This batch repeats the product from step 3, so it comes back unchanged, while the other two are created. The first one has a photo, which is fetched after the answer (images is pending).

    curl -X POST "https://api.palinetwork.com/v1/businesses/$BUSINESS_ID/products/batch" \
      -H "Authorization: Bearer $PALI_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "products": [
            {
                "external_id": "OLIVE-SOAP",
                "title": "Olive soap",
                "description": "Handmade in Nablus.",
                "status": "active",
                "currency": "ILS",
                "variants": [
                    {
                        "external_id": "OLIVE-SOAP-1",
                        "sku": "OLIVE-SOAP",
                        "price": 3500,
                        "quantity": 12,
                        "weight_grams": 100
                    }
                ]
            },
            {
                "external_id": "LAUREL-SOAP",
                "title": "Laurel soap",
                "status": "active",
                "currency": "ILS",
                "variants": [
                    {
                        "external_id": "LAUREL-SOAP-1",
                        "sku": "LAUREL-SOAP",
                        "price": 4800,
                        "quantity": 40
                    }
                ],
                "images": [
                    {
                        "url": "https://shop.example/img/laurel-soap.jpg",
                        "alt": "A bar of laurel soap"
                    }
                ]
            },
            {
                "external_id": "ZAATAR-MIX",
                "title": "Za'\''atar mix",
                "status": "draft",
                "currency": "ILS",
                "variants": [
                    {
                        "external_id": "ZAATAR-MIX-1",
                        "sku": "ZAATAR-MIX",
                        "price": 2500,
                        "quantity": null
                    }
                ]
            }
        ]
    }'

    A response looks like this

    {
      "results": [
        {
          "external_id": "OLIVE-SOAP",
          "outcome": "unchanged",
          "product_id": "0198e6f4-3c1a-7b52-9d0e-5a1f2b7c9e10",
          "status": "active",
          "awaiting_review": false,
          "images": "none",
          "missing": [],
          "reason": null,
          "errors": [],
          "warnings": []
        }
      ],
      "summary": {
        "created": 2,
        "updated": 0,
        "linked": 0,
        "unchanged": 1,
        "skipped": 0,
        "failed": 0
      }
    }

  5. Step 5

    Read your products back

    List what the business has. Pages walk in creation order and next_cursor is null on the last one. Add external_id=OLIVE-SOAP to find one product by your key.

    curl -X GET "https://api.palinetwork.com/v1/businesses/$BUSINESS_ID/products?limit=25&status=active" \
      -H "Authorization: Bearer $PALI_TOKEN"

Guides

Authentication and scopes

Every call carries Authorization: Bearer pali_…. A token belongs to a member, is shown once, lasts 90 days unless you choose another time (365 at most) and a member holds at most 5 active tokens. Revoke a token in the dashboard and it stops working at once.

A token can be bound to one business. On any other business it answers 404, exactly as for a business that does not exist. A token that is not bound sees every business its owner owns or manages. To write products you need the role of owner or manager.

Each operation needs one scope. A token without it gets 403 with insufficient_scope, before anything else is looked up.

  • businesses:read: list your businesses.
  • products:read: list and read the products of a business.
  • products:write: create and replace products, one at a time or in a batch.

Rate limits

Two limits apply to the owner of a token, shared across all their tokens. They are settings and may change, so the numbers below are today's and the headers always tell you the current ones.

Every successful call carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds) for the window that is closest to running out. When a limit is reached the answer is 429 with rate_limited and a Retry-After header: wait that many seconds. Nothing was written. 503 carries Retry-After too.

  • Requests per minute: 300. A batch counts as one request.
  • Units per day: 60,000. A product in a write is one unit and any other request is one unit. A batch needs all its units left, or the whole call is refused with 429 before any product is written.
  • Photo downloads per day: 2,000 new photos. Over it, a photo is skipped with the warning image_budget and tried again the next time you send the product.

Your keys, and adopting products you already have

You name each product with an external_id of your own: 1 to 128 printable characters without spaces in the body of a batch. In the address of the single PUT it may only use A-Z a-z 0-9 : _ -. A key outside that pattern goes through the batch route. Keys are exact (case matters) and belong to the business. Every variant has its own external_id too.

A key you have not used before first looks for a product the business already has with the same SKU or barcode. If it finds exactly one that nothing else manages, it adopts it and answers linked, so a first import does not duplicate what the seller made in the dashboard. If several match you get ambiguous_match, and if another system (a shop import, a file) manages it you get managed_by_source. Nothing is overwritten in those cases.

The products you send are managed by your API integration: the dashboard shows "managed by your API integration" and locks the fields you send until the seller unlinks the product. A seller can also take a product back, and then it answers skipped with the reason excluded (or removed when they deleted it).

Prices and currencies

Amounts are whole numbers in the minor unit of the product's currency (ISO 4217): cents, agorot, fils. 3500 in ILS is 35.00. Use compare_at_price for the price a product had before, when price is a sale price.

For JOD an amount must be a multiple of 10 for now, or the product fails with precision_unsupported. This will relax later without a change to the contract. A currency the marketplace does not sell in fails with unsupported_currency.

Batches: results and partial failure

A batch takes 1 to 100 products and at most 1,000 variants. Every product is written on its own, so one that fails never undoes another. The answer is 200 with a results list in the order you sent and a summary, even when every product failed: read each result.

Each result has an outcome: created, updated, linked, unchanged, skipped or failed, and new outcomes may be added, so ignore what you do not know. A failed result lists its errors, and any result may carry warnings that did not stop it, such as gtin_dropped.

A call that cannot be read at all (bad types, an unknown field, a key sent twice, too many products) is a 422 for the whole call and nothing is written. A body must be JSON (application/json), at most 64 KB, and 1 MB on the two product write routes.

Safe retries

Both write routes are upserts by your key, so you can send the same call again whenever you are not sure it arrived. Sending a product again unchanged answers unchanged with the same product_id. You do not need an Idempotency-Key.

Retry after a network error, and after 429, 503 and 409 (import_in_progress, another write to the same business is still running) once Retry-After has passed. Do not retry other 4xx answers unchanged: they will fail the same way until you fix the request. Quote the request_id of a problem when you ask us for help.

Photos by address

Send up to 12 photos per product (11 when the product has an uploaded video) as https addresses (images), and one per variant (image_url). They must be public, on the standard port and without a user name in the address.

We fetch them after your call, once per address, so the answer is fast and images says pending. A photo that could not be copied is a warning on the product (read it with GET), and is tried again the next time you send the product.

What buyers see

status is what you say about a product. The marketplace has the last word: a seller that is not yet enabled gets drafts, archived stays archived, and the first products of a new seller wait for review (awaiting_review). missing lists what the seller still has to add in the dashboard, such as a photo or a category.

Versioning and deprecation

The version is in the address (/v1). Version 1 is a beta. Inside it, changes only add: new routes, optional request fields, response fields, headers, and new code or outcome values. Your client must ignore what it does not know.

During the beta, removing or changing something needs 30 days' notice. After the beta (the founders end it) the notice is at least 6 months, and a replaced version keeps running for at least 6 months after its successor is stable.

We announce a removal with the Deprecation and Sunset headers, a dated entry in the changelog below, and an email to the members whose tokens used it in the last 90 days.

Errors

Every failure is a problem document (RFC 9457) with the HTTP status, a stable code and the request_id. Rely on code: title and detail may change. New codes may be added, so treat an unknown one by its status.

Problem codes

StatusCodeWhat it meansWhat to do
400malformed_jsonThe body is not valid JSON.Fix the JSON and send it again.
401unauthenticatedThe token is missing, malformed, unknown, expired or revoked, or is not a member token. The answer is the same in every case.Check the Authorization header, or create a new token.
403insufficient_scopeThe token lacks the scope this operation needs.Create a token with the scope listed for the operation.
403account_suspendedThe owner of the token is suspended.Contact us.
403email_unverifiedThe owner of the token has not verified their email address.Verify the email address in your account.
403insufficient_roleYou are on the business team, but your role cannot use its products.Ask an owner or manager of the business.
403plan_requiredA write needs a plan of the business that includes selling.Change the plan in the dashboard.
403commission_overdueThe business's commission is overdue, so writes are refused.Pay the open commission in the dashboard.
404not_foundNo such route or record. A business you have no role on, one your token is not bound to, and one that does not exist look the same.Check the ids and the token's business.
405method_not_allowedThe route does not take this HTTP method.Use the method of the reference.
409import_in_progressAnother write to this business's products is still running. Nothing was written.Send it again after Retry-After.
413payload_too_largeThe body is larger than the route allows.Send fewer products per call.
415unsupported_media_typeThe body is not application/json.Send Content-Type: application/json.
422validation_failedA field is invalid or unknown. Nothing was written.Read errors, fix each field and send again.
429rate_limitedThe limit of the token's owner is reached, or a batch needs more units than are left. Nothing was written.Wait for Retry-After seconds.
500server_errorSomething failed on our side.Retry after a moment, and quote the request_id if it keeps failing.
503overloadedThe platform is busy.Retry after Retry-After.
503scope_disabledCalls of this kind are paused for the moment.Retry after Retry-After.
503unavailableThe API is under maintenance.Retry after Retry-After.

Why one product failed

In a batch a product that cannot be written has outcome: failed and an errors list with these codes. The call itself is still 200.

CodeWhat it meansWhat to do
invalid_fieldA value is not allowed; field names it.Fix the value.
sku_takenAnother product or variant of this business already uses this SKU, or it is repeated in the product.Use a SKU that is unique within the business.
too_many_optionsA product has at most 3 options.Send 3 option names or fewer.
too_many_variantsA product has at most 100 variants.Split it into several products.
no_variantsA product needs at least one variant with a price.Send one variant, even for a plain product.
variants_not_enabledProducts with several variants are not available yet.Send one variant per product.
unsupported_currencyThe marketplace does not sell in this currency.Use a currency the marketplace sells in.
precision_unsupportedFor this currency, amounts must be a whole number of hundredths of the currency until the marketplace stores more decimals.For JOD, send a multiple of 10 fils.
invalid_priceA price is missing or is not an amount the marketplace can store.Send price as an integer in minor units.
over_limitThe business has reached the number of products it may have through the API.Contact us if you need a higher number.
ambiguous_matchMore than one product of this business has this SKU or barcode, so none was chosen.Make the SKUs unique in the dashboard first.
managed_by_sourceThe product with this SKU or barcode is managed by another system (a shop import or a file) and is not taken over.Unlink it in the dashboard, or leave it to that system.

Warnings

A warning did not stop the product from being written. It sits in warnings, with the field it is about.

CodeWhat it meansWhat to do
gtin_droppedThe barcode is not a valid GTIN, so it was not saved.Send a valid GTIN of 8, 12, 13 or 14 digits.
image_failedThe photo could not be copied.It is tried again the next time you send the product.
image_budgetThe daily limit of photo downloads is used up.It is tried again the next time you send the product.
image_hostThe photo address is not allowed.Use a public https address.
too_many_imagesThe product has more photos than it can show: 12, or 11 when it has an uploaded video.Send fewer photos, or remove the uploaded video.

Rules behind a 422

A 422 (validation_failed) lists the fields in errors, each with the rule that failed, such as these. Whole-call errors use the full path, like products.3.variants.0.gtin.

CodeWhat it meansWhat to do
requiredA required field is missing.Add it.
maxA value is longer or larger than allowed.Check the limit in the reference.
unknown_fieldThe field does not exist. Unknown fields are refused.Remove it.

API reference

Authenticate every call with Authorization: Bearer pali_…. The operations are listed in the order of the spec.

The reference is generated from the same OpenAPI file you can download, so it always matches the API.

GET/businesses

List your businesses

Needs the scope businesses:read

The businesses you may manage (as owner or manager), with your role and where each stands in the marketplace. A token bound to one business sees only that one.

Response body (200)

FieldTypeDescription
datarequiredarray of objects
data[].idrequiredstring (uuid)
data[].namerequiredstring
data[].slugrequiredstring
data[].rolerequiredowner | managerYour role on the business. New values may be added.
data[].marketplacerequiredobject
data[].marketplace.enabledrequiredbooleanThe business takes part in the marketplace.
data[].marketplace.suspendedrequiredboolean
data[].marketplace.plan_allows_sellingrequiredbooleanThe business's plan includes selling. Writing products needs it.

Responses

  • 200The businesses, ordered by name.
  • 401The token is missing, malformed, unknown, expired or revoked, or is not a member token (unauthenticated). The answer is the same in every case.
  • 403The token lacks the operation's scope (insufficient_scope), its owner is suspended (account_suspended) or hasn't verified their email (email_unverified), or you are on the business team without the role to use its products (insufficient_role). A write is also refused when the business's plan doesn't include selling (plan_required) or its commission is overdue (commission_overdue).
  • 429The token owner's limit is reached, or a batch needs more units than are left (rate_limited). Nothing was written.
  • 503The platform is busy (overloaded), the scope is paused (scope_disabled), or under maintenance (unavailable).
GET/businesses/{business}/products

List a business's products

Needs the scope products:read

Every product of the business, drafts and archived ones included, and the ones another system (a shop import, a file) manages. Pages walk in creation order, so an update never moves a product between pages. Send the same filters with each cursor.

Parameters

FieldInTypeDescription
businessrequiredpathstring (uuid)The business's id, from GET /businesses.
cursorquerystringThe next_cursor of the previous page.
limitqueryinteger
updated_sincequerystring (date-time)Only products changed at or after this time (RFC 3339 with an offset, such as 2026-11-01T00:00:00Z).
external_idquerystringOnly the product with this external_id, exactly as you sent it (URL-encode it).
statusqueryactive | draft | archivedactive is for sale (once the Souq lets it), draft is not yet, archived is taken down. The Souq has the last word on what a buyer sees: see awaiting_review.

Response body (200)

FieldTypeDescription
datarequiredarray of objects
data[].idrequiredstring (uuid)
data[].external_idrequiredstring | nullYour product key. Null for a product that did not come from the API.
data[].managed_byrequiredapi | shopify | woocommerce | csv | nullWhat owns the product's title, price, stock and photos, or null when the seller manages it in the dashboard. New values may be added.
data[].titlerequiredstring
data[].descriptionrequiredstring
data[].short_descriptionrequiredstring | null
data[].brandrequiredstring | null
data[].statusrequiredactive | draft | archivedactive is for sale (once the Souq lets it), draft is not yet, archived is taken down. The Souq has the last word on what a buyer sees: see awaiting_review.
data[].currencyrequiredstringISO 4217 code of every amount of the product.
data[].optionsrequiredarray of string
data[].variantsrequiredarray of objects
data[].variants[].idrequiredstring | null (uuid)Null for the one variant of a product that has no options.
data[].variants[].external_idrequiredstring | nullYour variant key. Null for the one variant of a product that has no options.
data[].variants[].option_valuesrequiredarray of string
data[].variants[].skurequiredstring | null
data[].variants[].gtinrequiredstring | null
data[].variants[].pricerequiredinteger | nullWhat a buyer pays, in minor units of the product's currency.
data[].variants[].compare_at_pricerequiredinteger | nullThe price it was before, when price is a sale price, in minor units.
data[].variants[].quantityrequiredinteger | nullNull when stock is not counted.
data[].variants[].weight_gramsrequiredinteger | null
data[].variants[].image_urlrequiredstring | null (uri)
data[].imagesrequiredarray of objects
data[].images[].urlrequiredstring (uri)
data[].images[].altrequiredstring | null
data[].product_category_idrequiredstring | null (uuid)
data[].awaiting_reviewrequiredbooleanThe product is active but waits for a moderator before buyers see it.
data[].warningsrequiredarray of objects
data[].warnings[].fieldrequiredstringDot path to the field, relative to the product (variants.0.gtin, images). Whole-call 422 errors use the full path (products.3.variants.0.gtin).
data[].warnings[].coderequiredstringStable. New values may be added, such as gtin_dropped, image_failed, image_budget, image_host or too_many_images.
data[].warnings[].messagerequiredstring
data[].created_atrequiredstring (date-time)
data[].updated_atrequiredstring (date-time)
next_cursorrequiredstring | nullNull on the last page.

Responses

  • 200One page of products.
  • 401The token is missing, malformed, unknown, expired or revoked, or is not a member token (unauthenticated). The answer is the same in every case.
  • 403The token lacks the operation's scope (insufficient_scope), its owner is suspended (account_suspended) or hasn't verified their email (email_unverified), or you are on the business team without the role to use its products (insufficient_role). A write is also refused when the business's plan doesn't include selling (plan_required) or its commission is overdue (commission_overdue).
  • 404No such route or record (not_found). A business you have no role on, one your token is not bound to and one that does not exist look the same.
  • 422A field is invalid or unknown (validation_failed).
  • 429The token owner's limit is reached, or a batch needs more units than are left (rate_limited). Nothing was written.
  • 503The platform is busy (overloaded), the scope is paused (scope_disabled), or under maintenance (unavailable).
GET/businesses/{business}/products/{product}

Get one product

Needs the scope products:read

Parameters

FieldInTypeDescription
businessrequiredpathstring (uuid)The business's id, from GET /businesses.
productrequiredpathstring (uuid)The product's id.

Response body (200)

FieldTypeDescription
idrequiredstring (uuid)
external_idrequiredstring | nullYour product key. Null for a product that did not come from the API.
managed_byrequiredapi | shopify | woocommerce | csv | nullWhat owns the product's title, price, stock and photos, or null when the seller manages it in the dashboard. New values may be added.
titlerequiredstring
descriptionrequiredstring
short_descriptionrequiredstring | null
brandrequiredstring | null
statusrequiredactive | draft | archivedactive is for sale (once the Souq lets it), draft is not yet, archived is taken down. The Souq has the last word on what a buyer sees: see awaiting_review.
currencyrequiredstringISO 4217 code of every amount of the product.
optionsrequiredarray of string
variantsrequiredarray of objects
variants[].idrequiredstring | null (uuid)Null for the one variant of a product that has no options.
variants[].external_idrequiredstring | nullYour variant key. Null for the one variant of a product that has no options.
variants[].option_valuesrequiredarray of string
variants[].skurequiredstring | null
variants[].gtinrequiredstring | null
variants[].pricerequiredinteger | nullWhat a buyer pays, in minor units of the product's currency.
variants[].compare_at_pricerequiredinteger | nullThe price it was before, when price is a sale price, in minor units.
variants[].quantityrequiredinteger | nullNull when stock is not counted.
variants[].weight_gramsrequiredinteger | null
variants[].image_urlrequiredstring | null (uri)
imagesrequiredarray of objects
images[].urlrequiredstring (uri)
images[].altrequiredstring | null
product_category_idrequiredstring | null (uuid)
awaiting_reviewrequiredbooleanThe product is active but waits for a moderator before buyers see it.
warningsrequiredarray of objects
warnings[].fieldrequiredstringDot path to the field, relative to the product (variants.0.gtin, images). Whole-call 422 errors use the full path (products.3.variants.0.gtin).
warnings[].coderequiredstringStable. New values may be added, such as gtin_dropped, image_failed, image_budget, image_host or too_many_images.
warnings[].messagerequiredstring
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Responses

  • 200The product, with its variants, photos and warnings.
  • 401The token is missing, malformed, unknown, expired or revoked, or is not a member token (unauthenticated). The answer is the same in every case.
  • 403The token lacks the operation's scope (insufficient_scope), its owner is suspended (account_suspended) or hasn't verified their email (email_unverified), or you are on the business team without the role to use its products (insufficient_role). A write is also refused when the business's plan doesn't include selling (plan_required) or its commission is overdue (commission_overdue).
  • 404No such route or record (not_found). A business you have no role on, one your token is not bound to and one that does not exist look the same.
  • 429The token owner's limit is reached, or a batch needs more units than are left (rate_limited). Nothing was written.
  • 503The platform is busy (overloaded), the scope is paused (scope_disabled), or under maintenance (unavailable).
PUT/businesses/{business}/products/by-external-id/{external_id}

Create or replace one product by your key

Needs the scope products:write

An upsert: the first send creates the product, later sends update it, and sending it again unchanged answers unchanged with the same product_id, so a retry is always safe. The key in the path wins; an external_id in the body, if sent, must be the same.

The product is written by the same importer as a shop sync: the Souq decides its status (a seller that is not yet enabled gets a draft; the first products of a new seller wait for review), and the fields you send are then managed by your API integration and locked in the dashboard until the seller unlinks the product. Photos are fetched after the answer: see images.

If the Souq refuses the product (for example a SKU that is taken) the answer is 422 with the reason in errors; nothing is written.

Parameters

FieldInTypeDescription
businessrequiredpathstring (uuid)The business's id, from GET /businesses.
external_idrequiredpathstringYour own key for the product, 1 to 128 characters from A-Z a-z 0-9 : _ -. Keys are exact (case matters) and belong to the business. A key outside this pattern is not a route here: the answer is 404 (or 405) as a problem document. Send such a key through the batch route, where it is a body field.

Request body

FieldTypeDescription
external_idstring | nullOptional here; if sent, the same as the key in the path.
titlerequiredstring
descriptionstring | nullPlain text; HTML is not interpreted.
short_descriptionstring | nullOnly fills an empty field on the first send. It never overwrites what the seller wrote.
brandstring | null
statusrequiredactive | draft | archivedWhat you say about the product. The Souq decides what a buyer sees: a seller that is not enabled gets drafts, and archived stays archived.
currencyrequiredstringISO 4217. A currency the marketplace doesn't sell in fails that product with unsupported_currency.
product_category_idstring | null (uuid)A product subcategory. Only fills an empty field on the first send.
optionsarray of stringOption names, such as Size. A product has at most 3.
variantsrequiredarray of objects1 to 100 versions (a plain product is one). Several versions are written only while the marketplace has them switched on (variants_not_enabled).
variants[].external_idrequiredstringYour variant key, unique within the product.
variants[].option_valuesarray of stringOne value per option name of the product, in order.
variants[].skustring | nullUnique within the business.
variants[].gtinstring | nullA valid GTIN (8, 12, 13 or 14 digits). An invalid one is dropped with the warning gtin_dropped.
variants[].pricerequiredintegerWhat a buyer pays, in minor units of the product's currency (cents; fils for JOD). For JOD it must be a multiple of 10 for now, or the product fails with precision_unsupported.
variants[].compare_at_priceinteger | nullThe price it was before, when price is a sale price.
variants[].quantityinteger | nullNull when you don't count stock; the variant is then always available.
variants[].weight_gramsinteger | null
variants[].image_urlstring | nullThe variant's photo, an https address. It is fetched like the product's photos.
imagesarray of objectsUp to 12 photos. A product with an uploaded video holds 11: the extra photo is dropped with the warning too_many_images.
images[].urlrequiredstringA public https address on the standard port, without a user name. It is fetched after your call, by us, once per address (an address already copied is not fetched again) up to a daily budget.
images[].altstring | null

Response body (200)

FieldTypeDescription
external_idrequiredstring
outcomerequiredstringcreated, updated, linked (it adopted a product the business already had), unchanged, skipped (see reason) or failed (see errors). New values may be added; ignore what you don't know.
product_idrequiredstring | null (uuid)Null when nothing was written.
statusrequiredactive | draft | archived | null
awaiting_reviewrequiredboolean
imagesrequiredstring | nullpending while the photos are fetched after your call, done, none when the product has no photo, null when nothing was written. A photo that could not be copied is a warning on the product (GET), and is tried again the next time you send it.
missingrequiredarray of stringWhat the seller still has to add in the dashboard, such as photo or category.
reasonrequiredstring | nullFor skipped, excluded (the seller took the product back) or removed (they deleted it).
errorsrequiredarray of objects
errors[].fieldrequiredstring
errors[].coderequiredstringStable. invalid_field, sku_taken, too_many_options, too_many_variants, no_variants, variants_not_enabled, unsupported_currency, precision_unsupported, invalid_price, over_limit, ambiguous_match, managed_by_source. New values may be added.
errors[].messagerequiredstring
warningsrequiredarray of objects
warnings[].fieldrequiredstringDot path to the field, relative to the product (variants.0.gtin, images). Whole-call 422 errors use the full path (products.3.variants.0.gtin).
warnings[].coderequiredstringStable. New values may be added, such as gtin_dropped, image_failed, image_budget, image_host or too_many_images.
warnings[].messagerequiredstring

Responses

  • 200What was done with the product: created, updated, linked (it adopted a product the business already had with that SKU or barcode), unchanged, or skipped (the seller excluded or deleted it).
  • 400The body is not valid JSON (malformed_json).
  • 401The token is missing, malformed, unknown, expired or revoked, or is not a member token (unauthenticated). The answer is the same in every case.
  • 403The token lacks the operation's scope (insufficient_scope), its owner is suspended (account_suspended) or hasn't verified their email (email_unverified), or you are on the business team without the role to use its products (insufficient_role). A write is also refused when the business's plan doesn't include selling (plan_required) or its commission is overdue (commission_overdue).
  • 404No such route or record (not_found). A business you have no role on, one your token is not bound to and one that does not exist look the same.
  • 409Another write to this business's products is still running (import_in_progress). Nothing was written; send it again after Retry-After.
  • 413The body is larger than the route allows, 64 KB or 1 MB on the product write routes (payload_too_large).
  • 415The body is not application/json (unsupported_media_type).
  • 422A field is invalid or unknown (validation_failed).
  • 429The token owner's limit is reached, or a batch needs more units than are left (rate_limited). Nothing was written.
  • 503The platform is busy (overloaded), the scope is paused (scope_disabled), or under maintenance (unavailable).
POST/businesses/{business}/products/batch

Create or replace up to 100 products

Needs the scope products:write

The same upsert as the single route, for 1 to 100 products and at most 1,000 variants in one call. Every product is written on its own: one that fails never undoes another. The answer is 200 with one result per product in the order you sent them, and a summary, even when every product failed; read the results.

A call that cannot be read (bad JSON types, an unknown field, a key sent twice, too many products) is a 422 for the whole call and nothing is written. Each product costs one unit of the daily limit, and a batch needs all its units left: otherwise it is refused whole with 429 before anything is written.

Parameters

FieldInTypeDescription
businessrequiredpathstring (uuid)The business's id, from GET /businesses.

Request body

FieldTypeDescription
productsrequiredarray of objects
products[].external_idrequiredstring | nullOptional here; if sent, the same as the key in the path.
products[].titlerequiredstring
products[].descriptionstring | nullPlain text; HTML is not interpreted.
products[].short_descriptionstring | nullOnly fills an empty field on the first send. It never overwrites what the seller wrote.
products[].brandstring | null
products[].statusrequiredactive | draft | archivedWhat you say about the product. The Souq decides what a buyer sees: a seller that is not enabled gets drafts, and archived stays archived.
products[].currencyrequiredstringISO 4217. A currency the marketplace doesn't sell in fails that product with unsupported_currency.
products[].product_category_idstring | null (uuid)A product subcategory. Only fills an empty field on the first send.
products[].optionsarray of stringOption names, such as Size. A product has at most 3.
products[].variantsrequiredarray of objects1 to 100 versions (a plain product is one). Several versions are written only while the marketplace has them switched on (variants_not_enabled).
products[].variants[].external_idrequiredstringYour variant key, unique within the product.
products[].variants[].option_valuesarray of stringOne value per option name of the product, in order.
products[].variants[].skustring | nullUnique within the business.
products[].variants[].gtinstring | nullA valid GTIN (8, 12, 13 or 14 digits). An invalid one is dropped with the warning gtin_dropped.
products[].variants[].pricerequiredintegerWhat a buyer pays, in minor units of the product's currency (cents; fils for JOD). For JOD it must be a multiple of 10 for now, or the product fails with precision_unsupported.
products[].variants[].compare_at_priceinteger | nullThe price it was before, when price is a sale price.
products[].variants[].quantityinteger | nullNull when you don't count stock; the variant is then always available.
products[].variants[].weight_gramsinteger | null
products[].variants[].image_urlstring | nullThe variant's photo, an https address. It is fetched like the product's photos.
products[].imagesarray of objectsUp to 12 photos. A product with an uploaded video holds 11: the extra photo is dropped with the warning too_many_images.
products[].images[].urlrequiredstringA public https address on the standard port, without a user name. It is fetched after your call, by us, once per address (an address already copied is not fetched again) up to a daily budget.
products[].images[].altstring | null

Response body (200)

FieldTypeDescription
resultsrequiredarray of objects
results[].external_idrequiredstring
results[].outcomerequiredstringcreated, updated, linked (it adopted a product the business already had), unchanged, skipped (see reason) or failed (see errors). New values may be added; ignore what you don't know.
results[].product_idrequiredstring | null (uuid)Null when nothing was written.
results[].statusrequiredactive | draft | archived | null
results[].awaiting_reviewrequiredboolean
results[].imagesrequiredstring | nullpending while the photos are fetched after your call, done, none when the product has no photo, null when nothing was written. A photo that could not be copied is a warning on the product (GET), and is tried again the next time you send it.
results[].missingrequiredarray of stringWhat the seller still has to add in the dashboard, such as photo or category.
results[].reasonrequiredstring | nullFor skipped, excluded (the seller took the product back) or removed (they deleted it).
results[].errorsrequiredarray of objects
results[].errors[].fieldrequiredstring
results[].errors[].coderequiredstringStable. invalid_field, sku_taken, too_many_options, too_many_variants, no_variants, variants_not_enabled, unsupported_currency, precision_unsupported, invalid_price, over_limit, ambiguous_match, managed_by_source. New values may be added.
results[].errors[].messagerequiredstring
results[].warningsrequiredarray of objects
results[].warnings[].fieldrequiredstringDot path to the field, relative to the product (variants.0.gtin, images). Whole-call 422 errors use the full path (products.3.variants.0.gtin).
results[].warnings[].coderequiredstringStable. New values may be added, such as gtin_dropped, image_failed, image_budget, image_host or too_many_images.
results[].warnings[].messagerequiredstring
summaryrequiredobjectHow many products ended each way. New outcomes may be added.

Responses

  • 200One result per product, in request order.
  • 400The body is not valid JSON (malformed_json).
  • 401The token is missing, malformed, unknown, expired or revoked, or is not a member token (unauthenticated). The answer is the same in every case.
  • 403The token lacks the operation's scope (insufficient_scope), its owner is suspended (account_suspended) or hasn't verified their email (email_unverified), or you are on the business team without the role to use its products (insufficient_role). A write is also refused when the business's plan doesn't include selling (plan_required) or its commission is overdue (commission_overdue).
  • 404No such route or record (not_found). A business you have no role on, one your token is not bound to and one that does not exist look the same.
  • 409Another write to this business's products is still running (import_in_progress). Nothing was written; send it again after Retry-After.
  • 413The body is larger than the route allows, 64 KB or 1 MB on the product write routes (payload_too_large).
  • 415The body is not application/json (unsupported_media_type).
  • 422A field is invalid or unknown (validation_failed).
  • 429The token owner's limit is reached, or a batch needs more units than are left (rate_limited). Nothing was written.
  • 503The platform is busy (overloaded), the scope is paused (scope_disabled), or under maintenance (unavailable).

Changelog

Every change to the API, newest first. Removals are announced here before they happen.

Version 1 (beta)

1.0.0-beta
  • Read your businesses: GET /businesses.
  • Read the products of a business, a page at a time or one by one: GET /businesses/{business}/products and GET /businesses/{business}/products/{product}.
  • Create or replace one product by your own key: PUT /businesses/{business}/products/by-external-id/{external_id}.
  • Create or replace up to 100 products in one call: POST /businesses/{business}/products/batch.
  • Photos by https address, fetched after the call. Rate limits in requests per minute and units per day.