Product

Version 1.0

The Product Entity serves as the cornerstone of our platform, acting as the definitive source of truth for marketplaces. Designed to be the central hub for all product-related information, this entity empowers merchants with a robust and reliable foundation for managing their offerings across diverse channels. From fundamental details such as product descriptions, pricing, and inventory levels to more nuanced elements like variants and rich media assets, the Product Entity captures and organizes comprehensive data with precision. Its role extends beyond mere storage; it forms the backbone of a seamless and synchronized marketplace ecosystem, ensuring consistency and accuracy across all touchpoints. Merchants can confidently rely on the Product Entity to be the authoritative source, fostering trust and reliability in the marketplace and providing a solid foundation for successful e-commerce operations.


Product Entity

  • Name
    id
    Type
    string
    Required
    Description

    Every product is assigned a unique identifier - an unsigned 64-bit integer known as the Product ID. This specific number is exclusive and distinct across the whole Qooly platform. Ensuring an unparalleled level of uniqueness, no two products.

  • Name
    brand_id
    Type
    foreignId
    Description

    This serves as a unique, distinct identifier, specific to each brand in Qooly's system. As a distinct numerical value, the 'brand_id' provides a reliable reference to every individual brand, irrespective of the number of brands on the platform.

  • Name
    image_id
    Type
    foreignId
    Required
    Description

    This serves as a unique, distinct identifier, specific to each image in Qooly's system. As a distinct numerical value, the 'image_id' provides a reliable reference to every individual image, irrespective of the number of images on the platform.

  • Name
    is_tangible
    Type
    boolean
    Default: TRUE
    Description

    This property indicates whether the product is physical or digital. If the product is physical, the value is true. If the product is digital, the value is false.

  • Name
    has_details
    Type
    boolean
    Default: FALSE
    Description

    This property indicates whether the product has details or not. If the product has details, the value is true. If the product has no details, the value is false.

  • Name
    has_pricing
    Type
    boolean
    Default: FALSE
    Description

    This property indicates whether the product has pricing options or not. If the product has pricing, the value is true. If the product has no pricing, the value is false.

  • Name
    is_organized
    Type
    boolean
    Default: FALSE
    Description

    This property indicates whether the product is organized or not. If the product is organized, the value is true. If the product is not organized, the value is false.

  • Name
    is_published
    Type
    boolean
    Default: FALSE
    Description

    This property indicates whether the product is published to the platforms or not. If the product is published, the value is true. If the product is not published, the value is false.

  • Name
    needs_review
    Type
    boolean
    Default: TRUE
    Description

    This property indicates whether the product needs review or not. If the product needs review, the value is true. If the product does not need review, the value is false.

  • Name
    out_of_sync
    Type
    boolean
    Default: FALSE
    Description

    This property indicates whether the product is out of sync or not. If the product is out of sync, the value is true. If the product is not out of sync, the value is false.

  • Name
    syncing_paused_at
    Type
    timestamp
    Default: NULL
    Description

    This property indicates the time in ISO_8601 when the product was paused from syncing.

  • Name
    status
    Type
    varchar(16)
    Default: DRAFT
    Description

    This property indicates the status of the product.

  • Name
    handle
    Type
    varchar(255)
    Description

    This property indicates the handle of the product. The handle is a unique identifier for the product that is used in URLs.

  • Name
    name
    Type
    varchar(255)
    Required
    Description

    This property indicates the name of the product.

  • Name
    model_type
    Type
    varchar(16)
    Required
    Description

    This property indicates the model type of the product.

  • Name
    product_code
    Type
    varchar(64)
    Description

    This property indicates the product code of the product.

  • Name
    product_group_code
    Type
    varchar(255)
    Description

    This property indicates the product group code of the product.

  • Name
    product_type
    Type
    varchar(255)
    Description

    This property indicates the product type of the product.

  • Name
    product_lifecycle_status
    Type
    varchar(64)
    Description

    This property indicates the product lifecycle status of the product.

  • Name
    pre_book_status
    Type
    tinyint(1)
    Description

    This property indicates whether the product is pre-bookable or not.

  • Name
    sold_count
    Type
    unsigned int
    Description

    This property indicates the number of products sold.

  • Name
    is_discounted
    Type
    tinyint(1)
    Description

    This property indicates whether the product is discounted or not.

  • Name
    weight
    Type
    varchar(16)
    Description

    This property indicates the weight of the product.

  • Name
    weight_unit
    Type
    varchar(8)
    Description

    This property indicates the weight unit of the product.

  • Name
    size_unit
    Type
    varchar(8)
    Description

    This property indicates the size unit of the product. This is used for length, width, and height.

  • Name
    length
    Type
    varchar(16)
    Description

    This property indicates the length of the product.

  • Name
    width
    Type
    varchar(16)
    Description

    This property indicates the width of the product.

  • Name
    height
    Type
    varchar(16)
    Description

    This property indicates the height of the product.

  • Name
    country_of_origin
    Type
    varchar(2)
    Description

    This property indicates the country of origin of the product. This is a two-letter country code.

  • Name
    commodity_description
    Type
    varchar(255)
    Description

    This property indicates the commodity description of the product.

  • Name
    taxable
    Type
    boolean
    Default: FALSE
    Description

    This property indicates whether the product is taxable or not. If the product is taxable, the value is true. If the product is not taxable, the value is false.

  • Name
    tax_code
    Type
    varchar(16)
    Description

    This property indicates the tax code of the product.

  • Name
    created_at
    Type
    timestamp
    Description

    This property indicates the time in ISO_8601 when the product was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    This property indicates the time in ISO_8601 when the product was last updated.

  • Name
    created_by
    Type
    foreignId
    Description

    This property indicates the user who created the product.

  • Name
    updated_by
    Type
    foreignId
    Description

    This property indicates the user who updated the product recently.

The Product resource

JSON
{
  "id": "123456789",
  "brand_id": "987654321",
  "metadata_id": "456789012",
  "image_id": "789012345",
  "is_tangible": true,
  "has_details": false,
  "has_pricing": false,
  "is_organized": true,
  "is_published": false,
  "needs_review": true,
  "out_of_sync": false,
  "syncing_paused_at": null,
  "status": "DRAFT",
  "name": "Sample Product",
  "model_type": "Simple",
  "product_code": "ABC123",
  "product_category": "Electronics",
  "product_type": "Gadget",
  "product_lifecycle_status": "Active",
  "weight": "1.5",
  "weight_unit": "kg",
  "size_unit": "cm",
  "length": "10",
  "width": "5",
  "height": "15",
  "country_of_origin": "US",
  "commodity_description": "A high-quality electronic gadget.",
  "taxable": false,
  "tax_code": "TAX123",
  "created_at": "2024-01-07T12:30:00Z",
  "updated_at": "2024-01-07T14:45:00Z",
  "created_by": "789012345",
  "updated_by": "123456789"
}

Retrieve a count of products

This endpoint allows you to retrieve a count of products.

Examples

Retrieve a count of products

GET
/v1/products/count
curl --request GET \
  --url https://local.qooly.test/api/v1/products/count
  --header 'Authorization: Bearer token'
  --header 'Accept: application/json'

Create products

This endpoint allows you to create products.

Parameters

  • Name
    name
    Type
    varchar(255)
    Required
    Description

    The name of the product.

  • Name
    brand
    Type
    varchar(255)
    Required
    Description

    The brand of the product.

  • Name
    isTangible
    Type
    boolean
    Description

    Indicates whether the product is tangible or not.

  • Name
    status
    Type
    varchar(16)
    Description

    The status of the product.

  • Name
    modelType
    Type
    varchar(255)
    Description

    The model type of the product.

  • Name
    productCategory
    Type
    varchar(255)
    Description

    The category of the product.

  • Name
    productCode
    Type
    varchar(255)
    Required
    Description

    The code of the product.

  • Name
    productType
    Type
    varchar(255)
    Description

    The type of the product.

  • Name
    productLifecycleStatus
    Type
    varchar(64)
    Description

    The lifecycle status of the product.

  • Name
    preBookStatus
    Type
    boolean
    Description

    Indicates whether the product is pre-bookable or not.

  • Name
    weightUnit
    Type
    varchar(16)
    Description

    The unit of weight for the product.

  • Name
    weight
    Type
    decimal
    Description

    The weight of the product.

  • Name
    sizeUnit
    Type
    varchar(16)
    Description

    The unit of size for the product.

  • Name
    length
    Type
    decimal
    Description

    The length of the product.

  • Name
    width
    Type
    decimal
    Description

    The width of the product.

  • Name
    height
    Type
    decimal
    Description

    The height of the product.

  • Name
    countryOfOrigin
    Type
    varchar(2)
    Description

    The country of origin of the product.

  • Name
    commodityDescription
    Type
    varchar(255)
    Description

    The commodity description of the product.

  • Name
    taxable
    Type
    boolean
    Description

    Indicates whether the product is taxable or not.

  • Name
    taxCode
    Type
    varchar(255)
    Description

    The tax code of the product.

  • Name
    rating
    Type
    decimal
    Description

    The rating of the product.

  • Name
    summary
    Type
    varchar(255)
    Description

    The summary of the product.

  • Name
    description
    Type
    text
    Description

    The description of the product.

  • Name
    seoTitle
    Type
    varchar(255)
    Description

    The SEO title of the product.

  • Name
    seoDescription
    Type
    varchar(255)
    Description

    The SEO description of the product.

  • Name
    seoKeywords
    Type
    varchar(255)
    Description

    The SEO keywords of the product.

  • Name
    seoURL
    Type
    varchar(255)
    Description

    The SEO URL of the product.

  • Name
    options
    Type
    array
    Description

    An array of options for the product.

  • Name
    variants
    Type
    array
    Description

    An array of variants for the product.

  • Name
    prices
    Type
    array
    Description

    An array of prices for the product.

  • Name
    metadata
    Type
    array
    Description

    An array of metadata for the product.

Create products

POST
/v1/products
curl --request POST \
  --url https://local.qooly.test/api/v1/products 
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer token' \
  --data '{
    "name": "Sample Product",
    "brand": "Sample Brand",
    "isTangible": true,
    "status": "Draft",
    "modelType": "Simple",
    "productCategory": "Electronics",
    "productCode": "ABC123",
    "productType": "Gadget",
    "productLifecycleStatus": "Active",
    "preBookStatus": false,
    "weightUnit": "kg",
    "weight": 1.5,
    "sizeUnit": "cm",
    "length": 10,
    "width": 5,
    "height": 15,
    "countryOfOrigin": "US",
    "commodityDescription": "A high-quality electronic gadget.",
    "taxable": false,
    "taxCode": "TAX123",
    "rating": 4.5,
    "summary": "A high-quality electronic gadget.",
    "description": "A high-quality electronic gadget.",
    "seoTitle": "Sample Product",
    "seoDescription": "A high-quality electronic gadget.",
    "seoKeywords": "Sample Product",
    "seoURL": "sample-product",
    "options": [
      "Size": ["Small", "Medium"],
    ],
    "variants": [
      "sku": "ABC123",
      "barcode": "123456789",
      "weight_unit": "kg",
      "weight": 1.5,
      "size_unit": "cm",
      "length": 10,
      "width": 5,
      "height": 15,
      "country_of_origin": "US",
      "commodity_description": "A high-quality electronic gadget.",
      "taxable": false,
      "tax_code": "TAX123",
      "inventoryItems": [
        {
          "inventoryLocationCode": 50001,
          "available": 100
        },
        {
          "inventoryLocationCode": 50002,
          "available": 200
        }
      ],
      "futureInventoryItems": [
        {
          "inventoryLocationCode": 50001,
          "available": 100,
          "availableFrom": "2024-01-07T12:30:00Z",
        },
        {
          "inventoryLocationCode": 50002,
          "available": 200,
          "availableFrom": "2024-01-07T12:30:00Z",
        }
      ],
    ],
    "prices": [
      {
        "value": 100,
        "type": "retail",
        "currency": "USD"
      },
      {
        "value": 200,
        "type": "wholesale",
        "currency": "USD"
      }
    ],
    "metadata": [
      {
        "key": "m_1",
        "namespace": "global",
        "value": "Metafield1"
      },
      {
        "key": "m_2",
        "namespace": "global",
        "value": "Metafield2"
      }
    ]
  }'

Upsert products

This endpoint allows you to Upsert products.

Parameters

  • Name
    name
    Type
    varchar(255)
    Description

    The name of the product.

  • Name
    brand
    Type
    varchar(255)
    Required
    Description

    The brand of the product.

  • Name
    isTangible
    Type
    boolean
    Description

    Indicates whether the product is tangible or not.

  • Name
    status
    Type
    varchar(16)
    Description

    The status of the product.

  • Name
    modelType
    Type
    varchar(255)
    Description

    The model type of the product.

  • Name
    productCategory
    Type
    varchar(255)
    Description

    The category of the product.

  • Name
    productCode
    Type
    varchar(255)
    Required
    Description

    The code of the product.

  • Name
    productType
    Type
    varchar(255)
    Description

    The type of the product.

  • Name
    productLifecycleStatus
    Type
    varchar(64)
    Description

    The lifecycle status of the product.

  • Name
    preBookStatus
    Type
    boolean
    Description

    Indicates whether the product is pre-bookable or not.

  • Name
    weightUnit
    Type
    varchar(16)
    Description

    The unit of weight for the product.

  • Name
    weight
    Type
    decimal
    Description

    The weight of the product.

  • Name
    sizeUnit
    Type
    varchar(16)
    Description

    The unit of size for the product.

  • Name
    length
    Type
    decimal
    Description

    The length of the product.

  • Name
    width
    Type
    decimal
    Description

    The width of the product.

  • Name
    height
    Type
    decimal
    Description

    The height of the product.

  • Name
    countryOfOrigin
    Type
    varchar(2)
    Description

    The country of origin of the product.

  • Name
    commodityDescription
    Type
    varchar(255)
    Description

    The commodity description of the product.

  • Name
    taxable
    Type
    boolean
    Description

    Indicates whether the product is taxable or not.

  • Name
    taxCode
    Type
    varchar(255)
    Description

    The tax code of the product.

  • Name
    rating
    Type
    decimal
    Description

    The rating of the product.

  • Name
    summary
    Type
    varchar(255)
    Description

    The summary of the product.

  • Name
    description
    Type
    text
    Description

    The description of the product.

  • Name
    seoTitle
    Type
    varchar(255)
    Description

    The SEO title of the product.

  • Name
    seoDescription
    Type
    varchar(255)
    Description

    The SEO description of the product.

  • Name
    seoKeywords
    Type
    varchar(255)
    Description

    The SEO keywords of the product.

  • Name
    seoURL
    Type
    varchar(255)
    Description

    The SEO URL of the product.

  • Name
    options
    Type
    array
    Description

    An array of options for the product.

  • Name
    variants
    Type
    array
    Description

    An array of variants for the product.

  • Name
    prices
    Type
    array
    Description

    An array of prices for the product.

  • Name
    metadata
    Type
    array
    Description

    An array of metadata for the product.

Upsert products

POST
/v1/products/upsert
curl --request POST \
  --url https://local.qooly.test/api/v1/products/upsert \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer token' \
  --data '{
      "name": "Sample Product",
      "brand": "Sample Brand",
      "isTangible": true,
      "status": "Draft",
      "modelType": "Simple",
      "productCategory": "Electronics",
      "productCode": "ABC123",
      "productType": "Gadget",
      "productLifecycleStatus": "Active",
      "preBookStatus": false,
      "weightUnit": "kg",
      "weight": 1.5,
      "sizeUnit": "cm",
      "length": 10,
      "width": 5,
      "height": 15,
      "countryOfOrigin": "US",
      "commodityDescription": "A high-quality electronic gadget.",
      "taxable": false,
      "taxCode": "TAX123",
      "rating": 4.5,
      "summary": "A high-quality electronic gadget.",
      "description": "A high-quality electronic gadget.",
      "seoTitle": "Sample Product",
      "seoDescription": "A high-quality electronic gadget.",
      "seoKeywords": "Sample Product",
      "seoURL": "sample-product",
      "options": [
        "Size": ["Small", "Medium"],
      ],
      "variants": [
        "sku": "ABC123",
        "barcode": "123456789",
        "weight_unit": "kg",
        "weight": 1.5,
        "size_unit": "cm",
        "length": 10,
        "width": 5,
        "height": 15,
        "country_of_origin": "US",
        "commodity_description": "A high-quality electronic gadget.",
        "taxable": false,
        "tax_code": "TAX123",
        "inventoryItems": [
          {
            "inventoryLocationCode": 50001,
            "available": 100
          },
          {
            "inventoryLocationCode": 50002,
            "available": 200
          }
        ],
        "futureInventoryItems": [
          {
            "inventoryLocationCode": 50001,
            "available": 100,
            "availableFrom": "2024-01-07T12:30:00Z",
          },
          {
            "inventoryLocationCode": 50002,
            "available": 200,
            "availableFrom": "2024-01-07T12:30:00Z",
          }
        ],
      ],
      "prices": [
        {
          "value": 100,
          "type": "retail",
          "currency": "USD"
        },
        {
          "value": 200,
          "type": "wholesale",
          "currency": "USD"
        }
      ],
      "metadata": [
        {
          "key": "m_1",
          "namespace": "global",
          "value": "Metafield1"
        },
        {
          "key": "m_2",
          "namespace": "global",
          "value": "Metafield2"
        }
      ]
    }'

Update product data

This endpoint allows you to update product data.

Parameters

  • Name
    name
    Type
    varchar(255)
    Description

    The name of the product.

  • Name
    brand
    Type
    varchar(255)
    Required
    Description

    The brand of the product.

  • Name
    isTangible
    Type
    boolean
    Description

    Indicates whether the product is tangible or not.

  • Name
    productType
    Type
    varchar(255)
    Description

    The type of the product.

  • Name
    productLifecycleStatus
    Type
    varchar(64)
    Description

    The lifecycle status of the product.

  • Name
    preBookStatus
    Type
    boolean
    Description

    Indicates whether the product is pre-bookable or not.

  • Name
    weightUnit
    Type
    varchar(16)
    Description

    The unit of weight for the product.

  • Name
    weight
    Type
    decimal
    Description

    The weight of the product.

  • Name
    sizeUnit
    Type
    varchar(16)
    Description

    The unit of size for the product.

  • Name
    length
    Type
    decimal
    Description

    The length of the product.

  • Name
    width
    Type
    decimal
    Description

    The width of the product.

  • Name
    height
    Type
    decimal
    Description

    The height of the product.

  • Name
    countryOfOrigin
    Type
    varchar(2)
    Description

    The country of origin of the product.

  • Name
    commodityDescription
    Type
    varchar(255)
    Description

    The commodity description of the product.

  • Name
    taxable
    Type
    boolean
    Description

    Indicates whether the product is taxable or not.

  • Name
    taxCode
    Type
    varchar(255)
    Description

    The tax code of the product.

  • Name
    rating
    Type
    decimal
    Description

    The rating of the product.

  • Name
    summary
    Type
    varchar(255)
    Description

    The summary of the product.

  • Name
    description
    Type
    text
    Description

    The description of the product.

  • Name
    seoTitle
    Type
    varchar(255)
    Description

    The SEO title of the product.

  • Name
    seoDescription
    Type
    varchar(255)
    Description

    The SEO description of the product.

  • Name
    seoKeywords
    Type
    varchar(255)
    Description

    The SEO keywords of the product.

  • Name
    seoURL
    Type
    varchar(255)
    Description

    The SEO URL of the product.

Update Product Data

POST
/v1/products/update-product-data
curl --request POST \
  --url https://local.qooly.test/api/v1/products/update-product-data \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer token' \
  --data '{
    "name": "Sample Product",
    "brand": "Sample Brand",
    "isTangible": true,
    "productType": "Gadget",
    "productLifecycleStatus": "Active",
    "preBookStatus": false,
    "weightUnit": "kg",
    "weight": 1.5,
    "sizeUnit": "cm",
    "length": 10,
    "width": 5,
    "height": 15,
    "countryOfOrigin": "US",
    "commodityDescription": "A high-quality electronic gadget.",
    "taxable": false,
    "taxCode": "TAX123",
    "rating": 4.5,
    "summary": "A high-quality electronic gadget.",
    "description": "A high-quality electronic gadget.",
    "seoTitle": "Sample Product",
    "seoDescription": "A high-quality electronic gadget.",
    "seoKeywords": "Sample Product",
    "seoURL": "sample-product"
  }'

Update product metadata

This endpoint allows you to update product metadata.

Parameters

  • Name
    brand
    Type
    varchar(255)
    Required
    Description

    The brand of the product.

  • Name
    productCode
    Type
    varchar(64)
    Required
    Description

    The code of the product.

  • Name
    metadata
    Type
    array
    Required
    Description

    An array of metadata for the product.

Update Product Metadata

POST
/v1/products/update-product-metadata
curl --request POST \
  --url https://local.qooly.test/api/v1/products/update-product-metadata \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer token' \
  --data '{
    "brand": "Sample Brand",
    "productCode": "ABC123",
    "metadata": [
      {
          "namespace": "global",
          "key" : "m_1",
          "value": "Metafield1"
      },
      {
          "namespace": "global",
          "key" : "m_2",
          "value": "Metafield2"
      }
    ]
  }'

Update product prices

This endpoint allows you to update product prices.

Parameters

  • Name
    brand
    Type
    varchar(255)
    Required
    Description

    The brand of the product.

  • Name
    productCode
    Type
    varchar(64)
    Required
    Description

    The code of the product.

  • Name
    prices
    Type
    array
    Required
    Description

    An array of prices for the product.

Update Product Prices

POST
/v1/products/update-product-prices
curl --request POST \
  --url https://local.qooly.test/api/v1/products/update-product-prices \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer token' \
  --data '{
      "brand": "Sample Brand",
      "productCode": "ABC123",
      "prices": [
        {
          "type": "retail",
          "currency" : "USD",
          "value": "100"
        },
        {
          "type": "wholesale",
          "currency" : "USD",
          "value": "200"
        }
      ]
    }'

Update product inventory

This endpoint allows you to update product inventory.

Parameters

  • Name
    brand
    Type
    varchar(255)
    Required
    Description

    The brand of the product.

  • Name
    productCode
    Type
    varchar(64)
    Required
    Description

    The code of the product.

  • Name
    variants
    Type
    array
    Required
    Description

    An array of variants for the product.

Update Product Inventory

POST
/v1/products/update-product-inventory
curl --request POST \
  --url https://local.qooly.test/api/v1/products/update-product-inventory \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer token' \
  --data '{
    "brand": "Sample Brand",
    "productCode": "ABC123",
    "variants": [
      {
        "barcode": 123456789,
        "sku": "ABC123",
        "inventoryItems": [
          {
            "inventoryLocationCode": 50001,
            "available": 100
          },
          {
            "inventoryLocationCode": 50002,
            "available": 200
          }
        ]
      },
      {
        "barcode": 987654321,
        "sku": "ABC321",
        "inventoryItems": [
          {
            "inventoryLocationCode": 50001,
            "available": 50
          },
          {
            "inventoryLocationCode": 50002,
            "available": 100
          }
        ],
        "futureInventoryItems": [
          {
            "inventoryLocationCode": 50001,
            "available": 150,
            "availableFrom": "2024-01-07",
          }
        ]
      }
    ]
  }'