How to integrate Zoho Zakya — The modern Retail POS, to your eCommerce platform
What is Zakya
Zoho Corporation’s Zakya is a a unified retail solution that will enable SMEs to manage their operation, including POS, inventory and shipping.
Sridhar Vembu the CEO of Zoho has launched the next milestone Zakya Modern retail POS, in India. Him about Zakya on X,
Zakya our new retail Point of Sale solution is now ready! The seed for this came from my brother and co-founder Kumar and his GoFrugal. With Zakya for retail and Zoho Commerce along with Zoho Inventory in the backend, and the full accounting solution in Zoho Finance, we have a world-class suite!
Why to integrate Zakya in your eCommerce Solution?
Integrating Zakya into your eCommerce platform is a game-changer for managing retail operations seamlessly. Zakya’s unified system allows you to efficiently handle inventory management, sales order processing, and point-of-sale operations in one place. By integrating Zakya, you can sync your online and offline sales, keep real-time track of stock levels, and order management, which ensures a smooth customer experience. Additionally, with Zoho Commerce, Zoho Inventory, and Zoho Finance as part of the ecosystem, you can streamline your financial tracking and reporting, making your business operations more efficient and scalable.
Okay,! Then here are the steps
Step 1: Registering New Client
You will have to first register your application with Zoho’s Developer console in order get your Client ID and Client Secret.
To register your application, go to https://accounts.zoho.com/developerconsole and click on Add Client ID. Provide the required details to register your application.
On successful registration, you will be provided with a set of OAuth 2.0 credentials such as a Client ID and Client Secret.
Step 2: Generating Grant Token
Redirect to the following authorization URL with the given params in a browser window
Example
https://accounts.zoho.com/oauth/v2/auth?scope=ZohoPOSAPI.FullAccess.ALL,ZohoPOSAPI.salesorders.CREATE&client_id=1000.xxxxxxxxxxxx&state=testing&response_type=code&redirect_uri=https://yourdomain.com&access_type=offline
On this request, you will be shown with a “user consent page”.
Upon clicking “Accept”, Zoho will redirect to the given redirect_uri with code and state param.
Heads up! The code is valid for 60 seconds.
Step 3: Generate Access And Refresh Token
After getting code from the above step, make a POST request for the following URL with given params, to generate the access_token.
Sample URL
curl --location --request POST 'https://accounts.zoho.in/oauth/v2/token?code=1000.ccxxxx.xxxx&client_id=1000.xxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxxxxx&redirect_uri=https%3A%2F%2Fyourdomain.com&grant_type=authorization_code&scope=ZohoPOSAPI.FullAccess.ALL%2CZohoPOSAPI.salesorders.CREATE'
Step 4: Generate Access Token From Refresh Token
Access Tokens have limited validity. In most general cases the access tokens expire in one hour. Until then, the access token has unlimited usage. Once it expires, your app will have to use the refresh token to request for a new access token. Redirect to the following POST URL with the given params to get a new access token
Sample URL request
curl --location --request POST 'https://accounts.zoho.in/oauth/v2/token?refresh_token=1000.xxxxxxxxxxxx.xxxxxxxxxxxx&client_id=1000.xxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxxxxx&grant_type=refresh_token&scope=ZohoPOSAPI.FullAccess.ALL%2CZohoPOSAPI.salesorders.CREATE&redirect_uri=https%3A%2F%2Fyourdomain.com'
Now you can call APIs. Ready?
Case 1: Getting Zakia Items with pagination
Sample URL request
curl --location 'https://app.zakya.in/posapi/api/v1/items?organization_id=xxxxxx&page=1&per_page=200&last_modified_time=2024-09-19T09%3A18%3A18%2B0530' \
--header 'Authorization: Zoho-oauthtoken 1000.xxxxx.xxxxxx
Here the Authorization key is your access token
Please note this api call will list you items that got changed after the provided last_modified_time. The advantage of such a filtration is that you will only receive a limited number of products for sync.
Process the received json data and sync with your ecommerce database. This can be done in any server side language or even in SQL Server. Refer this if you wish to learn more
Case 2: Posting a Sales Order
posting a sales order involves the preparation of order items in a specific format
sample URL request can be seen below
curl --location 'https://app.zakya.in/posapi/api/v1/salesorders?organization_id=ccccccc' \
--header 'Authorization: Zoho-oauthtoken cccccccccccccccxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"customer_id": "1417795000xx",
"date": "2024-05-23",
"reference_number": "REF-ORD5599847086",
"custom_fields": [
{
"api_name": "cf_customername",
"value": "Kiran K"
}
],
"line_items": [
{
"name": "MILK 500ml",
"description": "MILK 500ml",
"rate": 28.00,
"quantity": 2.00,
"discount": 6.0000,
"unit": "qty",
"tax_percentage": 0.0,
"item_total": 50.00
}
],
"is_inclusive_tax": true,
"discount_type": "item_level",
"shipping_charge": 0.00,
"billing_address_id": "1417795000000121009",
"shipping_address_id": "1417795000000121011"
}'
Please note here customer_id, billing_address_id and shipping_address_id are ids of corresponding entities at Zakia portal.
That’s it. Congratulations on taking the step toward modernizing your retail operations! By integrating Zakya with your eCommerce platform, you’re setting your business up for seamless inventory management and streamlined sales processing. We encourage you to give Zakya a try and experience the difference it can make in simplifying your operations. If you have any eCommerce integration needs or want expert assistance, feel free to reach out to our team at intertoons.
Recommended Posts
How to bulk update Stock & Price of Shopify items via API
December 2, 2024
Key Trends Shaping the Future of eCommerce in 2025 and Beyond
November 11, 2024