ShopfloDevelopers

API reference

Catalog API

Read and manage the products, variants, images and collections in your Shopflo catalog.

Available Brands and agencies

Use the Catalog API to read your catalog and, for stores on platforms other than Shopify, to keep it up to date. A product has variants and images. Collections group products.

Calls are made from your server with a channel API key. The key identifies your store, so no merchant id appears in the paths.

Lists use page, which starts at 1, and limit, which is at most 50. Bulk requests take at most 50 ids or items. Partners searching across brands use the Commerce Partner API.

Base URL: https://api.shopflo.co

Authentication: Merchant API key

A channel API key from your Shopflo dashboard, sent as the whole value of the Authorization header.

Read how this authentication works

Shopify stores

If your store runs on Shopify, Shopflo keeps its catalog in sync with Shopify, so product, variant and collection changes made here are overwritten by the next sync. Use these write endpoints for stores on other platforms.

Endpoints

GETLook up a product/ce/api/v1/external/productGETList products/ce/api/v1/external/catalog/productsPOSTGet products in bulk/ce/api/v1/external/catalog/products/bulk-getGETGet a product/ce/api/v1/external/catalog/products/{product_id}POSTCreate a product/ce/api/v1/external/catalog/productsPATCHUpdate a product/ce/api/v1/external/catalog/products/{product_id}DELETEDelete a product/ce/api/v1/external/catalog/products/{product_id}GETList variants of a product/ce/api/v1/external/catalog/products/{product_id}/variantsGETGet a variant/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}POSTCreate a variant/ce/api/v1/external/catalog/products/{product_id}/variantsPOSTCreate variants in bulk/ce/api/v1/external/catalog/products/{product_id}/variants/bulkPATCHUpdate a variant/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}DELETEDelete a variant/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}PATCHLink a variant to an image/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}/imageDELETEUnlink a variant from an image/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}/imagePOSTGet variants in bulk/ce/api/v1/external/catalog/variants/bulk-getPATCHUpdate variant inventory/ce/api/v1/external/catalog/variants/inventoryPOSTAdd an image/ce/api/v1/external/catalog/products/{product_id}/imagesPOSTAdd images in bulk/ce/api/v1/external/catalog/products/{product_id}/images/bulkPATCHUpdate an image/ce/api/v1/external/catalog/products/{product_id}/images/{image_id}DELETEDelete an image/ce/api/v1/external/catalog/products/{product_id}/images/{image_id}PUTLink variants to images/ce/api/v1/external/catalog/products/{product_id}/images/variantsGETList collections/ce/api/v1/external/catalog/collectionsGETGet a collection/ce/api/v1/external/catalog/collections/{collection_id}POSTCreate a collection/ce/api/v1/external/catalog/collectionsPATCHUpdate a collection/ce/api/v1/external/catalog/collections/{collection_id}DELETEDelete a collection/ce/api/v1/external/catalog/collections/{collection_id}GETList the products of a collection/ce/api/v1/external/catalog/collections/{collection_id}/productsGETGet the product ids of a collection/ce/api/v1/external/catalog/collections/{collection_id}/products/mappingPATCHSet the products of a collection/ce/api/v1/external/catalog/collections/{collection_id}/productsPATCHAdd and remove collection products/ce/api/v1/external/catalog/collections/{collection_id}/products/modifyPOSTAdd a product to a collection/ce/api/v1/external/catalog/collections/{collection_id}/products/{product_id}DELETERemove a product from a collection/ce/api/v1/external/catalog/collections/{collection_id}/products/{product_id}

Products

GET

Look up a product

/ce/api/v1/external/product

Returns one product from your catalog, with its variants and images. Find it by handle, variant id or product id.

Authentication: Merchant API key

Query parameters

  • product_handlestringOptional

    The product handle. Shopflo stores the handle in description, so this matches the description of the product.

  • variant_idstringOptional

    The id of any variant of the product.

  • product_idstringOptional

    The product id.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

Send at least one of the three query parameters. If you send more than one, product_id is used first, then variant_id, then product_handle.

Deleted products are not returned. Responses can be cached, so a recent change in your store may not show immediately.

Errors

StatusCodeWhen
400GE_001None of product_handle, variant_id and product_id was sent. The message is At least one of product_handle, variant_id, or product_id must be provided.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product matches. The message is Product not found, or Product not found with productId followed by the ids when you sent product_id and it does not exist.
GET/ce/api/v1/external/product
curl -sS "https://api.shopflo.co/ce/api/v1/external/product?product_handle=linen-shirt" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Product retrieved successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000,
    "variants": [
      {
        "merchant_id": "your_merchant_id",
        "variant_id": "var_456",
        "name": "S",
        "sku": "LS-S",
        "original_price": 1999.0,
        "current_price": 1499.0,
        "currency": "INR",
        "inventory_quantity": 12,
        "position": 1,
        "requires_shipping": true,
        "taxable": true,
        "weight": "250",
        "weight_unit": "G",
        "inventory_policy": "DENY",
        "inventory_management": "shopify"
      }
    ],
    "images": [
      {
        "image_id": "img_1",
        "src": "https://example.com/linen-shirt.jpg",
        "alt": "Linen shirt",
        "width": 1200,
        "height": 1600,
        "is_primary": true,
        "linked_variant_ids": []
      }
    ]
  }
}
GET

List products

/ce/api/v1/external/catalog/products

Returns a page of your products.

Authentication: Merchant API key

Query parameters

  • pageintegerOptional

    Page number, starting at 1 and at most 1000000. Defaults to 1.

  • limitintegerOptional

    Page size, 1 to 50. Defaults to 10.

  • name_likestringOptional

    Only products whose name contains this text.

  • sku_likestringOptional

    Only products with a variant whose SKU contains this text.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

data is an array of products. Bundle products are never included. Beside data, the response carries current_page (the page you asked for), page_size, max_pages and total_count.

Errors

StatusCodeWhen
400GE_001page is below 1 or above 1000000, or limit is outside 1 to 50.
401GE_003The Authorization header is missing or the key is not recognised.
GET/ce/api/v1/external/catalog/products
curl -sS "https://api.shopflo.co/ce/api/v1/external/catalog/products?page=1&limit=10&name_like=shirt" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Products fetched successfully",
  "data": [
    {
      "merchant_id": "your_merchant_id",
      "product_id": "prod_123",
      "name": "Linen Shirt",
      "description": "linen-shirt",
      "product_type": "Shirts",
      "status": "ACTIVE",
      "tags": ["linen", "summer"],
      "vendor": "Example Brand",
      "created_at": 1766000000000,
      "updated_at": 1766100000000
    }
  ],
  "current_page": 1,
  "page_size": 10,
  "max_pages": 1,
  "total_count": 1
}
POST

Get products in bulk

/ce/api/v1/external/catalog/products/bulk-get

Returns several products in one call, each with its variants and images. Send 1 to 50 product ids.

Authentication: Merchant API key

Request body

  • product_idsarray of stringRequired

    The products to fetch. 1 to 50 ids, none blank.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

data is an array of the products that exist, each with variants and images. Ids that do not exist are left out. Collections are not included.

Errors

StatusCodeWhen
400GE_001product_ids is empty, has more than 50 ids, or has a blank id.
401GE_003The Authorization header is missing or the key is not recognised.
POST/ce/api/v1/external/catalog/products/bulk-get
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/products/bulk-get" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "product_ids": ["prod_123", "prod_124"]
}'
Response200 OK
{
  "success": true,
  "message": "Products fetched successfully",
  "data": [
    {
      "merchant_id": "your_merchant_id",
      "product_id": "prod_123",
      "name": "Linen Shirt",
      "description": "linen-shirt",
      "product_type": "Shirts",
      "status": "ACTIVE",
      "tags": ["linen", "summer"],
      "vendor": "Example Brand",
      "created_at": 1766000000000,
      "updated_at": 1766100000000,
      "variants": [
        {
          "merchant_id": "your_merchant_id",
          "variant_id": "var_456",
          "name": "S",
          "sku": "LS-S",
          "original_price": 1999.0,
          "current_price": 1499.0,
          "currency": "INR",
          "inventory_quantity": 12,
          "position": 1,
          "requires_shipping": true,
          "taxable": true,
          "weight": "250",
          "weight_unit": "G",
          "inventory_policy": "DENY",
          "inventory_management": "shopify"
        }
      ],
      "images": [
        {
          "image_id": "img_1",
          "src": "https://example.com/linen-shirt.jpg",
          "alt": "Linen shirt",
          "width": 1200,
          "height": 1600,
          "is_primary": true,
          "linked_variant_ids": []
        }
      ]
    }
  ]
}
GET

Get a product

/ce/api/v1/external/catalog/products/{product_id}

Returns one product by its id.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
GET/ce/api/v1/external/catalog/products/{product_id}
curl -sS "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Product fetched successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
POST

Create a product

/ce/api/v1/external/catalog/products

Creates a product in your catalog. Add its variants and images with the endpoints below.

Authentication: Merchant API key

Request body

  • product_idstringRequired

    An id you choose. It must not be blank and must be unique in your catalog.

  • namestringOptional

    Product name.

  • descriptionstringOptional

    Product description. For Shopify stores this field holds the handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED. Defaults to ACTIVE when you leave it out.

  • tagsarray of stringOptional

    Labels.

  • vendorstringOptional

    Vendor.

  • collection_idsarray of stringOptional

    Collections to put the product in. Each must already exist.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Without a status the product is created as ACTIVE. Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
400GE_001product_id is missing or blank. The message is product_id is required.
400CEE_001An item with this id already exists in your catalog.
401GE_003The Authorization header is missing or the key is not recognised.
POST/ce/api/v1/external/catalog/products
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/products" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "product_id": "prod_123",
  "name": "Linen Shirt",
  "product_type": "Shirts",
  "status": "ACTIVE",
  "tags": ["linen", "summer"],
  "vendor": "Example Brand"
}'
Response200 OK
{
  "success": true,
  "message": "Product created successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
PATCH

Update a product

/ce/api/v1/external/catalog/products/{product_id}

Changes a product. Fields you leave out keep their stored value. To clear all tags, send tags as an empty array.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

Request body

  • namestringOptional

    Product name. Ignored when empty.

  • descriptionstringOptional

    Product description. Ignored when empty.

  • product_typestringOptional

    Product type. Keeps its value when you leave it out.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringOptional

    Labels. Keeps its value when you leave it out. An empty array clears all tags.

  • vendorstringOptional

    Vendor. Ignored when empty.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

The response includes the product's variants and images. Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
400GE_001The body has no fields. The message is Product update request is empty.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
PATCH/ce/api/v1/external/catalog/products/{product_id}
curl -sS -X PATCH "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Linen Shirt",
  "product_type": "Shirts",
  "tags": ["linen", "summer"],
  "status": "ACTIVE"
}'
Response200 OK
{
  "success": true,
  "message": "Product updated successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
DELETE

Delete a product

/ce/api/v1/external/catalog/products/{product_id}

Deletes a product and returns it as it was. This cannot be undone.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
DELETE/ce/api/v1/external/catalog/products/{product_id}
curl -sS -X DELETE "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Product removed successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000
  }
}

Variants

GET

List variants of a product

/ce/api/v1/external/catalog/products/{product_id}/variants

Returns a page of a product's variants, oldest first. A product that is not yours answers 404.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

Query parameters

  • pageintegerOptional

    Page number, starting at 1 and at most 1000000. Defaults to 1.

  • limitintegerOptional

    Page size, 1 to 50. Defaults to 10.

Response fields in data

  • variant_idstringRequired

    The variant id.

  • namestringOptional

    Variant name.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_pricenumberOptional

    Original price in whole currency units with decimals.

  • current_pricenumberOptional

    Current price in whole currency units with decimals.

  • currencystringOptional

    Currency code.

  • inventory_quantityintegerOptional

    Units in stock.

  • inventory_managementstringOptional

    Who tracks inventory. Empty when nobody does.

  • inventory_policystringOptional

    DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

  • positionintegerOptional

    Position among the product's variants.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • weightstringOptional

    Weight, as text.

  • weight_unitstringOptional

    KG, G, LB or OZ.

data is an array of variants. Prices in responses are in whole currency units with decimals. Beside data, the response carries current_page (the page you asked for), page_size, max_pages and total_count.

Errors

StatusCodeWhen
400GE_001page is below 1 or above 1000000, or limit is outside 1 to 50.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
GET/ce/api/v1/external/catalog/products/{product_id}/variants
curl -sS "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/variants?page=1&limit=10" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Variants fetched successfully",
  "data": [
    {
      "merchant_id": "your_merchant_id",
      "variant_id": "var_456",
      "name": "S",
      "sku": "LS-S",
      "original_price": 1999.0,
      "current_price": 1499.0,
      "currency": "INR",
      "inventory_quantity": 12,
      "position": 1,
      "requires_shipping": true,
      "taxable": true,
      "weight": "250",
      "weight_unit": "G",
      "inventory_policy": "DENY",
      "inventory_management": "shopify"
    }
  ],
  "current_page": 1,
  "page_size": 10,
  "max_pages": 1,
  "total_count": 1
}
GET

Get a variant

/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}

Returns one variant of a product.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

  • variant_idstringRequired

    The variant.

Response fields in data

  • variant_idstringRequired

    The variant id.

  • namestringOptional

    Variant name.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_pricenumberOptional

    Original price in whole currency units with decimals.

  • current_pricenumberOptional

    Current price in whole currency units with decimals.

  • currencystringOptional

    Currency code.

  • inventory_quantityintegerOptional

    Units in stock.

  • inventory_managementstringOptional

    Who tracks inventory. Empty when nobody does.

  • inventory_policystringOptional

    DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

  • positionintegerOptional

    Position among the product's variants.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • weightstringOptional

    Weight, as text.

  • weight_unitstringOptional

    KG, G, LB or OZ.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004The variant is not yours, or has no product. The message is Variant with id followed by the variant id, then does not exist for product and the product id.
GET/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}
curl -sS "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/variants/var_456" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Variant fetched successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "variant_id": "var_456",
    "name": "S",
    "sku": "LS-S",
    "original_price": 1999.0,
    "current_price": 1499.0,
    "currency": "INR",
    "inventory_quantity": 12,
    "position": 1,
    "requires_shipping": true,
    "taxable": true,
    "weight": "250",
    "weight_unit": "G",
    "inventory_policy": "DENY",
    "inventory_management": "shopify"
  }
}
POST

Create a variant

/ce/api/v1/external/catalog/products/{product_id}/variants

Adds a variant to a product. Send prices in the smallest currency unit. Responses show them in whole currency units.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

Request body

  • variant_idstringRequired

    An id you choose. It must not be blank and must be unique in your catalog.

  • namestringOptional

    Variant name, for example a size.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_priceintegerOptional

    Original price in the smallest currency unit, for example paise. 199900 is 1999.00.

  • current_priceintegerOptional

    Current price in the smallest currency unit.

  • currencystringRequired

    INR or USD.

  • inventory_quantityintegerOptional

    Units in stock.

  • positionintegerOptional

    Position among the product's variants.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • weightstringOptional

    Weight, as text.

  • weight_unitstringOptional

    KG, G, LB or OZ.

  • inventory_policystringOptional

    DENY or CONTINUE.

  • inventory_managementstringOptional

    Who tracks inventory. Leave it out when nobody does.

Response fields in data

  • variant_idstringRequired

    The variant id.

  • namestringOptional

    Variant name.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_pricenumberOptional

    Original price in whole currency units with decimals.

  • current_pricenumberOptional

    Current price in whole currency units with decimals.

  • currencystringOptional

    Currency code.

  • inventory_quantityintegerOptional

    Units in stock.

  • inventory_managementstringOptional

    Who tracks inventory. Empty when nobody does.

  • inventory_policystringOptional

    DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

  • positionintegerOptional

    Position among the product's variants.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • weightstringOptional

    Weight, as text.

  • weight_unitstringOptional

    KG, G, LB or OZ.

A product that is not yours, or does not exist, answers 404 before anything is written. Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
400GE_001variant_id is missing or blank. The message is variant_id is required.
400CEE_001An item with this id already exists in your catalog.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
POST/ce/api/v1/external/catalog/products/{product_id}/variants
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/variants" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "variant_id": "var_456",
  "name": "S",
  "sku": "LS-S",
  "original_price": 199900,
  "current_price": 149900,
  "currency": "INR",
  "inventory_quantity": 12,
  "position": 1,
  "requires_shipping": true,
  "taxable": true
}'
Response200 OK
{
  "success": true,
  "message": "Variant created successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "variant_id": "var_456",
    "name": "S",
    "sku": "LS-S",
    "original_price": 1999.0,
    "current_price": 1499.0,
    "currency": "INR",
    "inventory_quantity": 12,
    "position": 1,
    "requires_shipping": true,
    "taxable": true,
    "weight": "250",
    "weight_unit": "G",
    "inventory_policy": "DENY",
    "inventory_management": "shopify"
  }
}
POST

Create variants in bulk

/ce/api/v1/external/catalog/products/{product_id}/variants/bulk

Adds several variants to a product. Send 1 to 50 items. A variant whose variant_id already exists is skipped.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

Request body

  • (array)arrayRequired

    One object per variant. 1 to 50 items, each with a variant_id.

    • variant_idstringRequired

      An id you choose. It must not be blank and must be unique in your catalog.

    • namestringOptional

      Variant name, for example a size.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_priceintegerOptional

      Original price in the smallest currency unit, for example paise. 199900 is 1999.00.

    • current_priceintegerOptional

      Current price in the smallest currency unit.

    • currencystringRequired

      INR or USD.

    • inventory_quantityintegerOptional

      Units in stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

    • inventory_policystringOptional

      DENY or CONTINUE.

    • inventory_managementstringOptional

      Who tracks inventory. Leave it out when nobody does.

Response fields in data

  • variant_idstringRequired

    The variant id.

  • namestringOptional

    Variant name.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_pricenumberOptional

    Original price in whole currency units with decimals.

  • current_pricenumberOptional

    Current price in whole currency units with decimals.

  • currencystringOptional

    Currency code.

  • inventory_quantityintegerOptional

    Units in stock.

  • inventory_managementstringOptional

    Who tracks inventory. Empty when nobody does.

  • inventory_policystringOptional

    DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

  • positionintegerOptional

    Position among the product's variants.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • weightstringOptional

    Weight, as text.

  • weight_unitstringOptional

    KG, G, LB or OZ.

The request body is a bare JSON array. data lists the variants that were created. Variants that already existed are not in the list.

Errors

StatusCodeWhen
400GE_001The list is empty or has more than 50 items, or an item is not valid.
400GE_001variant_id is missing or blank. The message is variant_id is required.
400GE_001Two items have the same variant_id. The message is variant_id must not contain duplicates.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
POST/ce/api/v1/external/catalog/products/{product_id}/variants/bulk
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/variants/bulk" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '[
  {
    "variant_id": "var_456",
    "name": "S",
    "sku": "LS-S",
    "original_price": 199900,
    "current_price": 149900,
    "currency": "INR",
    "inventory_quantity": 12,
    "position": 1,
    "requires_shipping": true,
    "taxable": true
  },
  {
    "variant_id": "var_457",
    "name": "M",
    "sku": "LS-M",
    "original_price": 199900,
    "current_price": 149900,
    "currency": "INR",
    "inventory_quantity": 12,
    "position": 2,
    "requires_shipping": true,
    "taxable": true
  }
]'
Response200 OK
{
  "success": true,
  "message": "Variants created successfully",
  "data": [
    {
      "merchant_id": "your_merchant_id",
      "variant_id": "var_456",
      "name": "S",
      "sku": "LS-S",
      "original_price": 1999.0,
      "current_price": 1499.0,
      "currency": "INR",
      "inventory_quantity": 12,
      "position": 1,
      "requires_shipping": true,
      "taxable": true,
      "weight": "250",
      "weight_unit": "G",
      "inventory_policy": "DENY",
      "inventory_management": "shopify"
    }
  ]
}
PATCH

Update a variant

/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}

Changes a variant. Fields you leave out keep their stored value.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

  • variant_idstringRequired

    The variant.

Request body

  • namestringOptional

    Variant name.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_priceintegerOptional

    Original price in the smallest currency unit. Keeps its value when you leave it out.

  • current_priceintegerOptional

    Current price in the smallest currency unit.

  • currencystringOptional

    INR or USD.

  • inventory_quantityintegerOptional

    Units in stock.

  • positionintegerOptional

    Position among the product's variants.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • inventory_policystringOptional

    DENY or CONTINUE.

Response fields in data

  • variant_idstringRequired

    The variant id.

  • namestringOptional

    Variant name.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_pricenumberOptional

    Original price in whole currency units with decimals.

  • current_pricenumberOptional

    Current price in whole currency units with decimals.

  • currencystringOptional

    Currency code.

  • inventory_quantityintegerOptional

    Units in stock.

  • inventory_managementstringOptional

    Who tracks inventory. Empty when nobody does.

  • inventory_policystringOptional

    DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

  • positionintegerOptional

    Position among the product's variants.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • weightstringOptional

    Weight, as text.

  • weight_unitstringOptional

    KG, G, LB or OZ.

A variant or product that is not yours, or does not exist, answers 404 before anything is written. Weight, shipping and inventory tracking fields are not changed by this call. Use Update variant inventory for stock changes keyed by inventory item. Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
400GE_001The body has no fields. The message is No updates requested, Invalid Variant Update Request.
409GE_001The variant was changed more recently by a sync, so this update was not applied. The message is Older Update Request Received.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004The variant is not yours, or has no product. The message is Variant with id followed by the variant id, then does not exist for product and the product id.
PATCH/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}
curl -sS -X PATCH "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/variants/var_456" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "original_price": 199900,
  "current_price": 129900,
  "inventory_quantity": 8
}'
Response200 OK
{
  "success": true,
  "message": "Variant updated successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "variant_id": "var_456",
    "name": "S",
    "sku": "LS-S",
    "original_price": 1999.0,
    "current_price": 1499.0,
    "currency": "INR",
    "inventory_quantity": 12,
    "position": 1,
    "requires_shipping": true,
    "taxable": true,
    "weight": "250",
    "weight_unit": "G",
    "inventory_policy": "DENY",
    "inventory_management": "shopify"
  }
}
DELETE

Delete a variant

/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}

Deletes a variant and returns it as it was.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

  • variant_idstringRequired

    The variant.

Response fields in data

  • variant_idstringRequired

    The variant id.

  • namestringOptional

    Variant name.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_pricenumberOptional

    Original price in whole currency units with decimals.

  • current_pricenumberOptional

    Current price in whole currency units with decimals.

  • currencystringOptional

    Currency code.

  • inventory_quantityintegerOptional

    Units in stock.

  • inventory_managementstringOptional

    Who tracks inventory. Empty when nobody does.

  • inventory_policystringOptional

    DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

  • positionintegerOptional

    Position among the product's variants.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • weightstringOptional

    Weight, as text.

  • weight_unitstringOptional

    KG, G, LB or OZ.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004The variant is not yours, or has no product. The message is Variant with id followed by the variant id, then does not exist for product and the product id.
DELETE/ce/api/v1/external/catalog/products/{product_id}/variants/{variant_id}
curl -sS -X DELETE "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/variants/var_456" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Variant removed successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "variant_id": "var_456",
    "name": "S",
    "sku": "LS-S",
    "original_price": 1999.0,
    "current_price": 1499.0,
    "currency": "INR",
    "inventory_quantity": 12,
    "position": 1,
    "requires_shipping": true,
    "taxable": true,
    "weight": "250",
    "weight_unit": "G",
    "inventory_policy": "DENY",
    "inventory_management": "shopify"
  }
}
POST

Get variants in bulk

/ce/api/v1/external/catalog/variants/bulk-get

Returns several variants in one call, from any of your products. Send 1 to 50 variant ids.

Authentication: Merchant API key

Request body

  • variant_idsarray of stringRequired

    The variants to fetch. 1 to 50 ids, none blank.

Response fields in data

  • variant_idstringRequired

    The variant id.

  • namestringOptional

    Variant name.

  • descriptionstringOptional

    Variant description.

  • skustringOptional

    SKU.

  • original_pricenumberOptional

    Original price in whole currency units with decimals.

  • current_pricenumberOptional

    Current price in whole currency units with decimals.

  • currencystringOptional

    Currency code.

  • inventory_quantityintegerOptional

    Units in stock.

  • inventory_managementstringOptional

    Who tracks inventory. Empty when nobody does.

  • inventory_policystringOptional

    DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

  • positionintegerOptional

    Position among the product's variants.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • taxablebooleanOptional

    Whether the variant is taxable.

  • weightstringOptional

    Weight, as text.

  • weight_unitstringOptional

    KG, G, LB or OZ.

data is an array of the variants that exist. Ids that do not exist are left out.

Errors

StatusCodeWhen
400GE_001variant_ids is empty, has more than 50 ids, or has a blank id.
401GE_003The Authorization header is missing or the key is not recognised.
POST/ce/api/v1/external/catalog/variants/bulk-get
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/variants/bulk-get" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "variant_ids": ["var_456", "var_457"]
}'
Response200 OK
{
  "success": true,
  "message": "Variants fetched successfully",
  "data": [
    {
      "merchant_id": "your_merchant_id",
      "variant_id": "var_456",
      "name": "S",
      "sku": "LS-S",
      "original_price": 1999.0,
      "current_price": 1499.0,
      "currency": "INR",
      "inventory_quantity": 12,
      "position": 1,
      "requires_shipping": true,
      "taxable": true,
      "weight": "250",
      "weight_unit": "G",
      "inventory_policy": "DENY",
      "inventory_management": "shopify"
    }
  ]
}
PATCH

Update variant inventory

/ce/api/v1/external/catalog/variants/inventory

Changes stock for the variant that has the given inventory item id. A field you leave out keeps its value.

Authentication: Merchant API key

Request body

  • inventory_item_idintegerRequired

    The inventory item id set on the variant when it was created.

  • inventory_quantityintegerOptional

    Units in stock.

  • skustringOptional

    SKU.

  • requires_shippingbooleanOptional

    Whether the variant is shipped.

  • trackedbooleanOptional

    true marks inventory as tracked. false clears tracking. Leave it out to keep the current setting.

The response has a message and no data. Only the variant that matches inventory_item_id on your store changes. Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
400GE_001inventory_item_id is missing or blank. The message is inventory_item_id is required.
401GE_003The Authorization header is missing or the key is not recognised.
PATCH/ce/api/v1/external/catalog/variants/inventory
curl -sS -X PATCH "https://api.shopflo.co/ce/api/v1/external/catalog/variants/inventory" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "inventory_item_id": 56789,
  "inventory_quantity": 25
}'
Response200 OK
{
  "success": true,
  "message": "Variant inventory updated successfully"
}

Images

POST

Add an image

/ce/api/v1/external/catalog/products/{product_id}/images

Adds an image to a product. Shopflo generates the image id, and an image_id in the body is ignored. Returns the product with its images.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

Request body

  • image_sourcestringRequired

    Image URL.

  • alt_textstringRequired

    Alt text.

  • widthintegerRequired

    Width in pixels, 1 or more.

  • heightintegerRequired

    Height in pixels, 1 or more.

  • is_primarybooleanOptional

    Whether this is the main image.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

Errors

StatusCodeWhen
400GE_001A required field is missing. The messages are Image Source is Required, Alt Text is Required, Image Width is required and Image height is required.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
POST/ce/api/v1/external/catalog/products/{product_id}/images
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/images" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "image_source": "https://example.com/linen-shirt.jpg",
  "alt_text": "Linen shirt",
  "width": 1200,
  "height": 1600,
  "is_primary": true
}'
Response200 OK
{
  "success": true,
  "message": "Product image created successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000,
    "variants": [
      {
        "merchant_id": "your_merchant_id",
        "variant_id": "var_456",
        "name": "S",
        "sku": "LS-S",
        "original_price": 1999.0,
        "current_price": 1499.0,
        "currency": "INR",
        "inventory_quantity": 12,
        "position": 1,
        "requires_shipping": true,
        "taxable": true,
        "weight": "250",
        "weight_unit": "G",
        "inventory_policy": "DENY",
        "inventory_management": "shopify"
      }
    ],
    "images": [
      {
        "image_id": "img_1",
        "src": "https://example.com/linen-shirt.jpg",
        "alt": "Linen shirt",
        "width": 1200,
        "height": 1600,
        "is_primary": true,
        "linked_variant_ids": []
      }
    ]
  }
}
POST

Add images in bulk

/ce/api/v1/external/catalog/products/{product_id}/images/bulk

Adds several images to a product. Send 1 to 50 items. Shopflo generates each image id. Returns the product with its images.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

Request body

  • (array)arrayRequired

    One object per image. 1 to 50 items.

    • image_sourcestringRequired

      Image URL.

    • alt_textstringRequired

      Alt text.

    • widthintegerRequired

      Width in pixels, 1 or more.

    • heightintegerRequired

      Height in pixels, 1 or more.

    • is_primarybooleanOptional

      Whether this is the main image.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

The request body is a bare JSON array. An image_id in an item is ignored.

Errors

StatusCodeWhen
400GE_001The list is empty or has more than 50 items, or an item is not valid.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
POST/ce/api/v1/external/catalog/products/{product_id}/images/bulk
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/images/bulk" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '[
  {
    "image_source": "https://example.com/linen-shirt.jpg",
    "alt_text": "Linen shirt",
    "width": 1200,
    "height": 1600,
    "is_primary": true
  },
  {
    "image_source": "https://example.com/linen-shirt-back.jpg",
    "alt_text": "Back view",
    "width": 1200,
    "height": 1600
  }
]'
Response200 OK
{
  "success": true,
  "message": "Product images created successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000,
    "variants": [
      {
        "merchant_id": "your_merchant_id",
        "variant_id": "var_456",
        "name": "S",
        "sku": "LS-S",
        "original_price": 1999.0,
        "current_price": 1499.0,
        "currency": "INR",
        "inventory_quantity": 12,
        "position": 1,
        "requires_shipping": true,
        "taxable": true,
        "weight": "250",
        "weight_unit": "G",
        "inventory_policy": "DENY",
        "inventory_management": "shopify"
      }
    ],
    "images": [
      {
        "image_id": "img_1",
        "src": "https://example.com/linen-shirt.jpg",
        "alt": "Linen shirt",
        "width": 1200,
        "height": 1600,
        "is_primary": true,
        "linked_variant_ids": []
      }
    ]
  }
}
PATCH

Update an image

/ce/api/v1/external/catalog/products/{product_id}/images/{image_id}

Changes an image. Fields you leave out keep their value. Returns the product.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

  • image_idstringRequired

    The image id, as returned when the image was added.

Request body

  • image_sourcestringOptional

    Image URL.

  • alt_textstringOptional

    Alt text.

  • widthintegerOptional

    Width in pixels.

  • heightintegerOptional

    Height in pixels.

  • is_primarybooleanOptional

    Whether this is the main image.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

Errors

StatusCodeWhen
400GE_001The body has no fields. The message is No Update requested.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No image with this id exists on this product.
PATCH/ce/api/v1/external/catalog/products/{product_id}/images/{image_id}
curl -sS -X PATCH "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/images/img_1" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "alt_text": "Linen shirt, front",
  "is_primary": true
}'
Response200 OK
{
  "success": true,
  "message": "Product image updated successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000,
    "variants": [
      {
        "merchant_id": "your_merchant_id",
        "variant_id": "var_456",
        "name": "S",
        "sku": "LS-S",
        "original_price": 1999.0,
        "current_price": 1499.0,
        "currency": "INR",
        "inventory_quantity": 12,
        "position": 1,
        "requires_shipping": true,
        "taxable": true,
        "weight": "250",
        "weight_unit": "G",
        "inventory_policy": "DENY",
        "inventory_management": "shopify"
      }
    ],
    "images": [
      {
        "image_id": "img_1",
        "src": "https://example.com/linen-shirt.jpg",
        "alt": "Linen shirt",
        "width": 1200,
        "height": 1600,
        "is_primary": true,
        "linked_variant_ids": []
      }
    ]
  }
}
DELETE

Delete an image

/ce/api/v1/external/catalog/products/{product_id}/images/{image_id}

Deletes an image from a product. Returns the product.

Authentication: Merchant API key

Path parameters

  • product_idstringRequired

    The product.

  • image_idstringRequired

    The image id, as returned when the image was added.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No product with this id exists in your catalog.
DELETE/ce/api/v1/external/catalog/products/{product_id}/images/{image_id}
curl -sS -X DELETE "https://api.shopflo.co/ce/api/v1/external/catalog/products/prod_123/images/img_1" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Product image removed successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "product_id": "prod_123",
    "name": "Linen Shirt",
    "description": "linen-shirt",
    "product_type": "Shirts",
    "status": "ACTIVE",
    "tags": ["linen", "summer"],
    "vendor": "Example Brand",
    "created_at": 1766000000000,
    "updated_at": 1766100000000,
    "variants": [
      {
        "merchant_id": "your_merchant_id",
        "variant_id": "var_456",
        "name": "S",
        "sku": "LS-S",
        "original_price": 1999.0,
        "current_price": 1499.0,
        "currency": "INR",
        "inventory_quantity": 12,
        "position": 1,
        "requires_shipping": true,
        "taxable": true,
        "weight": "250",
        "weight_unit": "G",
        "inventory_policy": "DENY",
        "inventory_management": "shopify"
      }
    ],
    "images": [
      {
        "image_id": "img_1",
        "src": "https://example.com/linen-shirt.jpg",
        "alt": "Linen shirt",
        "width": 1200,
        "height": 1600,
        "is_primary": true,
        "linked_variant_ids": []
      }
    ]
  }
}

Collections

GET

List collections

/ce/api/v1/external/catalog/collections

Returns a page of your collections.

Authentication: Merchant API key

Query parameters

  • pageintegerOptional

    Page number, starting at 1 and at most 1000000. Defaults to 1.

  • limitintegerOptional

    Page size, 1 to 50. Defaults to 10.

  • name_likestringOptional

    Only collections whose name contains this text.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

data is an array of collections. Beside data, the response carries current_page (the page you asked for), page_size, max_pages and total_count.

Errors

StatusCodeWhen
400GE_001page is below 1 or above 1000000, or limit is outside 1 to 50.
401GE_003The Authorization header is missing or the key is not recognised.
GET/ce/api/v1/external/catalog/collections
curl -sS "https://api.shopflo.co/ce/api/v1/external/catalog/collections?page=1&limit=10" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Collections fetched successfully",
  "data": [
    {
      "merchant_id": "your_merchant_id",
      "collection_id": "col_1",
      "name": "Summer",
      "description": "Light fabrics for summer",
      "collection_type": "CUSTOM",
      "published_at": 1766000000000,
      "updated_at": 1766100000000
    }
  ],
  "current_page": 1,
  "page_size": 10,
  "max_pages": 1,
  "total_count": 1
}
GET

Get a collection

/ce/api/v1/external/catalog/collections/{collection_id}

Returns one collection.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No collection with this id exists in your catalog.
GET/ce/api/v1/external/catalog/collections/{collection_id}
curl -sS "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Collection fetched successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "collection_id": "col_1",
    "name": "Summer",
    "description": "Light fabrics for summer",
    "collection_type": "CUSTOM",
    "published_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
POST

Create a collection

/ce/api/v1/external/catalog/collections

Creates a collection.

Authentication: Merchant API key

Request body

  • collection_idstringRequired

    An id you choose. It must be unique in your catalog.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • image_sourcestringOptional

    Image URL.

  • image_alt_textstringOptional

    Image alt text.

  • image_widthintegerOptional

    Image width in pixels.

  • image_heightintegerOptional

    Image height in pixels.

  • metadataobjectOptional

    Free-form data to store with the collection.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
400GE_001collection_id or name is missing. The messages are Collection Id is required and Collection Name is required.
400CEE_001An item with this id already exists in your catalog.
401GE_003The Authorization header is missing or the key is not recognised.
POST/ce/api/v1/external/catalog/collections
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/collections" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "collection_id": "col_1",
  "name": "Summer",
  "description": "Light fabrics for summer",
  "collection_type": "CUSTOM"
}'
Response200 OK
{
  "success": true,
  "message": "Collection created successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "collection_id": "col_1",
    "name": "Summer",
    "description": "Light fabrics for summer",
    "collection_type": "CUSTOM",
    "published_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
PATCH

Update a collection

/ce/api/v1/external/catalog/collections/{collection_id}

Changes a collection. Fields you leave out keep their value. The image changes only when you send an image field.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

Request body

  • namestringOptional

    Collection name. Ignored when empty.

  • descriptionstringOptional

    Description. Ignored when empty.

  • collection_typestringOptional

    CUSTOM or SMART.

  • image_sourcestringOptional

    Image URL.

  • image_alt_textstringOptional

    Image alt text.

  • image_widthintegerOptional

    Image width in pixels.

  • image_heightintegerOptional

    Image height in pixels.

  • metadataobjectOptional

    Free-form data.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No collection with this id exists in your catalog.
PATCH/ce/api/v1/external/catalog/collections/{collection_id}
curl -sS -X PATCH "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Summer 2026",
  "description": "Light fabrics for summer"
}'
Response200 OK
{
  "success": true,
  "message": "Collection updated successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "collection_id": "col_1",
    "name": "Summer",
    "description": "Light fabrics for summer",
    "collection_type": "CUSTOM",
    "published_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
DELETE

Delete a collection

/ce/api/v1/external/catalog/collections/{collection_id}

Deletes a collection and returns it as it was. Its products are not deleted.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No collection with this id exists in your catalog.
DELETE/ce/api/v1/external/catalog/collections/{collection_id}
curl -sS -X DELETE "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Collection removed successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "collection_id": "col_1",
    "name": "Summer",
    "description": "Light fabrics for summer",
    "collection_type": "CUSTOM",
    "published_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
GET

List the products of a collection

/ce/api/v1/external/catalog/collections/{collection_id}/products

Returns a page of the products in a collection, newest first, each with its variants and images. A collection that is not yours answers 404.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

Query parameters

  • pageintegerOptional

    Page number, starting at 1 and at most 1000000. Defaults to 1.

  • limitintegerOptional

    Page size, 1 to 50. Defaults to 10.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • product_idstringRequired

    The product id.

  • namestringRequired

    Product name.

  • descriptionstringOptional

    For Shopify stores, the product handle.

  • product_typestringOptional

    Product type.

  • statusstringOptional

    ACTIVE, ARCHIVED, DRAFT, SUSPENDED or UNLISTED.

  • tagsarray of stringRequired

    Empty when the product has none.

  • vendorstringOptional

    Vendor.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

  • variantsarrayOptional

    Present on some calls. Each item has the fields of a variant.

    • variant_idstringRequired

      The variant id.

    • namestringOptional

      Variant name.

    • descriptionstringOptional

      Variant description.

    • skustringOptional

      SKU.

    • original_pricenumberOptional

      Original price in whole currency units with decimals.

    • current_pricenumberOptional

      Current price in whole currency units with decimals.

    • currencystringOptional

      Currency code.

    • inventory_quantityintegerOptional

      Units in stock.

    • inventory_managementstringOptional

      Who tracks inventory. Empty when nobody does.

    • inventory_policystringOptional

      DENY or CONTINUE. CONTINUE means the variant can be sold when out of stock.

    • positionintegerOptional

      Position among the product's variants.

    • requires_shippingbooleanOptional

      Whether the variant is shipped.

    • taxablebooleanOptional

      Whether the variant is taxable.

    • weightstringOptional

      Weight, as text.

    • weight_unitstringOptional

      KG, G, LB or OZ.

  • imagesarrayOptional

    Present on some calls. Each item has the fields of an image.

    • image_idstringRequired

      The image id.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

    • is_primarybooleanOptional

      Whether this is the main image.

    • linked_variant_idsarray of stringOptional

      The variants this image shows. Empty when it applies to the whole product.

data is an array of products. Beside data, the response carries current_page (the page you asked for), page_size, max_pages and total_count.

Errors

StatusCodeWhen
400GE_001page is below 1 or above 1000000, or limit is outside 1 to 50.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No collection with this id exists in your catalog.
GET/ce/api/v1/external/catalog/collections/{collection_id}/products
curl -sS "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1/products?page=1&limit=10" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Collection products fetched successfully",
  "data": [
    {
      "merchant_id": "your_merchant_id",
      "product_id": "prod_123",
      "name": "Linen Shirt",
      "description": "linen-shirt",
      "product_type": "Shirts",
      "status": "ACTIVE",
      "tags": ["linen", "summer"],
      "vendor": "Example Brand",
      "created_at": 1766000000000,
      "updated_at": 1766100000000,
      "variants": [
        {
          "merchant_id": "your_merchant_id",
          "variant_id": "var_456",
          "name": "S",
          "sku": "LS-S",
          "original_price": 1999.0,
          "current_price": 1499.0,
          "currency": "INR",
          "inventory_quantity": 12,
          "position": 1,
          "requires_shipping": true,
          "taxable": true,
          "weight": "250",
          "weight_unit": "G",
          "inventory_policy": "DENY",
          "inventory_management": "shopify"
        }
      ],
      "images": [
        {
          "image_id": "img_1",
          "src": "https://example.com/linen-shirt.jpg",
          "alt": "Linen shirt",
          "width": 1200,
          "height": 1600,
          "is_primary": true,
          "linked_variant_ids": []
        }
      ]
    }
  ],
  "current_page": 1,
  "page_size": 10,
  "max_pages": 1,
  "total_count": 1
}
GET

Get the product ids of a collection

/ce/api/v1/external/catalog/collections/{collection_id}/products/mapping

Returns only the ids of the products in a collection.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

Response fields in data

  • product_idsarray of stringRequired

    The ids of the products in the collection.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No collection with this id exists in your catalog.
GET/ce/api/v1/external/catalog/collections/{collection_id}/products/mapping
curl -sS "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1/products/mapping" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Collection product mapping fetched successfully",
  "data": {
    "product_ids": ["prod_123", "prod_124"]
  }
}
PATCH

Set the products of a collection

/ce/api/v1/external/catalog/collections/{collection_id}/products

Makes the collection hold exactly the products you send. Products already in the collection that are not in your list are removed. Every product id must exist in your catalog. Send at most 50 ids.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

Request body

  • product_idsarray of stringRequired

    The complete list of products the collection should hold. At most 50 ids, none blank. Send an empty array to empty the collection.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

This call replaces the whole member list, so a collection that holds more than 50 products cannot be replaced in one call. To change some products without touching the rest, use Add and remove collection products.

Errors

StatusCodeWhen
400GE_001product_ids is missing, has more than 50 ids, or has a blank id.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004The collection is not yours, or a product id is not in your catalog. For a missing product the message is Some of the requested products do not exist in this catalog.
PATCH/ce/api/v1/external/catalog/collections/{collection_id}/products
curl -sS -X PATCH "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1/products" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "product_ids": ["prod_123", "prod_124"]
}'
Response200 OK
{
  "success": true,
  "message": "Collection products updated successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "collection_id": "col_1",
    "name": "Summer",
    "description": "Light fabrics for summer",
    "collection_type": "CUSTOM",
    "published_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
PATCH

Add and remove collection products

/ce/api/v1/external/catalog/collections/{collection_id}/products/modify

Adds some products to a collection and removes others, in one call. Other products in the collection are not touched. Send at most 50 ids in each list.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

Request body

  • product_ids_to_addarray of stringOptional

    Products to add. At most 50, none blank. Every id must exist in your catalog. Leave it out to add nothing.

  • product_ids_to_removearray of stringOptional

    Products to remove. At most 50, none blank. Leave it out to remove nothing.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
400GE_001A list has more than 50 ids, or an id is blank.
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004The collection is not yours, or an id to add is not in your catalog. For a missing product the message is Some of the requested products do not exist in this catalog.
PATCH/ce/api/v1/external/catalog/collections/{collection_id}/products/modify
curl -sS -X PATCH "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1/products/modify" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "product_ids_to_add": ["prod_125"],
  "product_ids_to_remove": ["prod_124"]
}'
Response200 OK
{
  "success": true,
  "message": "Collection products updated successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "collection_id": "col_1",
    "name": "Summer",
    "description": "Light fabrics for summer",
    "collection_type": "CUSTOM",
    "published_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
POST

Add a product to a collection

/ce/api/v1/external/catalog/collections/{collection_id}/products/{product_id}

Adds one product to a collection.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

  • product_idstringRequired

    The product.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No collection with this id exists in your catalog.
404GE_004No product with this id exists in your catalog.
POST/ce/api/v1/external/catalog/collections/{collection_id}/products/{product_id}
curl -sS -X POST "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1/products/prod_123" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Product added to collection successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "collection_id": "col_1",
    "name": "Summer",
    "description": "Light fabrics for summer",
    "collection_type": "CUSTOM",
    "published_at": 1766000000000,
    "updated_at": 1766100000000
  }
}
DELETE

Remove a product from a collection

/ce/api/v1/external/catalog/collections/{collection_id}/products/{product_id}

Removes one product from a collection. The product is not deleted.

Authentication: Merchant API key

Path parameters

  • collection_idstringRequired

    The collection.

  • product_idstringRequired

    The product.

Response fields in data

  • merchant_idstringRequired

    Your merchant id.

  • collection_idstringRequired

    The collection id.

  • namestringRequired

    Collection name.

  • descriptionstringOptional

    Description.

  • collection_typestringOptional

    CUSTOM or SMART.

  • collection_imageobjectOptional

    The collection image, if any.

    • srcstringRequired

      Image URL.

    • altstringOptional

      Alt text.

    • widthintegerOptional

      Width in pixels.

    • heightintegerOptional

      Height in pixels.

  • metadataobjectOptional

    Free-form data stored with the collection.

  • published_atintegerOptional

    Publish time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No collection with this id exists in your catalog.
404GE_004No product with this id exists in your catalog.
DELETE/ce/api/v1/external/catalog/collections/{collection_id}/products/{product_id}
curl -sS -X DELETE "https://api.shopflo.co/ce/api/v1/external/catalog/collections/col_1/products/prod_123" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Product removed from collection successfully",
  "data": {
    "merchant_id": "your_merchant_id",
    "collection_id": "col_1",
    "name": "Summer",
    "description": "Light fabrics for summer",
    "collection_type": "CUSTOM",
    "published_at": 1766000000000,
    "updated_at": 1766100000000
  }
}