Price

Version 1.0

The Price Entity plays a pivotal role in our platform, overseeing the management of pricing information for products and services. It encompasses crucial details like the price amount, currency, and applicable discounts or promotions. This entity is essential for maintaining transparent and accurate pricing across the marketplace, ensuring a fair and competitive environment. By organizing price data meticulously, it empowers merchants to set, update, and optimize pricing strategies, contributing to a dynamic and customer-friendly marketplace.


Price Entity

  • Name
    id
    Type
    string
    Required
    Description

    Every price entry is assigned a unique identifier - an unsigned 64-bit integer known as the Price ID. This specific number is exclusive and distinct across the entire Qooly platform, ensuring an unparalleled level of uniqueness for each price entry.

  • Name
    currency_id
    Type
    foreignId
    Required
    Description

    The ID of the currency associated with the price. This is a foreign ID referring to the Currency Entity.

  • Name
    product_id
    Type
    foreignId
    Required
    Description

    The ID of the product associated with the price. This is a foreign ID referring to the Product Entity.

  • Name
    product_variant_id
    Type
    foreignId
    Required
    Description

    The ID of the product variant associated with the price. This is a foreign ID referring to the Product Variant Entity.

  • Name
    cost
    Type
    decimal
    Required
    Description

    The cost price of the product variant.

  • Name
    msrp
    Type
    decimal
    Required
    Description

    The Manufacturer's Suggested Retail Price (MSRP) for the product variant.

  • Name
    retail
    Type
    decimal
    Required
    Description

    The retail price of the product variant.

  • Name
    wholesale
    Type
    decimal
    Required
    Description

    The wholesale price of the product variant.

  • Name
    code
    Type
    string
    Required
    Description

    A code representing the platform associated with the price entry (e.g., amazon-us, shopify-us).

  • Name
    created_at
    Type
    timestamp
    Description

    This property indicates the time in ISO_8601 when the price entry was created.

  • Name
    updated_at
    Type
    timestamp
    Description

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

  • Name
    created_by
    Type
    foreignId
    Description

    This property indicates the user who created the price entry.

  • Name
    updated_by
    Type
    foreignId
    Description

    This property indicates the user who updated the price entry recently.

The Price resource

JSON
{
  "id": "123456789",
  "currency_id": "987654321",
  "product_id": "456789012",
  "product_variant_id": "789012345",
  "cost": 50.0,
  "msrp": 99.99,
  "retail": 79.99,
  "wholesale": 59.99,
  "code": "amazon-us",
  "created_at": "2024-01-19T10:45:00Z",
  "updated_at": "2024-01-19T12:30:00Z",
  "created_by": "789012345",
  "updated_by": "987654321"
}

Create a single price

This endpoint allows you to create a single price for a specific product variant.

Required Fields

  • Name
    currency_id
    Type
    foreignId
    Required
    Description
  • Name
    cost
    Type
    decimal
    Required
    Description
  • Name
    msrp
    Type
    decimal
    Required
    Description
  • Name
    retail
    Type
    decimal
    Required
    Description
  • Name
    wholesale
    Type
    decimal
    Required
    Description
  • Name
    code
    Type
    string
    Required
    Description

Examples

Create a single price for a product variant

POST
/v1/products/123456789/variants/987654321/prices
curl --request POST \
  --url https://api.qooly.io/v1/products/123456789/variants/987654321/prices \
  --header 'Content-Type: application/json' \
  --data '{
    "currency_id": "789012345",
    "cost": 50.0,
    "msrp": 99.99,
    "retail": 79.99,
    "wholesale": 59.99,
    "code": "amazon-us"
  }'

Retrieve a single price

This endpoint allows you to retrieve a single price for a specific product variant.

Required Parameters

  • Name
    product_id
    Type
    string
    Required
    Description
  • Name
    variant_id
    Type
    string
    Required
    Description
  • Name
    price_id
    Type
    string
    Required
    Description

Examples

Retrieve a single price for a product variant

GET
/v1/products/123456789/variants/987654321/prices/789012345
curl --request GET \
  --url https://api.qooly.io/v1/products/123456789/variants/987654321/prices/789012345

Retrieve all prices

This endpoint allows you to retrieve all prices for a specific product variant.

Required Parameters

  • Name
    product_id
    Type
    string
    Required
    Description
  • Name
    variant_id
    Type
    string
    Required
    Description

Examples

Retrieve all prices for a product variant

GET
/v1/products/123456789/variants/987654321/prices
curl --request GET \
  --url https://api.qooly.io/v1/products/123456789/variants/987654321/prices

Update a single price

This endpoint allows you to update a single price for a specific product variant.

Required Parameters

  • Name
    product_id
    Type
    string
    Required
    Description
  • Name
    variant_id
    Type
    string
    Required
    Description
  • Name
    price_id
    Type
    string
    Required
    Description

Examples

Update a single price for a product variant

PATCH
/v1/products/123456789/variants/987654321/prices/789012345
curl --request PATCH \
  --url https://api.qooly.io/v1/products/123456789/variants/987654321/prices/789012345 \
  --header 'Content-Type: application/json' \
  --data '{
    "cost": 55.0,
    "retail": 85.99
  }'

Delete a single price

This endpoint allows you to delete a single price for a specific product variant.

Required Parameters

  • Name
    product_id
    Type
    string
    Required
    Description
  • Name
    variant_id
    Type
    string
    Required
    Description
  • Name
    price_id
    Type
    string
    Required
    Description

Examples

Delete a single price for a product variant

DELETE
/v1/products/123456789/variants/987654321/prices/789012345
curl --request DELETE \
  --url https://api.qooly.io/v1/products/123456789/variants/987654321/prices/789012345