Skip to main content

Shop(Store)

Create shop#

Creates a new store.

Request body:

AttributeTypeDescriptionNullable
externalIdStringShop external idtrue
activeBooleanWhether the shop is activefalse
regionIdIntegerId of the region in which the store is locatedfalse
regionExternalIdStringExternal id of the region in which the store is locatedtrue
addrRegOfficeStringAddress of the region in which the store is locatedtrue
sapStringUnique store numberfalse
addressStringStore addressfalse
localityStringName of storefalse
cityStringThe city where the store is locatedfalse
latitudeDoubleLatitude of storefalse
longitudeDoubleLongitude of storefalse
timeZoneIdStringId of the time zone in which the store is located (format like America/Los_Angeles)false
statusIdIntegerStatus Id of the shoptrue
emailStringEmail of the shoptrue
telegramChatIdStringTelegramChat Id of the shoptrue

Response

Returns Store object

Examples

curl --request POST https://api.qvalon.com/v1/orgstruct/shops \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"locality":"Store 01","sap":"NVG01","active":true,"address":"5th Avenue, 100","city":"Portland","regionId":86,"latitude":45.51223,"longitude":-122.658722,"timeZoneId":"America/Los_Angeles"}'
200 OK
{
"id": 669,
"active": true,
"sap": "NVG01",
"locality": "Store 01",
"address": "5th Avenue, 100",
"city": "Portland",
"latitude": 45.51223,
"longitude": -122.658722,
"regionId": 86,
"clusterId": 86,
"timeZoneId": "America/Los_Angeles"
}

Update shop#

Updates an existing store by id.

Request body:

AttributeTypeDescriptionNullable
externalIdStringShop external idtrue
activeBooleanWhether the shop is activefalse
regionIdIntegerId of the region in which the store is locatedfalse
regionExternalIdStringExternal id of the region in which the store is locatedtrue
addrRegOfficeStringAddress of the region in which the store is locatedtrue
sapStringUnique store numberfalse
addressStringStore addressfalse
localityStringName of storefalse
cityStringThe city where the store is locatedfalse
latitudeDoubleLatitude of storefalse
longitudeDoubleLongitude of storefalse
timeZoneIdStringId of the time zone in which the store is located (format like America/Los_Angeles)false
statusIdIntegerStatus Id of the shoptrue
emailStringEmail of the shoptrue
telegramChatIdStringTelegramChat Id of the shoptrue

Response

Returns Store object

Examples

curl --request PUT https://api.qvalon.com/v1/orgstruct/shops/669 \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"active":true,"sap":"NVG01","locality":"Store 01","address":"5th Avenue, 100, Suite 2","city":"Portland","latitude":45.51223,"longitude":-122.658722,"regionId":86,"timeZoneId":"America/Los_Angeles"}'
200 OK
{
"active": true,
"sap": "NVG01",
"locality": "Store 01",
"address": "5th Avenue, 100, Suite 2",
"city": "Portland",
"latitude": 45.51223,
"longitude": -122.658722,
"regionId": 86,
"timeZoneId": "America/Los_Angeles"
}

List shops#

Returns a list of Shop objects
Available fields to add in object see here

Request parameters:

Request ParameterTypeDescriptionRequired
fieldsList of String (comma-separated)Additional shop fields to include in the response object, e.g. dir. Default: dirfalse
activeBooleanReturn only active shopsfalse
idsList of integersFind shops by idsfalse
regionList of integersFind shops by region idsfalse
divisionList of integersFind shops by division idsfalse
sapLikeStringFind shops by SAP(store number) likefalse
localityLikeStringFind shops by name likefalse
cityLikeStringFind shops by city likefalse
addressLikeStringFind shops by address likefalse
searchStringStringFind shop by sap, name or division name or region name or city or address or manager of shop first or last namefalse
statusIntegerFind shops by statusfalse
directorBooleanGet shops where appointed are managerfalse
allDayBooleanGet convenience (24-hour) shopsfalse

Examples

curl https://api.qvalon.com/v1/orgstruct/shops \
--header 'Authorization: Bearer <your_token>'
200 OK
[
{
"id": 669,
"active": true,
"sap": "NVG01",
"locality": "Store 01",
"address": "5th Avenue, 100, Suite 2",
"city": "Portland",
"latitude": 45.51223,
"longitude": -122.658722,
"regionId": 86,
"timeZoneId": "America/Los_Angeles"
}
]

Get shop by id#

Returns a Shop object
Available fields to add in object see here

Request parameters:

Request ParameterTypeDescriptionRequired
fieldsList of String (comma-separated)Additional shop fields to include in the response object, e.g. dir. Unlike List shops, none are included by default here โ€” you must request them explicitlyfalse

Examples

curl https://api.qvalon.com/v1/orgstruct/shops/669 \
--header 'Authorization: Bearer <your_token>'
200 OK
{
"id": 669,
"active": true,
"sap": "NVG01",
"locality": "Store 01",
"address": "5th Avenue, 100, Suite 2",
"city": "Portland",
"latitude": 45.51223,
"longitude": -122.658722,
"regionId": 86,
"timeZoneId": "America/Los_Angeles"
}