# Brands Products **Category:** Admin **Base URL:** `/admin/brands` **Authentication:** Required **Routes:** 13 routes documented ## Overview This section documents 13 API routes for brands products. > ⚠️ **These endpoints operate on your live store.** `POST`/`PUT`/`DELETE` operations here — including sync, push, resync, and cache operations — modify or delete production data, and some trigger downstream effects such as warehouse orders or customer emails. `DELETE` operations are generally irreversible. Verify IDs and parameters carefully before calling them from scripts. ## Quick Reference | Method | Endpoint | Description | |--------|----------|-------------| | GET | `/admin/brands` | GET /admin/brands List all brands with optional filtering an... | | POST | `/admin/brands` | POST /admin/brands Create a new brand | | GET | `/admin/brands/:id` | GET /admin/brands/:id Retrieve a single brand by ID | | POST | `/admin/brands/:id` | POST /admin/brands/:id Update a brand | | DELETE | `/admin/brands/:id` | DELETE /admin/brands/:id Delete a brand | | GET | `/admin/brands/:id/avatars` | GET /admin/brands/:id/avatars List all customer avatars for ... | | POST | `/admin/brands/:id/avatars` | POST /admin/brands/:id/avatars Create a new customer avatar ... | | GET | `/admin/brands/:id/avatars/:avatarId` | GET /admin/brands/:id/avatars/:avatarId Retrieve a single cu... | | POST | `/admin/brands/:id/avatars/:avatarId` | POST /admin/brands/:id/avatars/:avatarId Update a customer a... | | DELETE | `/admin/brands/:id/avatars/:avatarId` | DELETE /admin/brands/:id/avatars/:avatarId Delete a customer... | | GET | `/admin/products/:id/cogs/locations` | No description | | POST | `/admin/products/:id/cogs/replenishment-policy` | No description | | POST | `/admin/products/:id/duplicate` | POST /admin/products/:id/duplicate Duplicates a product with... | | GET | `/admin/products/:id/pdp-sections` | GET /admin/products/:id/pdp-sections List all PDP sections f... | | POST | `/admin/products/:id/pdp-sections` | POST /admin/products/:id/pdp-sections Create a new PDP secti... | | GET | `/admin/products/:id/pdp-sections/:section_id` | GET /admin/products/:id/pdp-sections/:section_id Get a speci... | | POST | `/admin/products/:id/pdp-sections/:section_id` | POST /admin/products/:id/pdp-sections/:section_id Update a P... | | DELETE | `/admin/products/:id/pdp-sections/:section_id` | DELETE /admin/products/:id/pdp-sections/:section_id Delete a... | | GET | `/admin/products/:id/sku-aliases` | GET /admin/products/[id]/sku-aliases Product-scoped read of ... | | GET | `/admin/products/:id/variants/:variant_id/cogs` | No description | | GET | `/admin/products/:id/variants/:variant_id/sellability` | No description | | POST | `/admin/products/:id/variants/:variant_id/sellability` | No description | | GET | `/admin/products/:id/variants/:variant_id/storefront-availability` | No description | | POST | `/admin/products/:id/variants/:variant_id/storefront-availability` | No description | --- ## GET Admin Brands **Endpoint:** `GET /admin/brands` **Authentication:** Admin (Required) ### Description GET /admin/brands List all brands with optional filtering and pagination ### Response **Success:** ```typescript { brands, count, offset, limit, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/brands' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Brands **Endpoint:** `POST /admin/brands` **Authentication:** Admin (Required) ### Description POST /admin/brands Create a new brand ### Request Body This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body. ### Response **Success (201):** ```typescript { brand, } ``` **Error (400):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/brands' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Brands :id **Endpoint:** `GET /admin/brands/:id` **Authentication:** Admin (Required) ### Description GET /admin/brands/:id Retrieve a single brand by ID ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Response **Success:** ```typescript { brand, } ``` **Error (404):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/brands/:id' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Brands :id **Endpoint:** `POST /admin/brands/:id` **Authentication:** Admin (Required) ### Description POST /admin/brands/:id Update a brand ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Request Body This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body. ### Response **Success:** ```typescript { brand, } ``` **Error (400):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/brands/:id' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## DELETE Admin Brands :id **Endpoint:** `DELETE /admin/brands/:id` **Authentication:** Admin (Required) ### Description DELETE /admin/brands/:id Delete a brand ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Response **Success (200):** ```typescript { id, deleted, } ``` **Error (400):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X DELETE 'https://your-store.omnicart.cc/admin/brands/:id' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Brands :id Avatars **Endpoint:** `GET /admin/brands/:id/avatars` **Authentication:** Admin (Required) ### Description GET /admin/brands/:id/avatars List all customer avatars for a brand ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Response **Success:** ```typescript { avatars, count, } ``` **Error (400):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/brands/:id/avatars' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Brands :id Avatars **Endpoint:** `POST /admin/brands/:id/avatars` **Authentication:** Admin (Required) ### Description POST /admin/brands/:id/avatars Create a new customer avatar for a brand ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Request Body This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body. ### Response **Success (201):** ```typescript { avatar, } ``` **Error (400):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/brands/:id/avatars' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Brands :id Avatars :avatarId **Endpoint:** `GET /admin/brands/:id/avatars/:avatarId` **Authentication:** Admin (Required) ### Description GET /admin/brands/:id/avatars/:avatarId Retrieve a single customer avatar by ID ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `avatarId` | string | Yes | AvatarId identifier | ### Response **Success:** ```typescript { avatar, } ``` **Error (404):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/brands/:id/avatars/:avatarId' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Brands :id Avatars :avatarId **Endpoint:** `POST /admin/brands/:id/avatars/:avatarId` **Authentication:** Admin (Required) ### Description POST /admin/brands/:id/avatars/:avatarId Update a customer avatar ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `avatarId` | string | Yes | AvatarId identifier | ### Request Body This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body. ### Response **Success:** ```typescript { avatar, } ``` **Error (400):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/brands/:id/avatars/:avatarId' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## DELETE Admin Brands :id Avatars :avatarId **Endpoint:** `DELETE /admin/brands/:id/avatars/:avatarId` **Authentication:** Admin (Required) ### Description DELETE /admin/brands/:id/avatars/:avatarId Delete a customer avatar ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `avatarId` | string | Yes | AvatarId identifier | ### Response **Success (200):** ```typescript { id, deleted, } ``` **Error (400):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X DELETE 'https://your-store.omnicart.cc/admin/brands/:id/avatars/:avatarId' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Products :id Cogs Locations **Endpoint:** `GET /admin/products/:id/cogs/locations` **Authentication:** Admin (Required) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Response **Success:** ```typescript { module_enabled, product_id, currency_code, locations, } ``` **Also returns:** ```typescript { module_enabled, product_id, currency_code, locations, } ``` **Also returns:** ```typescript { module_enabled, product_id, currency_code, locations, } ``` **Also returns:** ```typescript { module_enabled, product_id, currency_code, locations, } ``` **Error (404):** ```typescript { module_enabled, product_id, currency_code, locations, message, } ``` **Error (404):** ```typescript { module_enabled, product_id, currency_code, locations, message, error, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/products/:id/cogs/locations' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Products :id Cogs Replenishment-policy **Endpoint:** `POST /admin/products/:id/cogs/replenishment-policy` **Authentication:** Admin (Required) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Request Body | Field | Type | Required | |-------|------|----------| | `inventory_item_id` | string | Yes | | `location_id` | string | Yes | | `service_level_target` | string | No | | `moq_units` | string | No | | `order_multiple` | string | No | | `lead_time_days` | string | No | | `safety_stock_days` | string | No | | `target_days_cover` | string | No | | `supplier_id` | string | No | | `preferred_supplier` | boolean | No | ### Response **Success (200):** ```typescript { policy, } ``` **Error (400):** ```typescript { message, } ``` **Error (400):** ```typescript { message, issues, } ``` **Error (500):** ```typescript { message, error, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/products/:id/cogs/replenishment-policy' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Products :id Duplicate **Endpoint:** `POST /admin/products/:id/duplicate` **Authentication:** Admin (Required) ### Description POST /admin/products/:id/duplicate Duplicates a product with all its variants, options, and pricing. The duplicated product is created as a draft with " (Copy)" appended to the title. ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Request Body This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body. ### Response **Success (200):** ```typescript { product, message, } ``` **Error (400):** ```typescript { message, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/products/:id/duplicate' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Products :id Pdp-sections **Endpoint:** `GET /admin/products/:id/pdp-sections` **Authentication:** Admin (Required) ### Description GET /admin/products/:id/pdp-sections List all PDP sections for a product (reads from product.metadata.pdp_sections) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Response **Success:** ```typescript { sections, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/products/:id/pdp-sections' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Products :id Pdp-sections **Endpoint:** `POST /admin/products/:id/pdp-sections` **Authentication:** Admin (Required) ### Description POST /admin/products/:id/pdp-sections Create a new PDP section for a product (stores in product.metadata.pdp_sections) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Request Body | Field | Type | Required | |-------|------|----------| | `section_type` | enum(hero, features, specifications, benefits, how_to_use, ingredients, size_guide, shipping_info, reviews_summary, faq, related_content, video, gallery, comparison, custom) | Yes | | `title` | string | No | | `subtitle` | string | No | | `content` | string | No | | `data` | any | No | | `image_url` | string | No | | `video_url` | string | No | | `display_order` | number | No | | `is_visible` | boolean | No | | `show_on_mobile` | boolean | No | | `show_on_desktop` | boolean | No | | `layout` | enum(full_width, centered, two_column, three_column, sidebar_left, sidebar_right) | No | | `background_color` | string | No | | `background_image` | string | No | | `cta_text` | string | No | | `cta_url` | string | No | | `anchor_id` | string | No | | `metadata` | any | No | ### Response **Success:** ```typescript { section, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/products/:id/pdp-sections' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Products :id Pdp-sections :section_id **Endpoint:** `GET /admin/products/:id/pdp-sections/:section_id` **Authentication:** Admin (Required) ### Description GET /admin/products/:id/pdp-sections/:section_id Get a specific PDP section (from product.metadata.pdp_sections) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `section_id` | string | Yes | Section_id identifier | ### Response **Success:** ```typescript { section, } ``` **Error (404):** ```typescript { message, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/products/:id/pdp-sections/:section_id' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Products :id Pdp-sections :section_id **Endpoint:** `POST /admin/products/:id/pdp-sections/:section_id` **Authentication:** Admin (Required) ### Description POST /admin/products/:id/pdp-sections/:section_id Update a PDP section (in product.metadata.pdp_sections) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `section_id` | string | Yes | Section_id identifier | ### Request Body | Field | Type | Required | |-------|------|----------| | `section_type` | enum(hero, features, specifications, benefits, how_to_use, ingredients, size_guide, shipping_info, reviews_summary, faq, related_content, video, gallery, comparison, custom) | No | | `title` | string | No | | `subtitle` | string | No | | `content` | string | No | | `data` | any | No | | `image_url` | string | No | | `video_url` | string | No | | `display_order` | number | No | | `is_visible` | boolean | No | | `show_on_mobile` | boolean | No | | `show_on_desktop` | boolean | No | | `layout` | enum(full_width, centered, two_column, three_column, sidebar_left, sidebar_right) | No | | `background_color` | string | No | | `background_image` | string | No | | `cta_text` | string | No | | `cta_url` | string | No | | `anchor_id` | string | No | | `metadata` | any | No | ### Response **Success:** ```typescript { section, } ``` **Error (404):** ```typescript { message, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/products/:id/pdp-sections/:section_id' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## DELETE Admin Products :id Pdp-sections :section_id **Endpoint:** `DELETE /admin/products/:id/pdp-sections/:section_id` **Authentication:** Admin (Required) ### Description DELETE /admin/products/:id/pdp-sections/:section_id Delete a PDP section (from product.metadata.pdp_sections) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `section_id` | string | Yes | Section_id identifier | ### Response **Success:** ```typescript { success, } ``` **Error (404):** ```typescript { message, } ``` ### Example Request ```bash curl -X DELETE 'https://your-store.omnicart.cc/admin/products/:id/pdp-sections/:section_id' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Products :id Sku-aliases **Endpoint:** `GET /admin/products/:id/sku-aliases` **Authentication:** Admin (Required) ### Description GET /admin/products/[id]/sku-aliases Product-scoped read of warehouse SKU aliases. Resolves the product's variant SKUs server-side and returns the aliases grouped by variant so the admin widget can render "what warehouse SKUs map to this product?" without firing one request per variant. The join is by `omni_sku` (= variant SKU) in application code — there is no module link between warehouse_sku_alias and product/variant, matching how the service's findByMedusaSku already works. Query params: - stock_location_id: optional; scope aliases to a single location. Omitted = all locations (each enriched with location_name via Modules.STOCK_LOCATION). Response: { product_id, variants: [{ variant_id, sku, title, aliases: [...] }], total_aliases } ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | ### Response **Success:** ```typescript { product_id, variants, total_aliases, } ``` **Error (500):** ```typescript { error, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/products/:id/sku-aliases' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Products :id Variants :variant_id Cogs **Endpoint:** `GET /admin/products/:id/variants/:variant_id/cogs` **Authentication:** Admin (Required) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `variant_id` | string | Yes | Variant_id identifier | ### Response **Success:** ```typescript { module_enabled, product_id, variant_id, summary, locations, records, } ``` **Also returns:** ```typescript { module_enabled, product_id, variant_id, summary, locations, records, } ``` **Also returns:** ```typescript { module_enabled, product_id, variant_id, summary, currency_code, locations, records, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/products/:id/variants/:variant_id/cogs' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Products :id Variants :variant_id Sellability **Endpoint:** `GET /admin/products/:id/variants/:variant_id/sellability` **Authentication:** Admin (Required) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `variant_id` | string | Yes | Variant_id identifier | ### Response **Success:** ```typescript { variant_id, sku, manage_inventory, available, broken, for_sale, actions_enabled, } ``` **Error (404):** ```typescript { error, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/products/:id/variants/:variant_id/sellability' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Products :id Variants :variant_id Sellability **Endpoint:** `POST /admin/products/:id/variants/:variant_id/sellability` **Authentication:** Admin (Required) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `variant_id` | string | Yes | Variant_id identifier | ### Request Body This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body. ### Response **Error (400):** ```typescript { error, } ``` **Error (503):** ```typescript { error, hint, } ``` **Error (404):** ```typescript { error, } ``` **Error (500):** ```typescript { error, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/products/:id/variants/:variant_id/sellability' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## GET Admin Products :id Variants :variant_id Storefront-availability **Endpoint:** `GET /admin/products/:id/variants/:variant_id/storefront-availability` **Authentication:** Admin (Required) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `variant_id` | string | Yes | Variant_id identifier | ### Response **Success:** ```typescript { variant_id, sku, storefront_out_of_stock, } ``` **Error (404):** ```typescript { error, } ``` ### Example Request ```bash curl -X GET 'https://your-store.omnicart.cc/admin/products/:id/variants/:variant_id/storefront-availability' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` --- ## POST Admin Products :id Variants :variant_id Storefront-availability **Endpoint:** `POST /admin/products/:id/variants/:variant_id/storefront-availability` **Authentication:** Admin (Required) ### URL Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `id` | string | Yes | Id identifier | | `variant_id` | string | Yes | Variant_id identifier | ### Request Body This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body. ### Response **Success:** ```typescript { variant_id, sku, storefront_out_of_stock, } ``` **Error (400):** ```typescript { error, } ``` **Error (404):** ```typescript { error, } ``` **Error (500):** ```typescript { error, } ``` ### Example Request ```bash curl -X POST 'https://your-store.omnicart.cc/admin/products/:id/variants/:variant_id/storefront-availability' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' ``` ---