Skip to content

Commit

Permalink
Merge branch 'master' into pz/types-012
Browse files Browse the repository at this point in the history
  • Loading branch information
p-zielinski committed Oct 12, 2023
2 parents c21dde0 + ac601a8 commit c4f9852
Show file tree
Hide file tree
Showing 11 changed files with 1,367 additions and 345 deletions.
72 changes: 69 additions & 3 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,74 @@
- GET /v1/promotions/stacks
- new response schema `PromotionsStacksListResponseBody` (old `3_res_list_promotion_stacks`)

## 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:
- LoyaltiesCreateTiersRequestBody
- LoyaltiesCreateTiersResponseBody
- LoyaltiesGetRewardAssignmentResponseBody
- LoyaltiesGetRewardDetailsResponseBody
- LoyaltiesListTiersRequestQuery
- LoyaltiesListLoyaltyTierEarningRulesRequestQuery
- LoyaltiesGetTierResponseBody
- LoyaltiesListTiersResponseBody
- LoyaltiesListMemberLoyaltyTiersResponseBody
- LoyaltiesListLoyaltyTierEarningRulesResponseBody
- CreateLoyaltyTier
- LoyaltyTier
- MappingMultiply
- MappingFixed
- EarningRule

#### Schemas changes
- GET /v1/loyalties/{campaignId}/tiers
- new response schema `LoyaltiesListTiersResponseBody` (old `8_res_list_loyalty_tiers`)
- GET /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}
- new response schema `LoyaltiesGetRewardAssignmentResponseBody` (old `4_obj_reward_assignment_object`)
- GET /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward
- new response schema `LoyaltiesGetRewardDetailsResponseBody` (old `4_obj_reward_object`)
- GET /v1/loyalties/{campaignId}/tiers/{tierId}
- new response schema `LoyaltiesGetTierResponseBody` (old `8_obj_loyalty_tier_object`)
- GET /v1/loyalties/{campaignId}/tiers/{tierId}/earning-rules
- new response schema `LoyaltiesListLoyaltyTierEarningRulesResponseBody` (old `8_res_list_loyalty_tier_earning_rules`)
- GET /v1/loyalties/members/{memberId}/tiers
- new response schema `LoyaltiesListMemberLoyaltyTiersResponseBody` (old `8_res_get_member_loyalty_tier`)
- GET /v1/loyalties/{campaignId}/members/{memberId}/points-expiration
- New response schema: `LoyaltiesGetPointsExpirationResponseBody` (old one: `8_res_get_points_expiration`)

#### New endpoint
- POST /v1/loyalties/{campaignId}/tiers

## 20231009

#### New schemas:
Expand Down Expand Up @@ -78,8 +146,6 @@
- /v1/loyalties/{campaignId}/members/{memberId}/points-expiration
- new response schema `LoyaltiesGetPointsExpirationResponseBody` (old `8_res_get_points_expiration`)



## 20230831 - Exports API

**New models**
Expand Down Expand Up @@ -525,4 +591,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`
4 changes: 2 additions & 2 deletions docs/reference-docs/EXPORTS-API-Export-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ order: 1
## Export
All of:

1. [ExportBase](#exportbase)
1. [Export Base](#export-base)
2. Any of: [Export Vouchers](#export-vouchers), [Export Redemptions](#export-redemptions), [Export Customers](#export-customers), [Export Publications](#export-publications), [Export Orders](#export-orders), [Export Points Expirations](#export-points-expirations), [Export Vouchers Transactions Expiration](#export-vouchers-transactions-expiration)

## ExportBase
## Export Base
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Unique export ID.</p> |
Expand Down
14 changes: 14 additions & 0 deletions docs/reference-docs/LOYALTIES-API-Create-Loyalty-Tiers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Create Loyalty Tiers
type: endpoint
categorySlug: voucherify-api
slug: create-loyalty-tiers
parentDocSlug: loyalties-api
hidden: false
order: 44
---
[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]
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 c4f9852

Please sign in to comment.