Skip to content

Commit

Permalink
09 - Product Collections (#489)
Browse files Browse the repository at this point in the history
* Update OpenAPI.json

* Update OpenAPI.json

* update schema for collection object

* Update Changelog.md

* changelog - product collections

* remove stoplight tags

* add new slug, update order

* Update OpenAPI.json

* update product_collections_collection_item name

* update openAPI

* add missing filter keys for product collection

* Update PRODUCT-COLLECTIONS-API-Product-Collection-Object.md
  • Loading branch information
weronika-kurczyna authored Oct 12, 2023
1 parent edb1a1f commit ac601a8
Show file tree
Hide file tree
Showing 8 changed files with 577 additions and 139 deletions.
34 changes: 32 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog


## 20231012 - Product Collections

**New models**
- product_collections_get_response_body
- product_collections_list_products_response_body
- product_collections_sku_in_collection
- product_collections_product_in_collection
- product_collections_collection_item
- - product_collections_collection_item_base
- product_collections_static_collection
- product_collections_dynamic_collection
- product_collections_list_response_body
- product_collections_create_request_body
- product_collections_create_static_request_body
- product_collections_create_dynamic_request_body


**Endpoint changes**
- Added missing method for endpoint: POST `/v1/product-collections`
- Request body schema: `product_collections_create_request_body`
- Response body schema: `product_collections_collection`
- GET `/v1/product-collections`
- New response schema: `product_collections_list_response_body` (old one: `12_res_product-collections`)
- GET `/v1/product-collections/{productCollectionId}`
- New response schema: `product_collections_get_response_body` (old one: `12_obj_product_collection_object`)
- GET `/v1/product-collections/{productCollectionId}/products`
- New response schema: `product_collections_list_products_response_body` (old one: `11_res_product-collections_productCollectionID_products`)
- /v1/product-collection-object
- New response schema: `product_collections_collection_item` (old one: `12_obj_product_collection_object`)

## 20231011

#### New schemas:
Expand Down Expand Up @@ -38,7 +69,6 @@
#### New endpoint
- POST /v1/loyalties/{campaignId}/tiers


## 20231009

#### New schemas:
Expand Down Expand Up @@ -535,4 +565,4 @@ The following endpoints in the OpenAPI document found in the `paths` object are
`/v1/category-object`
`/v1/metadata-schema-object`
`/v1/location-object`
`/v1/qualification-object`
`/v1/qualification-object`
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ categorySlug: voucherify-api
slug: delete-product-collection
parentDocSlug: product-collections-api
hidden: false
order: 5
order: 6
---
[block:html]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ categorySlug: voucherify-api
slug: list-products-in-collection
parentDocSlug: product-collections-api
hidden: false
order: 4
order: 5
---
[block:html]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,75 @@ order: 1
## Product Collection Object
<p>This is an object representing a product collection.</p><p>The products can be grouped into collections by the creation of a products collection object. You can retrieve a product collection and a list of products in the collection. Product collections are identified by a unique ID.</p>

One of:
All of:

[Static Product Collection](#static-product-collection), [Dynamic Product Collection](#dynamic-product-collection)
1. [Product Collection Base](#product-collection-base)
2. Any of: [Static Product Collection](#static-product-collection), [Dynamic Product Collection](#dynamic-product-collection)

## Static Product Collection
## Product Collection Base
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Product collection ID.</p> **Example:** <p>pc_a11pr0dUc75</p> |
| id</br>`string` | <p>Product collection ID.</p> |
| name</br>`string` | <p>Unique user-defined product collection name.</p> **Example:** <p>All Products</p> |
| type</br>`string` | <p>Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).</p> Available values: `AUTO_UPDATE`, `STATIC` |
| products</br>`array` | <p>Defines a set of products for a <code>STATIC</code> product collection type.</p> Array of: <table><thead><tr><th style="text-align:left">Attributes</th><th style="text-align:left">Description</th></tr></thead><tbody><tr><td style="text-align:left">id</br><code>string</code></td><td style="text-align:left"><p>The product ID.</p> <strong>Example:</strong> <p>prod_0a41bcf807c5fcaaf6</p></td></tr><tr><td style="text-align:left">object</br><code>string</code></td><td style="text-align:left"><p>Denotes the type of object represented by the ID.</p></td></tr></tbody></table> |
| created_at</br>`string` | <p>Timestamp representing the date and time when the product collection was created in ISO 8601 format.</p> **Example:** <p>2021-12-09T12:51:29.898Z</p> |
| updated_at</br>`string` | <p>Timestamp representing the date and time when the product collection was updated in ISO 8601 format.</p> **Example:** <p>2022-04-08T04:56:41.142Z</p> |
| object</br>`string` | <p>The type of object represented by JSON. This object stores information about the static product collection.</p> |
| object | <p>The type of object represented by JSON. This object stores information about the static product collection.</p> Available values: `products_collection` |

## Static Product Collection
| Attributes | Description |
|:-----|:--------|
| type | <p>Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).</p> Available values: `STATIC` |
| products</br>`array` | <p>Defines a set of products for a <code>STATIC</code> product collection type.</p> Array of: <table><thead><tr><th style="text-align:left">Attributes</th><th style="text-align:left">Description</th></tr></thead><tbody><tr><td style="text-align:left">id</br><code>string</code></td><td style="text-align:left"><p>The product ID.</p> <strong>Example:</strong> <p>prod_0a41bcf807c5fcaaf6</p></td></tr><tr><td style="text-align:left">product_id</br><code>string</code></td><td style="text-align:left"><p>Product ID for SKUs.</p></td></tr><tr><td style="text-align:left">object</td><td style="text-align:left"><p>Denotes the type of object represented by the ID.</p> Available values: <code>sku</code>, <code>product</code></td></tr></tbody></table> |

## Dynamic Product Collection
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Product collection ID.</p> **Example:** <p>pc_a11pr0dUc75</p> |
| name</br>`string` | <p>Unique user-defined product collection name.</p> **Example:** <p>All Products</p> |
| type</br>`string` | <p>Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).</p> Available values: `AUTO_UPDATE`, `STATIC` |
| filter</br>`object` | <p>Defines a set of criteria and boundary conditions for an <code>AUTO_UPDATE</code> product collection type.</p> |
| created_at</br>`string` | <p>Timestamp representing the date and time when the product collection was created in ISO 8601 format.</p> **Example:** <p>2021-12-09T12:51:29.898Z</p> |
| updated_at</br>`string` | <p>Timestamp representing the date and time when the product collection was updated in ISO 8601 format.</p> **Example:** <p>2022-04-08T04:56:41.142Z</p> |
| object</br>`string` | <p>The type of object represented by JSON. This object stores information about the dynamic product collection.</p> |
| type | <p>Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).</p> Available values: `AUTO_UPDATE` |
| filter</br>`object` | <p>Defines a set of criteria and boundary conditions for an <code>AUTO_UPDATE</code> product collection type.</p> <table><thead><tr><th style="text-align:left">Attributes</th><th style="text-align:left">Description</th></tr></thead><tbody><tr><td style="text-align:left">junction</td><td style="text-align:left">See: <a href="#junction">Junction</a></td></tr><tr><td style="text-align:left">id</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">product_id</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">source_id</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">name</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">price</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">object</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">attributes</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">metadata</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">image_url</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">skus</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">created_at</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr><tr><td style="text-align:left">updated_at</td><td style="text-align:left">See: <a href="#field-conditions">Field Conditions</a></td></tr></tbody></table> |

## Junction
Available values: `and`, `AND`, `or`, `OR`

## Field Conditions
| Attributes | Description |
|:-----|:--------|
| conditions | <p>Data filters used to narrow the data records to be returned in the result.</p> See: [Filters Condition](#filters-condition) |

## Filters Condition
| Attributes | Description |
|:-----|:--------|
| $in | See: [Any](#any) |
| $not_in | See: [Any](#any) |
| $is | See: [Any](#any) |
| $is_days_ago | See: [Any](#any) |
| $is_days_in_future | See: [Any](#any) |
| $is_not | See: [Any](#any) |
| $has_value | See: [Any](#any) |
| $is_unknown | See: [Any](#any) |
| $contains | See: [Any](#any) |
| $not_contain | See: [Any](#any) |
| $starts_with | See: [Any](#any) |
| $ends_with | See: [Any](#any) |
| $more_than | See: [Any](#any) |
| $less_than | See: [Any](#any) |
| $more_than_ago | See: [Any](#any) |
| $less_than_ago | See: [Any](#any) |
| $more_than_future | See: [Any](#any) |
| $less_than_future | See: [Any](#any) |
| $more_than_equal | See: [Any](#any) |
| $less_than_equal | See: [Any](#any) |
| $after | See: [Any](#any) |
| $before | See: [Any](#any) |
| $count | See: [Any](#any) |
| $count_less | See: [Any](#any) |
| $count_more | See: [Any](#any) |

## Any
Any of:

1. Array any of: string, number, object
2. string
3. number
4. object

[block:html]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ categorySlug: voucherify-api
slug: get-product-collection
parentDocSlug: product-collections-api
hidden: false
order: 3
order: 4
---
[block:html]
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Create Product Collection
type: endpoint
categorySlug: voucherify-api
slug: create-product-collection
parentDocSlug: product-collections-api
hidden: false
order: 3
---
[block:html]
{
"html": "<style>\n[title=\"Toggle library\"] { \n display: none; }\n.LanguagePicker-divider { \n display: none; }\n.Playground-section3VTXuaYZivJK > .APISectionHeader3LN_-QIR0m7x {\n display: none; }\n.LanguagePicker-languages1qVVo_v6AlP9 {\n display: none; }\n</style>"
}
[/block]
Loading

0 comments on commit ac601a8

Please sign in to comment.