Skip to content

Sites, shops, and locations ​

Load the current brand/site, find a fulfillment location, and select the shop and room used by later shopping calls. Store selection can return a new API key.

Access labels such as Origin + Brand key + Customer are defined in Headers and access. Each endpoint ends in a Try it console; set the host and keys once in its Settings tab or on the overview.

Get listed hub by brand ​

MethodURL pathRequired access
GET/api/v1/listed/hubsOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
query.listedHubIdnumberoptional—
query.show_on_nearestbooleanoptional—
query.limitnumberoptional—
query.offsetnumberoptional—
query.searchstringoptionalWhitespace trimmed
query.latnumberoptional—
query.lngnumberoptional—
query.citystringoptionalNo controller schema
query.countrystringoptionalNo controller schema
query.statestringoptionalNo controller schema

city, state, and country become the internal groupQuery filter. Send them as query fields, not as a nested groupQuery object.

Example:

bash
curl -X GET "$BASE_URL/api/v1/listed/hubs?limit=10&offset=0" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/listedHub_controller.js:10 → getListedHubByBrand; routes: routes/v1/listedHub_route.js:32; service: _getListedHubByBrand (app/v1/service/listedHub_service.ts:35).

Get listed hub markers by brand ​

MethodURL pathRequired access
GET/api/v1/listed/hubs/markersOrigin + Brand key

Request fields: no body, query, or path fields are read by this controller. Context comes from the headers/middleware above.

Example:

bash
curl -X GET "$BASE_URL/api/v1/listed/hubs/markers" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/listedHub_controller.js:82 → getListedHubMarkersByBrand; routes: routes/v1/listedHub_route.js:45; service: _getListedHubMarkersByBrand (app/v1/service/listedHub_service.ts:208).

Get all brands and hub by marketplace ​

MethodURL pathRequired access
GET/api/v1/marketplace/brands-hubsOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
query.namestringoptionalWhitespace trimmed

Example:

bash
curl -X GET "$BASE_URL/api/v1/marketplace/brands-hubs" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/marketplace_controller.js:201 → getAllBrandsAndHubByMarketplace; routes: routes/v1/marketplace_route.js:19; service: _getAllBrandsAndHubByMarketplace (app/v1/service/marketplace_service.js:177).

Get tenant details ​

MethodURL pathRequired access
POST/api/v1/tenantOrigin

No brand key on this route

/api/v1/tenant is listed although its route does not check api-key: the storefront at start-up, to get the brand key calls it. Sending the key anyway is harmless.

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.countrystringoptionalWhitespace trimmed; Country code from country_iso_codes, for example US or CA
body.payload.latitudenumberoptional—
body.payload.longitudenumberoptional—
body.payload.callnearestbooleanoptional—

The response sets an apiKey cookie and returns result.apiKey. Explicitly send the api-key header for subsequent website calls.

Example:

bash
curl -X POST "$BASE_URL/api/v1/tenant" \
  -H "Origin: $ORIGIN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{}}'

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: Site/tenant configuration including apiKey.

Source: app/v1/controller/site_controller.js:63 → getTenantDetails; routes: routes/v1/site_route.ts:35; service: _getSiteDetails (app/v1/service/site_service.js:38).

Select hub for tenant ​

MethodURL pathRequired access
PUT/api/v1/set-hubOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.hubIdnumberyes—
body.payload.roomIdnumberyes—
body.payload.typestringyesWhitespace trimmed; Allowed values ("DELIVERY", "POS", "RAPID", "PICKUP", "SHIPMENT")

Example:

bash
curl -X PUT "$BASE_URL/api/v1/set-hub" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"hubId":1,"roomId":1,"type":"DELIVERY"}}'

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: apiKey.

Source: app/v1/controller/site_controller.js:264 → selectHubForTenant; routes: routes/v1/site_route.ts:44; service: _selectHubForTenant (app/v1/service/site_service.js:777).

Get nearest ​

MethodURL pathRequired access
POST/api/v1/nearestOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.addressstringyesWhitespace trimmed
body.payload.productIdsarray of numberoptional—

Example:

bash
curl -X POST "$BASE_URL/api/v1/nearest" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"address":"123 Example Street, New York, NY"}}'

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: pickup, rapid, delivery.

Source: app/v1/controller/site_controller.js:142 → getNearest; routes: routes/v1/site_route.ts:54; service: _fetchNearest (app/v1/service/site_service.js:419).

Select hub for multi type ​

MethodURL pathRequired access
PUT/api/v1/set-hub/multipleOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.hubIdnumberyes—
body.payload.roomIdnumberyes—
body.payload.typearray of stringyes—

Example:

bash
curl -X PUT "$BASE_URL/api/v1/set-hub/multiple" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"hubId":1,"roomId":1,"type":["DELIVERY"]}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/site_controller.js:102 → selectHubForMultiType; routes: routes/v1/site_route.ts:64; service: _selectHubForMultiType (app/v1/service/site_service.js:377).

Nearest hub by zip code ​

MethodURL pathRequired access
POST/api/v1/nearest/zipcodeOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.zipcodestringyesWhitespace trimmed

Example:

bash
curl -X POST "$BASE_URL/api/v1/nearest/zipcode" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"zipcode":"10001"}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/site_controller.js:299 → nearestHubByZipCode; routes: routes/v1/site_route.ts:74; service: _nearestHubByZipCode (app/v1/service/site_service.js:1007).

Batch platform, Shopify app and API documentation