Appearance
Products, catalogues, and search
Browse product records and store-specific stock, search by text or filters, and build custom bundles. productId identifies the product; hubProductId identifies its record at a shop.
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 brand catalogue
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/view-catalog | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
query.search | string | optional | No controller schema |
Example:
bash
curl -X GET "$BASE_URL/api/v1/view-catalog" \
-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/catalogue_controller.js:17 → getBrandCatalogue; routes: routes/v1/catalogue_route.js:9; service: _getBrandCatalogueViaTypesense (app/v1/service/catalogue_typesense_service.ts:664).
Get hub catalogue
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/available-catalog | Origin + Brand key + Hub selected |
GET | /api/v1/user/available-catalog | Origin + Brand key + Hub selected + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
query.search | string | optional | Whitespace trimmed |
query.limit | number | optional | — |
query.offset | number | optional | — |
Example (first URL):
bash
curl -X GET "$BASE_URL/api/v1/available-catalog?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/catalogue_controller.js:35 → getHubCatalogue; routes: routes/v1/catalogue_route.js:69; service: _getHubCatalogueViaTypesense (app/v1/service/catalogue_typesense_service.ts:735).
Get bundle catalogue by product ID
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/bundle-catalog/:productId | Origin + Brand key + Hub selected |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.productId | number | yes | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/bundle-catalog/1" \
-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/catalogue_controller.js:82 → getBundleCatalogueByProductId; routes: routes/v1/catalogue_route.js:29; service: _getBundleCatalogueByProductId (app/v1/service/catalogue_service.js:549).
Filter catalogue
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/filter-catalog | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
body.payload | array of object | yes | — |
body.payload[].filterColumn | string | yes | — |
body.payload[].filterValue | array | yes | — |
query.search | string | optional | — |
query.hubId | number | optional | — |
query.roomId | number | optional | — |
query.sortItem | string | optional | No controller schema |
query.sortType | string | optional | No controller schema |
Example:
bash
curl -X POST "$BASE_URL/api/v1/filter-catalog" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":[{"filterColumn":"example","filterValue":["example"]}]}'Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/catalogue_controller.js:119 → filterCatalogue; routes: routes/v1/catalogue_route.js:132; service: _filterCatalogueViaTypesense (app/v1/service/catalogue_typesense_service.ts:197).
Get tag catalogue
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/tags-catalog | Origin + Brand key |
POST | /api/v1/user/tags-catalog | Origin + Brand key + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
body.payload | object | yes | — |
body.payload.tags | array of string | optional | — |
body.payload.category | array of string | conditional | Required when subCategory is supplied; otherwise optional |
body.payload.subCategory | array of string | optional | — |
body.payload.brandName | array of string | optional | — |
body.payload.deals | array of string | optional | — |
body.payload.strains | array of string | optional | — |
query.hubId | number | optional | — |
query.roomId | number | optional | — |
query.search | string | optional | Whitespace trimmed |
query.limit | number | optional | — |
query.offset | number | optional | — |
query.unified_res | boolean | optional | Default (false) |
query.sortItem | string | optional | No controller schema |
query.sortType | string | optional | No controller schema |
unified_res is parsed with JSON.parse when supplied, so use a JSON boolean such as true or false.
Example (first URL):
bash
curl -X POST "$BASE_URL/api/v1/tags-catalog?limit=10&offset=0" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":{}}'Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/catalogue_controller.js:201 → getTagCatalogue; routes: routes/v1/catalogue_route.js:112; service: _getTagCatalogueViaTypesense (app/v1/service/catalogue_typesense_service.ts:415).
Get related catalogue
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/related-catalog | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
body.payload | array of object | yes | — |
body.payload[].type | string | yes | — |
body.payload[].value | array | optional | — |
body.payload[].productId | number | optional | — |
query.hubId | number | optional | — |
query.roomId | number | optional | — |
query.search | string | optional | Whitespace trimmed |
query.onlyInStock | boolean | optional | Default (false) |
query.sortItem | string | optional | No controller schema |
query.sortType | string | optional | No controller schema |
onlyInStock is parsed with JSON.parse when supplied.
Example:
bash
curl -X POST "$BASE_URL/api/v1/related-catalog" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":[{"type":"example","value":["example"]}]}'Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/catalogue_controller.js:357 → getRelatedCatalogue; routes: routes/v1/catalogue_route.js:122; service: _getRelatedCatalogueViaTypesense (app/v1/service/catalogue_typesense_service.ts:910).
Get customer bundle by ID
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/customer/bundle/:customer_bundle_id | Origin + Brand key + Hub selected + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.customer_bundle_id | number | yes | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/customer/bundle/1" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/customer_bundle_controller.js:11 → getCustomerBundleById; routes: routes/v1/customer_bundle_route.js:8; service: _getCustomerBundleById (app/v1/service/customer_bundle_service.js:7).
Get all customer bundles by product ID
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/customer/getAllBundles/:productId | Origin + Brand key + Hub selected + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.productId | number | yes | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/customer/getAllBundles/1" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/customer_bundle_controller.js:42 → getAllCustomerBundlesByProductId; routes: routes/v1/customer_bundle_route.js:18; service: _getAllCustomerBundlesByProductId (app/v1/service/customer_bundle_service.js:123).
Add customer bundle details
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/user/customer/bundle/lineItems/:productId | Origin + Brand key + Hub selected + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
body.payload | object | optional | — |
body.payload.customer_bundle_details | array of object | yes | — |
body.payload.customer_bundle_details[].hubProductId | number | yes | — |
body.payload.customer_bundle_details[].quantity | number | yes | — |
body.payload.customer_bundle_details[].price | number | optional | — |
body.payload.customer_bundle_details[].size | number | optional | — |
path.productId | number | yes | — |
Example:
bash
curl -X POST "$BASE_URL/api/v1/user/customer/bundle/lineItems/1" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":{"customer_bundle_details":[{"hubProductId":1,"quantity":1}]}}'Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/customer_bundle_controller.js:74 → addCustomerBundleDetails; routes: routes/v1/customer_bundle_route.js:28; service: _addCustomerBundleDetails (app/v1/service/customer_bundle_service.js:268).
Delete customer bundle details
| Method | URL path | Required access |
|---|---|---|
DELETE | /api/v1/user/customer/bundle/:customer_bundle_id | Origin + Brand key + Hub selected + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.customer_bundle_id | number | yes | — |
Example:
bash
curl -X DELETE "$BASE_URL/api/v1/user/customer/bundle/1" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/customer_bundle_controller.js:135 → deleteCustomerBundleDetails; routes: routes/v1/customer_bundle_route.js:38; service: _deleteCustomerBundleDetails (app/v1/service/customer_bundle_service.js:324).
Get all filters
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/filters | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
query.hubId | number | optional | — |
query.roomId | number | optional | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/filters" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY"Response: JSON with success: true and result containing the operation’s service data. Result fields/details: Available product filter names and values.
Source: app/v1/controller/filter_controller.js:7 → getAllFilters; routes: routes/v1/filter_route.js:9; service: _getAllFilters (app/v1/service/filter_service.js:6).
Get product by ID
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/getproductbyid/:productId | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.productId | number | yes | Integer |
query.hubId | number | optional | — |
query.roomId | number | optional | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/getproductbyid/1" \
-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/product_controller.js:65 → getProductById; routes: routes/v1/product_route.js:9; service: _getProductByIdViaTypesense (app/v1/service/product_service.js:568).
Get product by slug
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/getproduct/:slug | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.slug | string | yes | Whitespace trimmed |
query.hubId | number | optional | Greater than (0) |
query.roomId | number | optional | Greater than (0) |
query.productId | number | optional | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/getproduct/example" \
-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/product_controller.js:116 → getProductBySlug; routes: routes/v1/product_route.js:89; service: _getProductBySlugViaTypesense (app/v1/service/product_service.js:1001).
Get all locations of product
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/products/locations/:productId | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.productId | number | yes | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/products/locations/1" \
-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/product_controller.js:223 → getAllLocationsOfProduct; routes: routes/v1/product_route.js:38; service: _getAllLocationsOfProduct (app/v1/service/product_service.js:1421).
Get all locations of product with slug
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/products/locations/slug/:slug | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.slug | string | yes | Whitespace trimmed |
Example:
bash
curl -X GET "$BASE_URL/api/v1/products/locations/slug/example" \
-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/product_controller.js:258 → getAllLocationsOfProductWithSlug; routes: routes/v1/product_route.js:48; service: _getAllLocationsOfProductSlug (app/v1/service/product_service.js:1532).
Get product by strain ID
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/products/strains/:strainId | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.strainId | number | yes | — |
query.hubId | number | optional | — |
query.roomId | number | optional | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/products/strains/1" \
-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/product_controller.js:293 → getProductByStrainId; routes: routes/v1/product_route.js:58; service: _getProductByStrainIdViaTypesense (app/v1/service/product_service.js:2001).
Get product by integration product ID
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/products/integrations | Origin + Brand key + Hub selected |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
body.payload | object | yes | — |
body.payload.integration_product_option_ids | array of string | yes | — |
Example:
bash
curl -X POST "$BASE_URL/api/v1/products/integrations" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":{"integration_product_option_ids":["<INTEGRATION_PRODUCT_OPTION_IDS>"]}}'Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/product_controller.js:376 → getProductByIntegrationProductId; routes: routes/v1/product_route.js:68; service: _getProductByIntegrationProductId (app/v1/service/product_service.js:1880).
Get product sales by month
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/products/sales/per-month | Origin + Brand key + Hub selected |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
query | object | yes | — |
query.startDate | string | yes | Whitespace trimmed |
query.endDate | string | yes | Whitespace trimmed |
query.hubProductId | number | yes | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/products/sales/per-month?startDate=example&endDate=example&hubProductId=1" \
-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/product_controller.js:411 → get_product_sales_by_month; routes: routes/v1/product_route.js:78; service: _get_product_sales_by_month (app/v1/service/product_service.js:1954).
Get strain by ID
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/strain/:strainId | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.strainId | number | yes | — |
Example:
bash
curl -X GET "$BASE_URL/api/v1/strain/1" \
-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/strain_controller.js:9 → getStrainById; routes: routes/v1/strain_route.js:40; service: _getStrainByIdViaTypesense (app/v1/service/strain_service.js:9).
Get all strain
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/strain | Origin + 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/strain" \
-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/strain_controller.js:79 → getAllStrain; routes: routes/v1/strain_route.js:19; service: _getAllStrain (app/v1/service/strain_service.js:56).
Get strain by slug
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/strain/slug/:slug | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
path.slug | string | yes | Whitespace trimmed |
Example:
bash
curl -X GET "$BASE_URL/api/v1/strain/slug/example" \
-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/strain_controller.js:44 → getStrainBySlug; routes: routes/v1/strain_route.js:29; service: _getStrainBySlug (app/v1/service/strain_service.js:129).
Query Typesense
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/brand/search | Origin + Brand key |
POST | /api/v1/hub/search | Origin + Brand key + Hub selected |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
query | object | yes | — |
query.query | string | yes | Whitespace trimmed |
body.payload | object | yes | — |
body.payload.filters | one of the listed forms | optional | Default ({ with_inventory : true , }) |
body.payload.filters (form 1) | object | optional | — |
body.payload.filters (form 1).category | array of string | conditional | Required when subCategory is supplied; otherwise optional |
body.payload.filters (form 1).subCategory | array of string | optional | — |
body.payload.filters (form 1).brandName | array of string | optional | — |
body.payload.filters (form 1).tags | array of string | optional | — |
body.payload.filters (form 1).attributes_value | array of one of the listed forms | optional | — |
body.payload.filters (form 1).attributes_value[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters (form 1).attributes_value[] (form 2) | object | yes | — |
body.payload.filters (form 1).attributes_value[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters (form 1).attributes_value[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters (form 1).attributes_view | array of one of the listed forms | optional | — |
body.payload.filters (form 1).attributes_view[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters (form 1).attributes_view[] (form 2) | object | yes | — |
body.payload.filters (form 1).attributes_view[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters (form 1).attributes_view[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters (form 1).strain_name | array of string | optional | — |
body.payload.filters (form 1).loyalty_tier_ids | array of string | optional | — |
body.payload.filters (form 1).price_range | string | optional | Whitespace trimmed |
body.payload.filters (form 1).in_stock | boolean | optional | — |
body.payload.filters (form 1).with_inventory | boolean | optional | Default (true) |
body.payload.filters (form 1).negate_filters | object | optional | — |
body.payload.filters (form 1).negate_filters.category | array of string | optional | — |
body.payload.filters (form 1).negate_filters.subCategory | array of string | optional | — |
body.payload.filters (form 1).negate_filters.brandName | array of string | optional | — |
body.payload.filters (form 1).negate_filters.tags | array of string | optional | — |
body.payload.filters (form 1).negate_filters.attributes_value | array of one of the listed forms | optional | — |
body.payload.filters (form 1).negate_filters.attributes_value[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters (form 1).negate_filters.attributes_value[] (form 2) | object | yes | — |
body.payload.filters (form 1).negate_filters.attributes_value[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters (form 1).negate_filters.attributes_value[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters (form 1).negate_filters.attributes_view | array of one of the listed forms | optional | — |
body.payload.filters (form 1).negate_filters.attributes_view[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters (form 1).negate_filters.attributes_view[] (form 2) | object | yes | — |
body.payload.filters (form 1).negate_filters.attributes_view[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters (form 1).negate_filters.attributes_view[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters (form 1).negate_filters.strain_name | array of string | optional | — |
body.payload.filters (form 1).negate_filters.loyalty_tier_ids | array of string | optional | — |
body.payload.filters (form 2) | object | optional | — |
body.payload.filters (form 2).facet_categories | array of string | conditional | Required when facet_sub_categories is supplied; otherwise optional |
body.payload.filters (form 2).facet_sub_categories | array of string | optional | — |
body.payload.filters (form 2).facet_brand_names | array of string | optional | — |
body.payload.filters (form 2).facet_tags | array of string | optional | — |
body.payload.filters (form 2).facet_discount_texts | array of string | optional | — |
body.payload.filters (form 2).attributes_value | array of one of the listed forms | optional | — |
body.payload.filters (form 2).attributes_value[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters (form 2).attributes_value[] (form 2) | object | yes | — |
body.payload.filters (form 2).attributes_value[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters (form 2).attributes_value[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters (form 2).facet_attributes_view | array of one of the listed forms | optional | — |
body.payload.filters (form 2).facet_attributes_view[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters (form 2).facet_attributes_view[] (form 2) | object | yes | — |
body.payload.filters (form 2).facet_attributes_view[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters (form 2).facet_attributes_view[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters (form 2).facet_strain_names | array of string | optional | — |
body.payload.filters (form 2).facet_loyalty_tier_ids | array of string | optional | — |
body.payload.filters (form 2).price_range | string | optional | Whitespace trimmed |
body.payload.filters (form 2).in_stock | boolean | optional | — |
body.payload.filters (form 2).with_inventory | boolean | optional | Default (true) |
body.payload.filters (form 2).negate_filters | object | optional | — |
body.payload.filters (form 2).negate_filters.facet_categories | array of string | optional | — |
body.payload.filters (form 2).negate_filters.facet_sub_categories | array of string | optional | — |
body.payload.filters (form 2).negate_filters.facet_brand_names | array of string | optional | — |
body.payload.filters (form 2).negate_filters.facet_tags | array of string | optional | — |
body.payload.filters (form 2).negate_filters.facet_discount_texts | array of string | optional | — |
body.payload.filters (form 2).negate_filters.attributes_value | array of one of the listed forms | optional | — |
body.payload.filters (form 2).negate_filters.attributes_value[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters (form 2).negate_filters.attributes_value[] (form 2) | object | yes | — |
body.payload.filters (form 2).negate_filters.attributes_value[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters (form 2).negate_filters.attributes_value[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters (form 2).negate_filters.facet_attributes_view | array of one of the listed forms | optional | — |
body.payload.filters (form 2).negate_filters.facet_attributes_view[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters (form 2).negate_filters.facet_attributes_view[] (form 2) | object | yes | — |
body.payload.filters (form 2).negate_filters.facet_attributes_view[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters (form 2).negate_filters.facet_attributes_view[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters (form 2).negate_filters.facet_strain_names | array of string | optional | — |
body.payload.filters (form 2).negate_filters.facet_loyalty_tier_ids | array of string | optional | — |
body.payload.options | object | optional | Default ({ per_page : 20 , page : 1 , max_facet_values : 100 , sort_by : "_text_match:desc" , num_typos : 2 , as_marketplace : false , }) |
body.payload.options.per_page | number | optional | Default (20) |
body.payload.options.page | number | optional | Default (1) |
body.payload.options.max_facet_values | number | optional | Default (100) |
body.payload.options.sort_by | string | optional | Whitespace trimmed; Default ("_text_match:desc") |
body.payload.options.num_typos | number | optional | Default (2) |
body.payload.options.as_marketplace | boolean | optional | Default (false) |
query is a required query-string field even though this is a POST request. body.payload holds filters and options. The filters field supports the original and facet formats listed below.
Example (first URL):
bash
curl -X POST "$BASE_URL/api/v1/brand/search?query=example" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":{}}'Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/typesense_controller.ts:13 → queryTypesense; routes: routes/v1/typesense_route.ts:29; service: _queryTypesense (app/v1/service/typesense_service.ts:73).
Search strains in Typesense
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/brand/search/strains | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
query | object | yes | — |
query.query | string | yes | Whitespace trimmed |
body.payload | object | yes | — |
body.payload.filters | object | optional | — |
body.payload.filters.brandName | array of string | optional | — |
body.payload.filters.tags | array of string | optional | — |
body.payload.filters.facet_lc_tags | array of string | optional | — |
body.payload.filters.attributes_value | array of one of the listed forms | optional | — |
body.payload.filters.attributes_value[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters.attributes_value[] (form 2) | object | yes | — |
body.payload.filters.attributes_value[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters.attributes_value[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.filters.attributes_view | array of one of the listed forms | optional | — |
body.payload.filters.attributes_view[] (form 1) | string | yes | Whitespace trimmed |
body.payload.filters.attributes_view[] (form 2) | object | yes | — |
body.payload.filters.attributes_view[] (form 2).value | string | yes | Whitespace trimmed |
body.payload.filters.attributes_view[] (form 2).match_all | boolean | optional | Default (false) |
body.payload.options | object | optional | Default ({ per_page : 20 , page : 1 , max_facet_values : 100 , sort_by : "_text_match:desc" , num_typos : 2 , as_marketplace : false , as_brand_family : false , }) |
body.payload.options.per_page | number | optional | Default (20) |
body.payload.options.page | number | optional | Default (1) |
body.payload.options.max_facet_values | number | optional | Default (100) |
body.payload.options.sort_by | string | optional | Whitespace trimmed; Default ("_text_match:desc") |
body.payload.options.num_typos | number | optional | Default (2) |
body.payload.options.as_marketplace | boolean | optional | Default (false) |
body.payload.options.as_brand_family | boolean | optional | Default (false) |
query is a required query-string field. body.payload holds filters and options.
Example:
bash
curl -X POST "$BASE_URL/api/v1/brand/search/strains?query=example" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":{}}'Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/typesense_controller.ts:372 → querystrain; routes: routes/v1/typesense_route.ts:49; service: _queryTypesense (app/v1/service/typesense_service.ts:73).