This guide will show you how to connect Zid to API2Cart in just a few steps.

To integrate with the Zid platform, follow the instructions below.

Step 1: Create a Zid Application

To get the required credentials, you need a Zid developer account. Open the Zid Partner Dashboard, go to My Apps and create a new application.

Create new application in Zid Partner Dashboard for API2Cart integration

When creating the application, Zid asks you to choose the application type. Select Private/Public Application, which is the first option.

Zid application type selection — choose Private/Public Application

Step 2: Configure the Application and Select Scopes

Fill in the required foundational fields for your application. Some fields must be filled out in both English and Arabic.

Fill in the Zid application information

On the next page, you'll need to select your app's scopes and fill the description field. You can find the full list of necessary scopes for API2Cart methods in the table at the end of this guide. This page also contains the Client ID and Client Secret. Copy and securely store these credentials, as they are mandatory for the next steps.

Select the necessary Zid scopes

Next, fill in the detailed information about the application.

Complete the Zid application details

On the next page, Webhook Subscriptions, you don't need to fill out anything

Zid application page that does not require configuration

On the next page, you can configure a paid subscription for the application when needed.

Configure a Zid application subscription

Step 3: Prepare the Application for Installation

To install the application on a live store, it must first be approved by the Zid team. Until the application is approved, it can only be installed on a Development Store.

Before using the authorization URL for a Development Store, install the application once by clicking the installation button in the application dashboard (page Application Details ).

Install the application on a Development Store from the Zid application dashboard

Step 4: Generate the Authorization URL

Generate the URL used to add the application to the store using the credentials from the previous steps.

https://oauth.zid.sa/oauth/authorize?client_id=<client_id>&redirect_uri=<callback_url>&response_type=code

The value of the redirect_uri parameter must be the application's Callback URL, not the Redirection URL displayed in the application dashboard.

Callback URL field in the Zid application dashboard

Step 5: Authorize the Application and Obtain the Code

Open the generated authorization URL in a browser and grant the access requested by the application.

Authorize the Zid application

After authorization, Zid redirects to the Callback URL. The browser address bar will contain the authorization code.

Authorization code returned to the Zid Callback URL

Step 6: Exchange the Code for Tokens

Send the following server-to-server request to exchange the authorization code for tokens:

curl -X POST https://oauth.zid.sa/oauth/token \
-H 'Content-Type: application/json' \
-d '{
  "grant_type": "authorization_code",
  "client_id": <APP_ID>,
  "client_secret": <APP_SECRET>,
  "redirect_uri": <CALLBACK_URL>,
  "code": <CODE>
}'

A successful response contains access_token, authorization, and refresh_token.

Zid OAuth token response

Step 7: Connect Zid to API2Cart

Open the API2Cart connection form and enter the corresponding Zid credentials and tokens.

Connect a Zid store to API2Cart

Table of Required Zid OAuth Scopes for API2Cart Methods

Below is the comprehensive list of Zid OAuth scopes required to execute specific API2Cart methods.

API2Cart Method Required Zid OAuth Scopes
cart.validate Account — Read
account.cart.add Account — Read
account.config.update Account — Read
cart.delete
cart.info Account — Read; Inventory — Read
cart.script.list Account — Read; Extra Addons — Read
cart.script.add Account — Read; Extra Addons — Read & Write
cart.script.delete Account — Read; Extra Addons — Read & Write
cart.coupon.list Account — Read; Coupons — Read
cart.coupon.count Account — Read; Coupons — Read
cart.coupon.add Account — Read; Coupons — Read & Write; Products — Read; Countries & Cities — Read; Delivery Options — Read
cart.coupon.condition.add Account — Read; Coupons — Read & Write; Products — Read; Countries & Cities — Read; Delivery Options — Read
cart.coupon.delete Account — Read; Coupons — Read & Write
product.count Account — Read; Products — Read
product.list Account — Read; Products — Read
product.info Account — Read; Products — Read
product.add Account — Read; Products — Read & Write; Inventory — Read & Write
product.update Account — Read; Products — Read & Write
product.delete Account — Read; Products — Read & Write
product.image.add Account — Read; Products — Read & Write
product.image.update Account — Read; Products — Read & Write
product.image.delete Account — Read; Products — Read & Write
product.child_item.list Account — Read; Products — Read
product.child_item.info Account — Read; Products — Read
product.review.list Account — Read; Products — Read
product.variant.add Account — Read; Products — Read & Write; Inventory — Read & Write
product.variant.update Account — Read; Products — Read & Write; Inventory — Read & Write
product.variant.delete Account — Read; Products — Read & Write
product.variant.image.add Account — Read; Products — Read & Write
product.variant.image.delete Account — Read; Products — Read & Write
product.update.batch Account — Read; Products — Read & Write
product.variant.add.batch Account — Read; Inventory — Read & Write; Products — Read & Write
product.variant.update.batch Account — Read; Inventory — Read & Write; Products — Read & Write
product.variant.delete.batch Account — Read; Products — Read & Write
category.list Account — Read; Products — Read
category.info Account — Read; Products — Read
category.add Account — Read; Products — Read & Write
category.update Account — Read; Products — Read & Write
category.assign Account — Read; Products — Read & Write
category.unassign Account — Read; Products — Read & Write
order.count Account — Read; Orders — Read
order.list Account — Read; Orders — Read; Countries & Cities — Read
order.info Account — Read; Orders — Read; Countries & Cities — Read
order.update Account — Read; Orders — Read & Write
order.status.list Account — Read
order.financial_status.list Account — Read
order.abandoned.list Account — Read; Abandoned Carts — Read
order.shipment.list Account — Read; Orders — Read
order.shipment.info Account — Read; Orders — Read
order.shipment.tracking.add Account — Read; Orders — Read & Write
customer.count Account — Read; Customers — Read
customer.list Account — Read; Customers — Read
customer.info Account — Read; Customers — Read
attribute.list Account — Read; Products — Read
attribute.info Account — Read; Products — Read
attribute.count Account — Read; Products — Read
attribute.add Account — Read; Products — Read & Write
attribute.update Account — Read; Products — Read & Write
attribute.delete Account — Read; Products — Read & Write
attribute.value.add Account — Read; Products — Read & Write
attribute.value.update Account — Read; Products — Read & Write
attribute.value.delete Account — Read; Products — Read & Write
tax.class.info Account — Read; Vats — Read
webhook.create Account — Read; Webhooks — Read & Write
webhook.list Account — Read; Webhooks — Read
webhook.count Account — Read; Webhooks — Read
webhook.update Account — Read
webhook.delete Account — Read; Webhooks — Read & Write
webhook.events Account — Read
batch.job.list Account — Read
batch.job.result Account — Read