๐งโ๐ผ API Clients
This module groups together the endpoints linked to customer management (authentication, user info, shopping cart, payments, etc
๐ฑ Currency Update
A new header store-currency has been added to all payment and product endpoints. - It accepts a currency code (e.g., MAD, USD, EUR). - If omitted, the default currency will be applied automatically.
โ
Using the correct currency ensures **accurate pricing**, **correct discount calculations**, and better consistency across your API.
Base URL Notice
The base URL for these endpoints depends on the subdomain of your store.
For example, if your store is accessible at https://test10.devaito.com,
then your API base URL will be:
https://test10.devaito.com/api
๐ Customer Authentication
POST /login-customer
Authenticates an existing customer and returns an access token.
Token Requirement
๐ No authentication required
Request body:
{
"email": "userFalah1@gmail.com",
"password": "userFalah1@gmail.com"
}
Example response:
{
"success": true,
"token": "325|hrY289rdJ9Y1MvnXVB45lQ9dQkvdlAeWhvt88kBe"
}
POST /register-customer
Registers a new customer account and returns a token.
Token Requirement
๐ No authentication required
Request body:
{
"name": "test",
"email": "testq1q23q214112234@test.com",
"phone": "12313123123",
"password": "test234234",
"password_confirmation": "test234234"
}
Example response :
{
"success": true,
"user": {
"image": null,
"name": "test",
"email": "testq1q23q214112234@test.com",
"id": 12,
"uid": null,
"phone_with_code": "12313123123",
"phone_code": null,
"phone": "12313123123",
"verified_at": null
},
"token": "327|yZGp2fGZcvmdwQNH4Mo29giyEb0fJrPkGHHtE3a9"
}
๐ฆ Orders
Token Requirement
๐ authentication required For all endpoint related to order
POST Order Cancle /order/cancel
by using this endpoint you well have the ability to cancel order
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization |
string | yes | token of the customer |
Body
| Name | Type | Required | Description |
|---|---|---|---|
order_id |
integer | yes | order id of the order |
{
"success": true
}
GET Order details /order-details/{order_id}
by using this endpoint you well have the ablity to get detaills order
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization |
string | yes | token of the customer |
{
"data": {
"id": 7,
"order_code": "iv-062301251217",
"payment_status": 2,
"payment_status_label": "unpaid",
"delivery_status_label": "cancelled",
"payment_method": "Cash On Delivery",
"delivery_status": 4,
"sub_total": 45.02,
"total_tax": 0,
"total_delivery_cost": 0,
"total_discount": 0,
"total_payable_amount": 45.02,
"order_date": "17 Dec 2025 06:23:01 AM",
"pickup_point": null,
"billing_details": null,
"shipping_details": null,
"products": {
"data": [
{
"id": 7,
"product_id": 6,
"name": "test customizable",
"permalink": "test-customizable",
"variant": null,
"unit_price": 45.02,
"quantity": 1,
"shipping_cost\t": 0,
"tax": 0,
"image": "default-product.jpg",
"return_status": {
"status": 1,
"class": "warning",
"label": "Not available"
},
"can_return": 2,
"can_cancel": 2,
"delivered_date": null,
"delivery_status": 4,
"tracking_list": [
{
"message": "Delivery status is updated",
"date": "2025-12-17 08:13:23"
},
{
"message": "Delivery status is updated",
"date": "2025-12-17 08:13:17"
},
{
"message": "Your order has been cancelled",
"date": "2025-12-17 06:45:55"
},
{
"message": "Thank you for shopping. Your order is being verified",
"date": "2025-12-17 06:23:01"
}
],
"shipping": null,
"attachment": "/public/storage/all_files/2023/Feb/img-demo (1).jpg",
"estimate_delivery_time": null,
"shop": null
}
]
},
"can_cancel": 2,
"note": null,
"payment_required": 2
},
"success": true,
"status": 200
}
GET Orders users /order
by using this endpoint you well have the ability to get all order of user
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization |
string | yes | token of the customer |
{
"data": [
{
"id": 12,
"order_code": "iv-080530251217",
"total_payable_amount": 4.502,
"total_products": 1,
"order_date": "17 Dec 2025 08:05:30 AM"
},
{
"id": 11,
"order_code": "iv-064104251217",
"total_payable_amount": 45.02,
"total_products": 1,
"order_date": "17 Dec 2025 06:41:04 AM"
},
{
"id": 9,
"order_code": "iv-063519251217",
"total_payable_amount": 45.02,
"total_products": 1,
"order_date": "17 Dec 2025 06:35:19 AM"
},
{
"id": 7,
"order_code": "iv-062301251217",
"total_payable_amount": 45.02,
"total_products": 1,
"order_date": "17 Dec 2025 06:23:01 AM"
},
{
"id": 5,
"order_code": "iv-055219251217",
"total_payable_amount": 45.02,
"total_products": 1,
"order_date": "17 Dec 2025 05:52:19 AM"
},
{
"id": 4,
"order_code": "iv-054127251217",
"total_payable_amount": 199.99,
"total_products": 1,
"order_date": "17 Dec 2025 05:41:27 AM"
},
{
"id": 3,
"order_code": "iv-054113251217",
"total_payable_amount": 199.99,
"total_products": 1,
"order_date": "17 Dec 2025 05:41:13 AM"
},
{
"id": 2,
"order_code": "iv-054102251217",
"total_payable_amount": 199.99,
"total_products": 1,
"order_date": "17 Dec 2025 05:41:02 AM"
}
],
"links": {
"first": "https://justfortesting.devaito.com/api/order?page=1",
"last": "https://justfortesting.devaito.com/api/order?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://justfortesting.devaito.com/api/order?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://justfortesting.devaito.com/api/order",
"per_page": 15,
"to": 8,
"total": 8
},
"success": true,
"status": 200
}
๐ฆ Products
Token Requirement
๐ No authentication required For all endpoint related to products
GET /fetch-all-products-category ๐ข
By using this endpoint you well be able to fetch all products that existe on a specific category Using her slug
Headers
| Name | Type | Required | Description |
|---|---|---|---|
store-currency |
string | no | store currency of your app , for example if your store using USD as currency you should send USD as value |
params
| Name | Type | Required | Description |
|---|---|---|---|
slug |
string | yes | slug of the category you can get the slug from the category endpoint |
page |
integer | No | Page number to retrieve (default: 1) |
per_page |
integer | No | Number of items per page (default: 8) |
{
"products": [
{
"id": 8,
"name": "Salade Cesar Classique",
"image": "https://test10.devaito.com/public/tenant/tenant9075b507-8538-4d3e-8db8-d7affee7e55b/68bb5a7230cac_image__1593617074735380.jpg",
"price": 70,
"devise": "$",
"url": "https://test10.devaito.com/product/salade-cesar-classique-3",
"discount_type": 0,
"discount_amount": 0,
"brand_name": null,
"brand_logo": null
},
{
"id": 9,
"name": "Salade Buddha Veggie",
"image": "https://test10.devaito.com/public/tenant/tenant9075b507-8538-4d3e-8db8-d7affee7e55b/68bb5a728dfbf_image__1598950002292413.jpg",
"price": 65,
"devise": "$",
"url": "https://test10.devaito.com/product/salade-buddha-veggie-4",
"discount_type": 0,
"discount_amount": 0,
"brand_name": null,
"brand_logo": null
},
{
"id": 10,
"name": "Salade Chevre Croustillant",
"image": "https://test10.devaito.com/public/tenant/tenant9075b507-8538-4d3e-8db8-d7affee7e55b/68bb5a72d6ace_image__1598947582077413.jpg",
"price": 70,
"devise": "$",
"url": "https://test10.devaito.com/product/salade-chevre-croustillant-5",
"discount_type": 0,
"discount_amount": 0,
"brand_name": null,
"brand_logo": null
},
{
"id": 6,
"name": "Salade Nordique",
"image": "https://test10.devaito.com/public/tenant/tenant9075b507-8538-4d3e-8db8-d7affee7e55b/68bb5a715ec82_image__1593617139550380.jpg",
"price": 75,
"devise": "$",
"url": "https://test10.devaito.com/product/salade-nordique-1",
"discount_type": 0,
"discount_amount": 0,
"brand_name": null,
"brand_logo": null
},
{
"id": 7,
"name": "Salade Bowl Atlantique",
"image": "https://test10.devaito.com/public/tenant/tenant9075b507-8538-4d3e-8db8-d7affee7e55b/68bb5a71ce59b_image__1593616999509380.jpg",
"price": 85,
"devise": "$",
"url": "https://test10.devaito.com/product/salade-bowl-atlantique-2",
"discount_type": 0,
"discount_amount": 0,
"brand_name": null,
"brand_logo": null
}
],
"current_page": 1,
"last_page": 1,
"category_selected_name": "Maxi salades"
}
GET /popular-products
this endpoint will return a list of popular products based on the number of sales
Headers
| Name | Type | Required | Description |
|---|---|---|---|
store-currency |
string | no | store currency of your app , for example if your store using USD as currency you should send USD as value |
params
| Name | Type | Required | Description |
|---|---|---|---|
page |
integer | No | Page number to retrieve (default: 1) |
per_page |
integer | No | Number of items per page (default: 8) |
{
"success": true,
"data": [
{
"id": 2,
"name": "Universal Language Translator",
"permalink": "httpsexamplecomuniversal-language-translator",
"thumbnail_image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"orders_count": 0,
"orders_sum_unit_price": null,
"orders_sum_quantity": null
},
{
"id": 3,
"name": "English Grammar Workbook",
"permalink": "httpsexamplecomenglish-grammar-workbook",
"thumbnail_image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"orders_count": 0,
"orders_sum_unit_price": null,
"orders_sum_quantity": null
},
{
"id": 4,
"name": "Interactive English Vocabulary App",
"permalink": "httpsexamplecominteractive-english-vocabulary-app",
"thumbnail_image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"orders_count": 0,
"orders_sum_unit_price": null,
"orders_sum_quantity": null
},
{
"id": 5,
"name": "English Idioms and Phrases Guide",
"permalink": "httpsexamplecomenglish-idioms-and-phrases-guide",
"thumbnail_image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"orders_count": 0,
"orders_sum_unit_price": null,
"orders_sum_quantity": null
},
{
"id": 6,
"name": "Wooden Handle Steel Gardening Tools Small Shovel",
"permalink": "wooden-handle-steel-gardening-tools-small-shovel",
"thumbnail_image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f744b306031_5f6aac0d-1764-41b4-ac74-601c34ee52f5.jpg",
"orders_count": 0,
"orders_sum_unit_price": null,
"orders_sum_quantity": null
},
{
"id": 7,
"name": "Trendy Retro Hand Women's Bag Korean Style Niche",
"permalink": "trendy-retro-hand-womens-bag-korean-style-niche",
"thumbnail_image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f744c974868_6714bb43-bce4-471d-b5b0-24e6e587a6a8.jpg",
"orders_count": 0,
"orders_sum_unit_price": null,
"orders_sum_quantity": null
},
{
"id": 8,
"name": "Retro Plus Size Loose Sports Knee Length Shorts",
"permalink": "retro-plus-size-loose-sports-knee-length-shorts",
"thumbnail_image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f7559e8d04d_83428bac-0d0c-42eb-96c0-bbecd5b8a71e.jpg",
"orders_count": 0,
"orders_sum_unit_price": null,
"orders_sum_quantity": null
},
{
"id": 9,
"name": "pizza",
"permalink": "pizza",
"thumbnail_image": "https://treasurex.devaito.com/public//tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/2025/Oct/YYXLfDGHIkqaotWtDNotiujt9P3gNmJvs07pni7P.webp",
"orders_count": 0,
"orders_sum_unit_price": null,
"orders_sum_quantity": null
}
],
"pagination": {
"items_per_page": 10,
"total_items": 8,
"current_page": 1,
"total_pages": 1
}
}
GET /product-details/{slug}
important note
This endpoint has two type of response (output):
- If the product is basic product , it well return product details with a specific format.
- If the product is customizable product , it well return product details with a specific format.
to know which format you need to use you need to read at first this key in the response product_type , how tell you which type of product you have in the example below you well have the response with the format of customizable product and basic product
Headers
| Name | Type | Required | Description |
|---|---|---|---|
store-currency |
string | no | store currency of your app , for example if your store using USD as currency you should send USD as value |
Example response of basic product:
{
"success": true,
"product_type": "customizable",
"product": {
"id": 103,
"name": "MENU BOSTON BRGR (SPICY)",
"thumbnail": "https://picksssss.devaito.com/public/tenant/tenant10e9818b-3e6f-4ae4-aa41-3fd5035d8c0b/2025/08/screenshot-2025-07-23-124317-68907f0ba8053.jpg",
"gallery": [
"https://picksssss.devaito.com/public/tenant/tenant10e9818b-3e6f-4ae4-aa41-3fd5035d8c0b/2025/08/screenshot-2025-07-23-124317-68907f0ba8053.jpg"
],
"base_price": 7.5,
"oldPrice": 0,
"quantity": 0,
"description": null,
"options_groups": [
{
"id": 626,
"group_name": "FAITES VOTRE CHOIX",
"min_options": 1,
"max_options": 1,
"options": [
{
"id": 4559,
"option_name": "FRITES",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4560,
"option_name": "POUTINE",
"price": "1.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4561,
"option_name": "CHEEZY FRIES",
"price": "1.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4562,
"option_name": "CHICKN POUTINE",
"price": "2.00",
"stock": 1000,
"qty_max": 1
}
]
},
{
"id": 627,
"group_name": "BOISSONS",
"min_options": 1,
"max_options": 1,
"options": [
{
"id": 4563,
"option_name": "MILKSHAKE FRAISE",
"price": "1.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4564,
"option_name": "PEPSI",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4565,
"option_name": "MIRINDA ORANGE",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4566,
"option_name": "MIRINDA CITRON",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4567,
"option_name": "7UP",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4568,
"option_name": "MIRINDA TROPICAL",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4569,
"option_name": "WATER 33CL",
"price": "0.00",
"stock": 1000,
"qty_max": 1
}
]
},
{
"id": 628,
"group_name": "EXTRA",
"min_options": 0,
"max_options": 5,
"options": [
{
"id": 4570,
"option_name": "EXTRA EMMENTAL",
"price": "0.50",
"stock": 1000,
"qty_max": 1
},
{
"id": 4571,
"option_name": "EXTRA BOEUF",
"price": "1.50",
"stock": 1000,
"qty_max": 1
},
{
"id": 4572,
"option_name": "EXTRA JALAPENOS",
"price": "0.50",
"stock": 1000,
"qty_max": 1
},
{
"id": 4573,
"option_name": "EXTRA CRISPY CHICKEN",
"price": "1.50",
"stock": 1000,
"qty_max": 1
},
{
"id": 4574,
"option_name": "EXTRA CHEDDAR",
"price": "0.50",
"stock": 1000,
"qty_max": 1
},
{
"id": 4575,
"option_name": "EXTRA CHAMPIGNONS SAUTรS",
"price": "0.50",
"stock": 1000,
"qty_max": 1
},
{
"id": 4576,
"option_name": "EXTRA OIGNONS CARAMELISEES",
"price": "0.50",
"stock": 1000,
"qty_max": 1
},
{
"id": 4577,
"option_name": "EXTRA ลUF A CHEVAL",
"price": "0.50",
"stock": 1000,
"qty_max": 1
},
{
"id": 4578,
"option_name": "EXTRA BACON HALAL",
"price": "1.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4579,
"option_name": "EXTRA SAUCE",
"price": "0.30",
"stock": 1000,
"qty_max": 1
},
{
"id": 4580,
"option_name": "TOMATE",
"price": "0.25",
"stock": 1000,
"qty_max": 1
},
{
"id": 4581,
"option_name": "SALADE",
"price": "0.25",
"stock": 1000,
"qty_max": 1
}
]
},
{
"id": 629,
"group_name": "PERSONNALISEZ VOTRE BURGER",
"min_options": 0,
"max_options": 5,
"options": [
{
"id": 4582,
"option_name": "SANS FROMAGE",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4583,
"option_name": "SANS OIGNION",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4584,
"option_name": "SANS OIGNION",
"price": "0.00",
"stock": 1000,
"qty_max": 1
},
{
"id": 4585,
"option_name": "SANS SAUCE",
"price": "0.00",
"stock": 1000,
"qty_max": 1
}
]
}
],
"has_options": 1,
"symbol_devise": "$"
}
}
Example response of basic product:
{
"success": true,
"product_type": "standard",
"product": {
"id": 108,
"name": "PISTACHE FRAMBOISE",
"brand": null,
"summary": null,
"description": null,
"product_type": 1,
"supplier": 4,
"permalink": "pistache-framboise",
"unit": null,
"conditions": null,
"has_variant": 2,
"discount_type": 2,
"discount_amount": null,
"pdf_specifications": null,
"thumbnail_image": "174",
"video_link": null,
"is_featured": 2,
"max_item_on_purchase": null,
"min_item_on_purchase": null,
"low_stock_quantity_alert": null,
"is_authentic": 2,
"has_warranty": 2,
"has_replacement_warranty": 2,
"warrenty_days": null,
"is_refundable": 2,
"shipping_location_type": null,
"is_active_cod": 1,
"is_active_free_shipping": 2,
"cod_location_type": "anywhere",
"is_active_attatchment": 2,
"attatchment_name": null,
"shipping_cost": 0,
"is_apply_multiple_qty_shipping_cost": 2,
"is_enable_tax": 1,
"tax_profile": null,
"status": 1,
"id_cj": null,
"profil_imported_countries": null,
"has_options": 0,
"created_at": "2025-07-24 11:51:13",
"updated_at": "2025-08-09 17:27:11",
"is_approved": 1,
"id_lacaisse": null
},
"colorImages": [],
"attributes": [],
"colorsSectionNew": [],
"prices": {
"id": 108,
"product_id": 108,
"sku": null,
"purchase_price": null,
"unit_price": 8,
"quantity": 0,
"created_at": "2025-07-24 11:51:13",
"updated_at": "2025-08-06 14:29:21"
},
"discount_type": 2,
"amount_discount": null,
"has_color": false,
"has_color_photo": false,
"thumbnail_image": "/tenant/tenant10e9818b-3e6f-4ae4-aa41-3fd5035d8c0b/2025/Jul/G4hKuday2XXOeMr1RBXpWEInStKU1bU1U3k2skWX.webp",
"galleryImagesLeft": [
{
"image_path": "/tenant/tenant10e9818b-3e6f-4ae4-aa41-3fd5035d8c0b/2025/Jul/G4hKuday2XXOeMr1RBXpWEInStKU1bU1U3k2skWX.webp",
"upload_id": 174
}
],
"symbol_devise": "$",
"has_variant": 2,
"variantsDataNew": null,
"variantsDataPrice": [],
"categories": [
{
"id": 21,
"name": "CHOCOLAT"
}
],
"total_reviews": 0,
"average_rating": 0
}
GET /fetch-categories
Return all product categories
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page |
integer | No | Page number to retrieve (default: 1) |
per_page |
integer | No | Number of items per page (default: 10) |
Example response:
{
"success": true,
"entities": [
{
"id": 9,
"name": "Home Improvement",
"url": "home-improvement",
"slug": "home-improvement",
"image": "/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 12,
"name": "Bags & Shoes",
"url": "bags-shoes",
"slug": "bags-shoes",
"image": "/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 15,
"name": "Men's Clothing",
"url": "mens-clothing",
"slug": "mens-clothing",
"image": "/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 1,
"name": "Electronics",
"url": "electronics",
"slug": "electronics",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 2,
"name": "Home & Garden",
"url": "home-garden",
"slug": "home-garden",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 3,
"name": "Fashion",
"url": "fashion",
"slug": "fashion",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 4,
"name": "Beauty & Personal Care",
"url": "beauty-personal-care",
"slug": "beauty-personal-care",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 5,
"name": "Sports & Outdoors",
"url": "sports-outdoors",
"slug": "sports-outdoors",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 6,
"name": "Toys & Games",
"url": "toys-games",
"slug": "toys-games",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg"
},
{
"id": 7,
"name": "Books & Stationery",
"url": "books-stationery",
"slug": "books-stationery",
"image": "/public/storage/all_files/2023/Mar/img-demo_17.jpg"
}
],
"items_per_page": 10,
"total_items": 11,
"current_page": 1,
"total_pages": 2
}
GET /fetch-all-products
Return all products with a pagination that you can use to fetch more data
To switch between pages , use the page query parameter.
example of format :
https://picksssss.devaito.com/api/fetch-all-products?page=2
Headers
| Name | Type | Required | Description |
|---|---|---|---|
store-currency |
string | no | store currency of your app , for example if your store using USD as currency you should send USD as value |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page |
integer | No | Page number to retrieve (default: 1) |
per_page |
integer | No | Number of items per page (default: 8) |
Example response:
{
"success": true,
"products": [
{
"id": 9,
"name": "pizza",
"slug": "pizza",
"image": "https://treasurex.devaito.com/public//tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/2025/Oct/YYXLfDGHIkqaotWtDNotiujt9P3gNmJvs07pni7P.webp",
"price": "0.00",
"devise": "MAD",
"url": "https://treasurex.devaito.com/product/pizza",
"discount_type": 2,
"discount_amount": null,
"brand_name": null,
"brand_logo": null,
"categories": []
},
{
"id": 8,
"name": "Retro Plus Size Loose Sports Knee Length Shorts",
"slug": "retro-plus-size-loose-sports-knee-length-shorts",
"image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f7559e8d04d_83428bac-0d0c-42eb-96c0-bbecd5b8a71e.jpg",
"price": "4.86",
"devise": "MAD",
"url": "https://treasurex.devaito.com/product/retro-plus-size-loose-sports-knee-length-shorts",
"discount_type": 0,
"discount_amount": 0,
"brand_name": null,
"brand_logo": null,
"categories": [
{
"id": 15,
"name": "Men's Clothing"
},
{
"id": 16,
"name": "Bottoms"
},
{
"id": 17,
"name": "Man Shorts"
}
]
},
{
"id": 7,
"name": "Trendy Retro Hand Women's Bag Korean Style Niche",
"slug": "trendy-retro-hand-womens-bag-korean-style-niche",
"image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f744c974868_6714bb43-bce4-471d-b5b0-24e6e587a6a8.jpg",
"price": "4.86",
"devise": "MAD",
"url": "https://treasurex.devaito.com/product/trendy-retro-hand-womens-bag-korean-style-niche",
"discount_type": 0,
"discount_amount": 0,
"brand_name": null,
"brand_logo": null,
"categories": [
{
"id": 12,
"name": "Bags & Shoes"
},
{
"id": 13,
"name": "Women's Luggage & Bags"
},
{
"id": 14,
"name": "Shoulder Bags"
}
]
},
{
"id": 6,
"name": "Wooden Handle Steel Gardening Tools Small Shovel",
"slug": "wooden-handle-steel-gardening-tools-small-shovel",
"image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f744b306031_5f6aac0d-1764-41b4-ac74-601c34ee52f5.jpg",
"price": "12.35",
"devise": "MAD",
"url": "https://treasurex.devaito.com/product/wooden-handle-steel-gardening-tools-small-shovel",
"discount_type": 0,
"discount_amount": 0,
"brand_name": null,
"brand_logo": null,
"categories": [
{
"id": 10,
"name": "Tools"
},
{
"id": 11,
"name": "Garden Tools"
},
{
"id": 9,
"name": "Home Improvement"
}
]
},
{
"id": 2,
"name": "Universal Language Translator",
"slug": "httpsexamplecomuniversal-language-translator",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"price": "49.99",
"devise": "MAD",
"url": "https://treasurex.devaito.com/product/httpsexamplecomuniversal-language-translator",
"discount_type": 2,
"discount_amount": null,
"brand_name": null,
"brand_logo": null,
"categories": [
{
"id": 1,
"name": "Electronics"
}
]
},
{
"id": 3,
"name": "English Grammar Workbook",
"slug": "httpsexamplecomenglish-grammar-workbook",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"price": "19.99",
"devise": "MAD",
"url": "https://treasurex.devaito.com/product/httpsexamplecomenglish-grammar-workbook",
"discount_type": 2,
"discount_amount": null,
"brand_name": null,
"brand_logo": null,
"categories": [
{
"id": 2,
"name": "Home & Garden"
}
]
},
{
"id": 4,
"name": "Interactive English Vocabulary App",
"slug": "httpsexamplecominteractive-english-vocabulary-app",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"price": "9.99",
"devise": "MAD",
"url": "https://treasurex.devaito.com/product/httpsexamplecominteractive-english-vocabulary-app",
"discount_type": 2,
"discount_amount": null,
"brand_name": null,
"brand_logo": null,
"categories": [
{
"id": 3,
"name": "Fashion"
}
]
},
{
"id": 5,
"name": "English Idioms and Phrases Guide",
"slug": "httpsexamplecomenglish-idioms-and-phrases-guide",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"price": "14.99",
"devise": "MAD",
"url": "https://treasurex.devaito.com/product/httpsexamplecomenglish-idioms-and-phrases-guide",
"discount_type": 2,
"discount_amount": null,
"brand_name": null,
"brand_logo": null,
"categories": [
{
"id": 4,
"name": "Beauty & Personal Care"
}
]
}
],
"items_per_page": 12,
"total_items": 8,
"current_page": 1,
"total_pages": 1
}
GET /search-products
Return search results of product using the provided query parameters.
To use this endpoint, you need to provide the following query parameters:
params
| Name | Type | Required | Description |
|---|---|---|---|
query |
String | yes | key world |
limit |
integer | No | Number of items per page (default: 5) |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
store-currency |
string | no | store currency of your app , for example if your store using USD as currency you should send USD as value |
example of format :
https://picksssss.devaito.com/api/search-products?query=pizza&limit=10
Example response:
{
"success": true,
"data": [
{
"product_name": "pizza",
"score": 0.4137763734340294,
"id_product": 9,
"permalink": "pizza",
"image_url": "https://treasurex.devaito.com/public//tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/2025/Oct/YYXLfDGHIkqaotWtDNotiujt9P3gNmJvs07pni7P.webp",
"price": 0,
"devise": "MAD"
},
{
"product_name": "Universal Language Translator",
"score": 0.3665048622163059,
"id_product": 2,
"permalink": "httpsexamplecomuniversal-language-translator",
"image_url": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"price": 49.99,
"devise": "MAD"
},
{
"product_name": "Trendy Retro Hand Women's Bag Korean Style Niche",
"score": 0.36506165778724786,
"id_product": 7,
"permalink": "trendy-retro-hand-womens-bag-korean-style-niche",
"image_url": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f744c974868_6714bb43-bce4-471d-b5b0-24e6e587a6a8.jpg",
"price": 4.86,
"devise": "MAD"
},
{
"product_name": "English Grammar Workbook",
"score": 0.3639645343396562,
"id_product": 3,
"permalink": "httpsexamplecomenglish-grammar-workbook",
"image_url": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"price": 19.99,
"devise": "MAD"
},
{
"product_name": "English Idioms and Phrases Guide",
"score": 0.3594667918624297,
"id_product": 5,
"permalink": "httpsexamplecomenglish-idioms-and-phrases-guide",
"image_url": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"price": 14.99,
"devise": "MAD"
}
],
"query": "burger",
"total_results": 5
}
๐ค User Information
POST /log-out-customer
By using this endpoint, you can log out from the application.
Token Requirement
๐ Requires authentication
Include your token in the Authorization header as follows:
Authorization: Bearer <token>
Response Example
{
"status": true
}
POST /update-profile-customer
By using this endpoint, you can update your profile information.
Token Requirement
๐ Requires authentication
Include your token in the Authorization header as follows:
Authorization: Bearer <token>
no params are required
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | user name |
phone |
string | Yes | phone number of user |
email |
string | Yes | email user (unique) |
image |
binary | no | profile image of the user |
{
"success": true,
"customer": {
"image": null,
"name": "falah test",
"email": "userFalah1@gmail.com",
"id": 7,
"uid": null,
"phone_with_code": "2342344534545",
"phone_code": null,
"phone": "2342344534545",
"verified_at": null
}
}
GET /user-customer
Returns the details of the currently authenticated customer.
Token Requirement
๐ Requires authentication
Include your token in the Authorization header as follows:
Authorization: Bearer <token>
Example response:
{
"success": true,
"user": {
"id": 2,
"uid": null,
"name": "falah",
"email": "userFalah1@gmail.com",
"image": 99,
"phone_code": null,
"phone": "2342344534545",
"reset_password": null,
"status": 2,
"verified_at": null,
"varification_code": null,
"is_logedin": 2,
"created_at": "2025-09-05T21:49:51.000000Z",
"updated_at": "2025-09-05T21:50:12.000000Z"
}
}
โ๏ธ Settings ๐ข
GET /get-info-store
by using this endpoint you will be able to get the info store including address, logo, and store name of your store
{
"success": true,
"data": {
"address": "1600 Amphitheatre Parkway, Mountain View, CA, USA",
"logo_light": "https://revive.devaito.com/public/tenant/tenantda38d915-ba56-4836-9647-93bde34cdcc0/2025/Nov/dK7P3rXh0TFOEjCfpUXhJ1YTOt2eb6BzbHHFuId5.webp",
"logo_dark": "https://revive.devaito.com/public/tenant/tenantda38d915-ba56-4836-9647-93bde34cdcc0/2025/Nov/dK7P3rXh0TFOEjCfpUXhJ1YTOt2eb6BzbHHFuId5.webp",
"store_name": "ReVive"
}
}
GET /get-theme-store
By using this endpoint you will be able to get the theme store including colors store and fonts store
{
"success": true,
"data": {
"h1": {
"font": "Poppins",
"light_color": "#FF6F00",
"dark_color": "#FF6F00"
},
"h2": {
"font": "Poppins",
"light_color": "#FF6F00",
"dark_color": "#FF6F00"
},
"h3": {
"font": "Poppins",
"light_color": "#FF6F00",
"dark_color": "#FF6F00"
},
"h4": {
"font": "Poppins",
"light_color": "#FF6F00",
"dark_color": "#FF6F00"
},
"paragraph": {
"font": "Inter",
"light_color": "333333",
"dark_color": "FFFFFF"
},
"button": {
"light_color": "#FFFFFF",
"dark_color": "#FFFFFF",
"light_bg": "#FF6F00",
"dark_bg": "#FF6F00"
},
"body": {
"light_bg": "#FFFFFF",
"dark_bg": "#333333"
}
}
}
GET /currency
By using this endpoint you can get the currency of the store
{
"success": true,
"data": [
{
"id": 1,
"name": "Us Dollar",
"code": "USD",
"symbol": "$",
"conversion_rate": 1,
"is_default": 0
},
{
"id": 6,
"name": "Euro",
"code": "Euro",
"symbol": "โฌ",
"conversion_rate": 1.3,
"is_default": 0
},
{
"id": 7,
"name": "Pound",
"code": "GBP",
"symbol": "ยฃ",
"conversion_rate": 1.25,
"is_default": 0
},
{
"id": 8,
"name": "Moroccan Dirham",
"code": "MAD",
"symbol": "MAD",
"conversion_rate": 10,
"is_default": 1
}
]
}
๐ณ Payment
POST /make-payment ๐ข
Token Requirement
๐ Requires authentication
Creates a payment intent for an entire shopping cart.
by using this endpoint you well have the ability to get credentials that you need to make a payment using sdk in your app mobile
Diffrence between payment methods
This endpoint handles multiple payments methode: eache payment methode has a diffrent response , so make sure to handle eache one, in case of cmi you can't made payment in the app mobile so you need to use the web view to be able to make payment
You need to know
By default your store that you are using has no configuration , so you need to configured in the dashboard first by going here "https://YOUR_STORE_NAME.devaito.com/admin/payments/payment-methods"
In case you don't have your own credentials, you can use the following for testing , Don't forget to activate sandbox mode in case if you are using this credentials
CMI
client_id=600004377
client_store_key=Wc_a2024@
Stripe
client_id=pk_test_51RiWkYGa3x1tkwfICqyWZ2gRVE4TVHuS7pGiZXmh8D2uAkoL21MbXY5lJrPU4ZXhnCxfNu3GeWL415hBGxRSXuxp001MawGpyO
client_secret=sk_test_51RiWkYGa3x1tkwfImeOg1HnaLYu1e4GFaK24B1aaMSP1jcUgJflOEmX9fPc8fNrxcOMrekp4K73QWwOkTCtIIXpw00m5fcwgip
PayPal
client_id=AT_rQlXlQdFi_CSU9VIuGQe35Od0T18gXZVryNy2Kp-N5GR07SM4iRg2AOYrGK8ERhYfiTP0NBo6-TmZ
client_secret=ENKAKEQbBPFyzJNBV6cbZ52KN4F3DO0f8AVQypyRUqMXCOYY7nrcFprVlfYoAoN8WAetafdNM2wHn77a
Headers
| Key | Type | Description |
|---|---|---|
| store-currency | string | Optional The currency code that user is using in the application ex (e.g., MAD, USD, EUR). in case if you don't have a currency code, the API will use the default currency. |
| Accept | string | Required. Must be application/json. |
Request Body (JSON)
| Key | Type | Description |
|---|---|---|
| payment_method_id | integer | Required. The ID of the payment method (from GET /active-payment-methods). |
| items | array | Required. An array of objects representing the cart. |
| items[].id | integer | Required. The product ID. |
| items[].quantity | integer | Required. The quantity of this item. |
| items[].color | string | Optional. The selected color ID. |
| items[].variant | object | Optional. The selected variant object (from product details). |
| phone | string | Optional. Customer's phone number. Optional for CMI. |
| address | string | Optional. Customer's billing address. Optional for CMI. |
Example Body 1 (Simple: For Stripe/PayPal/CMI)
{
"payment_method_id": 3,
"items": [
{ "id": 6, "quantity": 1 },
{
"id": 10,
"quantity": 2,
"color": "8",
"variant": {
"Size": {
"parent_id": 1,
"child_id": 7,
"child_Name": "1.2X10mm",
"parent_name": "Size"
}
}
}
]
}
Success Response (HTTP 200)
The response structure depends on the payment provider. Check the provider field first.
Case 1: provider == "stripe" (or gpay)
Use the client_secret and public_key with the Stripe SDK.
{
"provider": "stripe",
"client_secret": "pi_3SPSr3..._secret_0fs1U0...",
"public_key": "pk_test_51RiWkY..."
}
Case 2: provider == "paypal"
Use the order_id and public_key with the PayPal SDK.
{
"provider": "paypal",
"order_id": "2GE8219848...",
"public_key": "AT_rQlXlQdFi_CSU9V..."
}
Case 3: provider == "cmi"
Open a WebView and POST the form_data to the gateway_url.
{
"provider": "cmi",
"gateway_url": "https://testpayment.cmi.co.ma/fim/est3Dgate",
"form_data": {
"clientid": "600004377",
"TranType": "PreAuth",
"amount": "15.50",
"oid": "CMD-17622...",
"email": "john.doe@example.com",
"BillToName": "John Doe",
"tel": "+1555123456",
"BillToStreet1": "123 Main Street",
"okUrl": "https://your-api.com/api/payment/cmi/success",
"failUrl": "https://your-api.com/api/payment/cmi/fail",
"CallbackURL": "https://your-api.com/api/payment/cmi/callback",
"hashAlgorithm": "ver3",
"HASH": "sRCh9P0ZvD9qrS2AJ8oT..."
}
}
GET /active-payment-methods
Returns a list of availables payments methods for the current store.
Token Requirement
๐ Requires authentication
Example response:
{
"success": true,
"data": {
"data": [
{
"id": 1,
"name": "Cash On Delivery",
"logo": "/public/storage/all_files/2023/Apr/cod_971.png",
"instruction": "Buy this product on Cash On Delivery"
},
{
"id": 2,
"name": "Paypal",
"logo": "/public/storage/all_files/2023/Apr/paypal_49.png",
"instruction": "Pay the amount with Paypal"
},
{
"id": 3,
"name": "Stripe",
"logo": "/public/storage/all_files/2023/Apr/stipe_53.png",
"instruction": "Pay the amount with Stripe"
}
]
}
}
๐ Shopping Cart
POST /cart/apply-coupon ๐ข
Apply a coupon code to the current cart.
Headers
| Key | Type | Required | Description |
|---|---|---|---|
| store-currency | string | no | Optional. The currency code used by the user (e.g., MAD, USD, EUR). If not provided, the API will use the store default currency. |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
coupon_code |
string | yes | The coupon code to apply. |
customer_id |
integer | no | Optional. Only required if the user is logged in. |
items |
array | yes | An array of cart items. |
items[].id |
integer | yes | The product ID. |
items[].quantity |
integer | yes | Quantity of the product. |
items[].color |
string | no | Optional. Selected color ID. |
items[].variant |
object | no | Optional. Selected variant object (from product details). |
Request Body
{
"coupon_code": "test", // coupon code
"customer_id": 5,
"items": [
{
"id": 74,
"quantity": 1,
"color": "8",
"variant": {
"Size": { "parent_id": 1, "child_id": 7, "child_Name": "1.2X10mm", "parent_name": "Size" }
}
}
]
}
Response (Valid coupon_code)
{
"success": true,
"message": "Coupon applied successfully!",
"coupon_code": "test",
"discount_amount": 10,
"original_subtotal": 65,
"new_total": 55,
"free_shipping": false,
"currency_symbol": "MAD",
"currency_code": "MAD"
}
Response (Invalid coupon_code)
{
"success": false,
"message": "Coupon code not found."
}
DELETE /cart/clear
Token Requirement
๐ Requires authentication
By using this endpoint , you can clear the cart of the customer no params are required
{
"success": true,
"message": "Panier vidรฉ avec succรจs"
}
DELETE /cart/remove-item
Token Requirement
๐ Requires authentication
By using this endpoint , you can remove a specifique item from cart customer
Request body
| Name | Type | Required | Description |
|---|---|---|---|
cart_item_id |
integer | yes | the id of the product in the cart |
{
"success": true,
"message": "Item has been removed"
}
GET /cart/list
Token Requirement
๐ Requires authentication
By using this endpoint , you well get the list of products in theshopping cart.
params
| Name | Type | Required | Description |
|---|---|---|---|
page |
integer | No | Page number to retrieve (default: 1) |
per_page |
integer | No | Number of items per page (default: 8) |
{
"success": true,
"cartItems": [
{
"cart_item_id": 17,
"product_id": 8,
"name": "Retro Plus Size Loose Sports Knee Length Shorts",
"permalink": "retro-plus-size-loose-sports-knee-length-shorts",
"image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f7559e8d04d_83428bac-0d0c-42eb-96c0-bbecd5b8a71e.jpg",
"variant": "Size:XL/color:Pink",
"variant_code": "1:5/color:4",
"unitPrice": 4.86,
"oldPrice": 4.86,
"quantity": 2,
"attachment": null,
"max_item": 1000,
"min_item": 0
},
{
"cart_item_id": 16,
"product_id": 8,
"name": "Retro Plus Size Loose Sports Knee Length Shorts",
"permalink": "retro-plus-size-loose-sports-knee-length-shorts",
"image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f7559e8d04d_83428bac-0d0c-42eb-96c0-bbecd5b8a71e.jpg",
"variant": "Size:L/color:Pink",
"variant_code": "1:4/color:4",
"unitPrice": 4.86,
"oldPrice": 4.86,
"quantity": 1,
"attachment": null,
"max_item": 1000,
"min_item": 0
},
{
"cart_item_id": 15,
"product_id": 6,
"name": "Wooden Handle Steel Gardening Tools Small Shovel",
"permalink": "wooden-handle-steel-gardening-tools-small-shovel",
"image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f744b306031_5f6aac0d-1764-41b4-ac74-601c34ee52f5.jpg",
"variant": "",
"variant_code": "color:",
"unitPrice": 12.35,
"oldPrice": 12.35,
"quantity": 1,
"attachment": null,
"max_item": 1,
"min_item": 0
},
{
"cart_item_id": 14,
"product_id": 6,
"name": "Wooden Handle Steel Gardening Tools Small Shovel",
"permalink": "wooden-handle-steel-gardening-tools-small-shovel",
"image": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f744b306031_5f6aac0d-1764-41b4-ac74-601c34ee52f5.jpg",
"variant": "",
"variant_code": "",
"unitPrice": 12.35,
"oldPrice": 12.35,
"quantity": 7,
"attachment": null,
"max_item": 1,
"min_item": 0
},
{
"cart_item_id": 13,
"product_id": 2,
"name": "Universal Language Translator",
"permalink": "httpsexamplecomuniversal-language-translator",
"image": "https://treasurex.devaito.com/public/storage/all_files/2023/Mar/img-demo_17.jpg",
"variant": "",
"variant_code": "",
"unitPrice": 49.99,
"oldPrice": 49.99,
"quantity": 1,
"attachment": null,
"max_item": 49,
"min_item": 1
}
],
"items_per_page": 10,
"total_items": 5,
"current_page": 1,
"total_pages": 1
}
POST /cart/add
Adds a product to the authenticated customer's shopping cart.
Token Requirement
๐ Requires authentication
Request body:
| Name | Type | Required | Description |
|---|---|---|---|
product_id |
String / integer | Yes | this is the product id |
quantity |
integer | Yes | quantity of items |
color |
integer | No | color id |
colorText |
String | No | color name (ex: red) |
variant |
Object(JSON) | No | variants that has been selected (ex:{"Size":{"parent_id":1,"child_id":4,"child_Name":"L","parent_name":"Size"}}) |
Example response:
{
"success": true,
"data": {
"productId": "6",
"productName": "Wooden Handle Steel Gardening Tools Small Shovel",
"productPermalink": "wooden-handle-steel-gardening-tools-small-shovel",
"productImage": "https://treasurex.devaito.com/public/tenant/tenantd74de1f0-e8cc-40e7-954f-b6a6429fc1e8/68f744b306031_5f6aac0d-1764-41b4-ac74-601c34ee52f5.jpg",
"paramsVariantText": "",
"paramsVariant": "",
"unitPrice": "12.35",
"oldPrice": 12.35,
"quantity": "1",
"min_item": 0,
"max_item": 1,
"seller": null,
"shopName": null,
"shopSlug": null,
"brand_id": null,
"attachment": null,
"attributes_added": [],
"colors_added": [],
"product_cj": 1
}
}
๐๏ธ Checkout
POST /get-state
By using this endpoint you will get all states that a city have by passing the city id
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
city_id |
integer | Yes | city id ex(2504) |
{
"success": true,
"data": [
{
"id": 29576,
"name": "Agadir"
}
]
}
POST /get-cities-of-state
By using this endpoint you will get all cities that a country have by passing the country id
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
country_id |
integer | Yes | country id ex(148) |
{
"success": true,
"data": [
{
"id": 2504,
"name": "Agadir",
"code": null
},
{
"id": 2505,
"name": "Casablanca",
"code": null
},
{
"id": 2506,
"name": "Chaouia-Ouardigha",
"code": null
},
{
"id": 2507,
"name": "Doukkala-Abda",
"code": null
},
{
"id": 2508,
"name": "Fes-Boulemane",
"code": null
},
{
"id": 2509,
"name": "Gharb-Chrarda-Beni Hssen",
"code": null
},
{
"id": 2510,
"name": "Guelmim",
"code": null
},
{
"id": 2511,
"name": "Kenitra",
"code": null
},
{
"id": 2512,
"name": "Marrakech-Tensift-Al Haouz",
"code": null
},
{
"id": 2513,
"name": "Meknes-Tafilalet",
"code": null
},
{
"id": 2514,
"name": "Oriental",
"code": null
},
{
"id": 2515,
"name": "Oujda",
"code": null
},
{
"id": 2516,
"name": "Province de Tanger",
"code": null
},
{
"id": 2517,
"name": "Rabat-Sale-Zammour-Zaer",
"code": null
},
{
"id": 2518,
"name": "Sala Al Jadida",
"code": null
},
{
"id": 2519,
"name": "Settat",
"code": null
},
{
"id": 2520,
"name": "Souss Massa-Draa",
"code": null
},
{
"id": 2521,
"name": "Tadla-Azilal",
"code": null
},
{
"id": 2522,
"name": "Tangier-Tetouan",
"code": null
},
{
"id": 2523,
"name": "Taza-Al Hoceima-Taounate",
"code": null
},
{
"id": 2524,
"name": "Wilaya de Casablanca",
"code": null
},
{
"id": 2525,
"name": "Wilaya de Rabat-Sale",
"code": null
}
]
}
GET /get-countries
By using this endpoint you will get the list of countries with their respective codes , to get more countries you need to go to you admin panel and activated
{
"success": true,
"data": [
{
"id": 148,
"name": "Morocco",
"code": "MA"
}
]
}
POST /get-shipping-options
Returns available shipping options and costs based on the delivery address and selected products.
๐ Authentication: No token required.
๐ฅ Data source: All request fields should be collected from the checkout form.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
products |
array |
โ Yes | List of products in the cart |
products[].id |
integer |
โ Yes | Product ID |
products[].quantity |
integer |
โ Yes | Quantity (โฅ 1) |
shipping_type |
string |
โ Yes | Shipping method: home_delivery or pickup_delivery |
delivery_address |
object |
โ
Only if shipping_type = home_delivery |
Delivery address details |
delivery_address.country_id |
integer |
โ
Yes (if delivery_address present) |
Country ID |
delivery_address.state_id |
integer |
โ
Yes (if delivery_address present) |
State/region ID |
delivery_address.location |
integer |
โ No | Location ID (optional) |
delivery_address.post_code |
string |
โ No | Postal/ZIP code (optional) |
โ ๏ธ Important:
- Ifshipping_typeispickup_delivery, thedelivery_addressfield must be omitted.
- Theproductsfield must be a JSON array, not a string. - You edit and customize your shipping options in your admin panel, just visit this link: Admin Panel
Request Example (Home Delivery)
{
"products": [
{
"id": 2,
"quantity": 1
}
],
"shipping_type": "home_delivery",
"delivery_address": {
"country_id": 229,
"state_id": 3798,
"location": 41391,
"post_code": "16894"
}
}
{
"success": true,
"shipping_available": true,
"options": [
{
"id": "17663181378294",
"product": {
"id": "2",
"uid": "17663181378294",
"name": "Elegant Tailored Blazer",
"permalink": "productselegant-tailored-blazer",
"image": "71",
"variant": "",
"variant_code": "",
"quantity": 1,
"unitPrice": "199.99",
"oldPrice": 199.99,
"min_item": 1,
"max_item": 10000000,
"attachment": null,
"seller": 4,
"shop_name": null,
"shop_slug": null,
"is_selected": true,
"has_options": 0,
"product_cj": 0,
"is_available": 2
},
"options": {
"data": [
{
"id": 1,
"title": "Standard",
"shipping_cost": 10,
"shipping_time": "5 Days-7 Days",
"shipping_from": "USA",
"by": null
},
{
"id": 2,
"title": "Express",
"shipping_cost": 15,
"shipping_time": "2 Days-3 Days",
"shipping_from": "USA",
"by": null
}
]
},
"default_option": {
"id": 1,
"title": "Standard",
"shipping_cost": 10,
"shipping_time": "5 Days-7 Days",
"shipping_from": "USA",
"by": null
},
"tax": 0
}
]
}
response Example in case if adress user does not accept shipping (Home Delivery)
{
"success": false,
"message": "Shipping not available for this address"
}
โ ๏ธ Common Issues / Tips
!!! tip "Troubleshooting" - Ensure you use the correct subdomain for your store when calling the API. - Always include the Authorization: Bearer <token> header for authenticated endpoints. - Use Content-Type: application/json for all POST requests. - If you receive a 401 Unauthorized response, your token may have expired.