Skip to main content

Branches

Get Order Branches

The "Get Order Branches" API allows users to retrieve a list of available branches in a dropdown menu format. This is useful for customers who want to select a preferred branch location for pickup their orders.

  • Endpoint: api/customer/v2/dropdown/branches

  • Http Method: GET

tip

Before using this API, please ensure that the multi-inventory configuration is enabled in your e-commerce platform.. Additionally, ensure that the inventories related to different branches are marked as "available_pickup" to enable the selection of pickup locations for customers.

  • Success Response:
Branches Resource

You can check more details about Branch Resource.

{
"code": 200,
"message": "Success",
"data": [
{
"id": 1,
"shop_name": "Branch 1",
"shop_name_ar": "فرع 1",
"address": "Address 1",
"address_ar": "العنوان 1",
"area": "Area 1",
"area_ar": "المنطقة 1",
"lat": "24.713552",
"lng": "46.675296",
"phone": [
"123456789"
],
"images": [],
"email": ".",
"type": "Stores",
"order": 1,
"active": 1,
"direction_link": ""
}
]
}
info

Check the following section to learn more about the Get Order Branches API Reference

Set Branch

The "Set Branch on Customer Profile" API enables customers to associate a preferred branch location with their user profile in an e-commerce platform. This feature is particularly useful for businesses with multiple physical store branches, allowing customers to choose their preferred pickup location for their orders by default. Once set, this branch preference can be used during the checkout process for future orders.

  • Endpoint: api/customer/profile/set-branch

  • Method: POST

  • Request Body:

    • branch_id: The ID of the branch to be associated with the customer profile.
{
"branch_id": 1
}
tip

Before using this API, please ensure that the multi-inventory configuration is enabled in your e-commerce platform.. Additionally, ensure that the inventories related to different branches are marked as "available_pickup" to enable the selection of pickup locations for customers.

  • Success Response:
Customer Resource

You can check more details about Customer Resource.

200 OK - If the login is successful
{
"code": 200,
"data": {
"id": 1153383,
"name": "Test",
"last_name": "Documentation",
"email": "doc2@supercommerce.io",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
"is_guest": false,
//...
}
}
info

Check the following section to learn more about the Set Branch API Reference