Add a New Location
POST
v1/locations/Adds a new location to the store.
Request
An Access Token is a unique string that represents the authorization granted to a client (Partner application) by a user (Merchant or Store Manager) to access their protected resources. It is part of the OAuth 2.0 standard and is used to authenticate API requests on behalf of the user. Access Tokens have a limited lifespan and must be used within their validity period. Once expired, a new Access Token can be obtained using a Refresh Token. Access Tokens should be treated as sensitive information and must be kept secure to prevent unauthorized access to the user's data. If you do not have an Access-Token
, but have the older alternative instead, i.e., the X-Manager-Token
, then see the instructions here on how to obtain the Access-Token
.
The Authorization token is a unique key given to the third-party application (Partner) by Zid. It is used to authenticate the API requests made by the Partner application. The token verifies the partner's identity and ensures they have permission to access Zid's API but does not provide any specific user or store information. It should be included in the header of API requests when the partner application needs to access Zid's API.
Role of the user.
Preferred language for the response. Defaults to en
if not specified.
The name of the inventory location in both Arabic and English languages
The Arabic name of the inventory location
The English name of the inventory location
The geographic coordinates of the inventory location
The longitude coordinate of the inventory location
The latitude coordinate of the inventory location
The full physical address of the inventory location
The unique identifier of the city where the new inventory location is based. If you don't know the ID of the city, you can find it by making two API calls in the following order:
/managers/countries
: This endpoint provides a list of countries, each with a unique ID. Find the ID of the country where your new inventory is located./managers/cities/by-country-id/{country_id}
: Replace{country_id}
with the ID obtained from the first step. This endpoint returns a list of cities in the given country, each with its own unique ID. Find the ID of the city where your new inventory is located.
Use this city ID here to add a new inventory location.
A flag indicating whether this inventory location is the default one for the store
A flag indicating whether this inventory location is private and not accessible to the public
A flag indicating whether this inventory location is currently enabled and functioning
{
"name": {
"ar": "مخزن الرياض",
"en": "Riyadh warehouse"
},
"coordinates": {
"longitude": 24.876855429417,
"latitude": 50.0887943
},
"full_address": "RHHB4094, 4094 Al Aflaj, 7377، حي الواحة، Riyadh 12442, Saudi Arabia",
"city": 236,
"is_default": true,
"is_private": false,
"is_enabled": true
}
Request samples
Responses
Unique identifier for the location
Name of the location in multiple languages
Name in Arabic
Name in English
Details of the city where the location is
Unique identifier for the city
Name of the city in English
Name of the city in Arabic
Details of the country where the city is
Type of location
Geographic coordinates of the location
Latitude of the location
Longitude of the location
Full address of the location
Priority for fulfillment operations. Null or 0 indicates no specific priority. Lower numbers indicate higher priority. Therefore, 1
is the highest priority.
Indicates whether this is the default location
Indicates whether this location is private
Indicates whether this location is enabled
Indicates whether this location has any stocks
Channels this location is available in.
It is an array of strings, with each string representing a channel.
For example, the channels array could be ["catalog", "online", "physical_store", "direct_sales"].