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
{
"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
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"
}'
Create a single price for a product variant
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"
}'
{
"id": "789012345",
"currency_id": "987654321",
"cost": 50.0,
"msrp": 99.99,
"retail": 79.99,
"wholesale": 59.99,
"code": "amazon-us",
"created_at": "2024-01-19T10:45:00Z",
"created_by": "123456789",
}
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
curl --request GET \
--url https://api.qooly.io/v1/products/123456789/variants/987654321/prices/789012345
Retrieve a single price for a product variant
curl --request GET \
--url https://api.qooly.io/v1/products/123456789/variants/987654321/prices/789012345
{
"id": "789012345",
"currency_id": "987654321",
"cost": 50.0,
"msrp": 99.99,
"retail": 79.99,
"wholesale": 59.99,
"code": "amazon-us",
"created_at": "2024-01-19T10:45:00Z",
"created_by": "123456789",
}
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
curl --request GET \
--url https://api.qooly.io/v1/products/123456789/variants/987654321/prices
Retrieve all prices for a product variant
curl --request GET \
--url https://api.qooly.io/v1/products/123456789/variants/987654321/prices
[
{
"id": "789012345",
"currency_id": "987654321",
"cost": 50.0,
"msrp": 99.99,
"retail": 79.99,
"wholesale": 59.99,
"code": "amazon-us",
"created_at": "2024-01-19T10:45:00Z",
"created_by": "123456789",
},
{
"id": "789012345",
"currency_id": "34252643",
"cost": 12.0,
"msrp": 23.99,
"retail": 24.99,
"wholesale": 12.99,
"code": "amazon-ca",
"created_at": "2024-01-19T10:45:00Z",
"created_by": "123456789",
},
]
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
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
}'
Update a single price for a product variant
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
}'
{
"id": "789012345",
"currency_id": "987654321",
"cost": 55.0,
"msrp": 99.99,
"retail": 85.99,
"wholesale": 59.99,
"code": "amazon-us",
"created_at": "2024-01-19T10:45:00Z",
"created_by": "123456789",
"updated_at": "2024-01-19T15:45:00Z",
"updated_by": "789012345"
}
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
curl --request DELETE \
--url https://api.qooly.io/v1/products/123456789/variants/987654321/prices/789012345
Delete a single price for a product variant
curl --request DELETE \
--url https://api.qooly.io/v1/products/123456789/variants/987654321/prices/789012345
{}