Skip to content

Commit

Permalink
Merge pull request #574 from voucherifyio/master
Browse files Browse the repository at this point in the history
Master to PW-data-synchronization
  • Loading branch information
p-woznikowski authored Nov 28, 2023
2 parents 0fff546 + 359b491 commit edff1df
Show file tree
Hide file tree
Showing 13 changed files with 1,413 additions and 865 deletions.
60 changes: 60 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Changelog

## 20231123 - Campaigns API

**Added schemas**
- CampaignResponse
- CampaignVoucher
- CodeConfig
- CodeConfigResponse
- CampaignsImportVoucherLoyaltyCard
- CampaignLoyaltyCardResponse
- CampaignLoyaltyCardResponse
- CampaignLoyaltyCardRequestBody
- LuckyDraw
- CampaignsCreateBase
- CampaignsUpdateBase
- CampaignsUpdateCouponCampaignBase
- CampaignsUpdateDiscountCouponsCampaign
- CampaignsUpdateGiftCampaign
- CampaignsUpdateReferralCampaign
- CampaignsUpdateLoyaltyCampaign
- CampaignsUpdateGiveawayCampaign
- CampaignsUpdatePromotionCampaign
- CampaignsCreateRequestBody
- CampaignsUpdateRequestBody
- CampaignsCreateDiscountCouponsCampaign
- CampaignsCreateReferralCampaign
- CampaignsCreateGiftCampaign
- CampaignsCreateLoyaltyCampaign
- CampaignsCreatePromotionCampaign
- CampaignsCreateGiveawayCampaign
- CampaignsCreateCampaignVoucherWithCodeRequestBody
- CampaignsCreateCampaignVoucherRequestBody
- CampaignsImportVoucherRequestBody
- CampaignsImportVoucherItem
- CampaignsListResponseBody
- DiscountCouponsCampaignVoucher
- ReferralCampaignVoucher
- GiveawayCampaignVoucher
- GiftCampaignVoucher
- LoyaltyCampaignVoucher
- PromotionTierCreateParams
- PromotionTiersList
- LoyaltyTiersExpirationAll

**Deleted schemas**
- 2_obj_campaign_object
- 2_req_create_campaign
- 2_req_create_campaign_discount_voucher
- 2_req_create_campaign_loyalty
- 2_req_create_campaign_gift
- 2_req_create_campaign_referral
- 2_req_create_campaign_promotion
- 2_req_update_campaign
- 2_req_add_vouchers_to_campaign
- 2_req_import_vouchers_to_campaign
- 2_obj_import_vouchers_to_campaign_object
- 2_res_list_campaigns
- 3_res_list_promotion_tiers_from_campaign
- 20_obj_category_object
- e_409_duplicate_found

## 20231117 - Quality Fixes

**Changed schemas**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Please refer to the following guides:
- [Guides](https://docs.voucherify.io/docs)
- [Recipes](https://docs.voucherify.io/recipes)
- [API Reference](https://docs.voucherify.io/reference/introduction-1)
- [Support Documentation](https://support.voucherify.io/)
- [Support Documentation](https://support.voucherify.io/)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Add Vouchers to Campaign
title: Add Voucher to Campaign
type: endpoint
categorySlug: voucherify-api
slug: add-vouchers-to-campaign
Expand Down
204 changes: 79 additions & 125 deletions docs/reference-docs/CAMPAIGNS-API-Campaign-Object.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ All of:
|:-----|:--------|
| conversion_event_type</br>`string` | <p>Define how a referral is triggered.</p> Available values: `redemption`, `custom_event` |
| custom_event</br>`object` | <p>Contains details about the custom event.</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">id</br><code>string</code></td><td style="text-align:left"><p>Unique custom event ID.</p> <strong>Example:</strong> <p>ms_Ll9enAm2BCN0M1s4VxWobLFM</p></td></tr><tr><td style="text-align:left">name</br><code>string</code></td><td style="text-align:left"><p>Custom event name.</p></td></tr></tbody></table> |
| referee_reward</br>`object` | <p>Defines the referee reward.</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">related_object_parent</br><code>object</code></td><td style="text-align:left"><p>Details of the resource from which the reward originates.</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">id</br><code>string</code></td><td style="text-align:left"><p>Unique ID of the reward source.</p> <strong>Example:</strong> <p>camp_kdxp3vf1clQ9CFs1jpqv3tZe</p></td></tr><tr><td style="text-align:left">name</br><code>string</code></td><td style="text-align:left"><p>Name of the reward source.</p></td></tr><tr><td style="text-align:left">object</br><code>string</code></td><td style="text-align:left"><p>Type of resource represented by the source of the reward.</p> Available values: <code>CAMPAIGN</code></td></tr></tbody></table></td></tr><tr><td style="text-align:left">type</br><code>string</code></td><td style="text-align:left"><p>Type of reward.</p> Available values: <code>LOYALTY_CARD</code>, <code>GIFT_VOUCHER</code></td></tr><tr><td style="text-align:left">amount</br><code>string</code></td><td style="text-align:left"><p>Define the number of <code>points</code> to add to a loyalty card or <code>credits</code> to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.</p></td></tr></tbody></table> |
| referee_reward</br>`object` | <p>Defines the referee reward.</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">related_object_parent</br><code>object</code></td><td style="text-align:left"><p>Details of the resource from which the reward originates.</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">id</br><code>string</code></td><td style="text-align:left"><p>Unique ID of the reward source.</p> <strong>Example:</strong> <p>camp_kdxp3vf1clQ9CFs1jpqv3tZe</p></td></tr><tr><td style="text-align:left">name</br><code>string</code></td><td style="text-align:left"><p>Name of the reward source.</p></td></tr><tr><td style="text-align:left">object</br><code>string</code></td><td style="text-align:left"><p>Type of resource represented by the source of the reward.</p> Available values: <code>CAMPAIGN</code></td></tr></tbody></table></td></tr><tr><td style="text-align:left">type</br><code>string</code></td><td style="text-align:left"><p>Type of reward.</p> Available values: <code>DISCOUNT_VOUCHER</code>, <code>LOYALTY_CARD</code>, <code>GIFT_VOUCHER</code>, <code>LUCKY_DRAW_CODE</code></td></tr><tr><td style="text-align:left">amount</br><code>string</code></td><td style="text-align:left"><p>Define the number of <code>points</code> to add to a loyalty card or <code>credits</code> to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.</p></td></tr></tbody></table> |

## Gift
| Attributes | Description |
Expand Down
7 changes: 4 additions & 3 deletions docs/reference-docs/LOYALTIES-API-Loyalty-Campaign-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ order: 1
| vouchers_generation_status</br>`string` | <p>Indicates the status of the campaign's vouchers.</p> Available values: `DONE`, `IN_PROGRESS`, `FAILED`, `DRAFT` |
| protected</br>`boolean` | <p>Indicates whether the resource can be deleted.</p> |
| category_id</br>`string` | <p>Unique category ID that this campaign belongs to.</p> **Example:** <p>cat_0b688929a2476386a7</p> |
| categories | See: [Category Object](#category-object) |
| categories | See: [Category](#category) |
| loyalty_tiers_expiration</br>`object` | <p>Defines the expiration mechanism for loyalty tiers.</p> Any of: [Balance](#balance), [Points in Period](#points-in-period) |
| object</br>`string` | <p>The type of object represented by JSON. This object stores information about the campaign.</p> |

Expand All @@ -47,15 +47,16 @@ order: 1
| code_config</br>`object` | <p>Defines code's pattern (prefix, suffix, length, charset, etc).</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">length</br><code>string</code></td><td style="text-align:left"><p>Number of characters in a generated code (excluding prefix and postfix).</p></td></tr><tr><td style="text-align:left">charset</br><code>string</code></td><td style="text-align:left"><p>Characters that can appear in the code.</p><p>Examples:</p><ul><li>Alphanumeric: <code>0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</code></li><li>Alphabetic: <code>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</code></li><li>Alphabetic Lowercase: <code>abcdefghijklmnopqrstuvwxyz</code></li><li>Alphabetic Uppercase: <code>ABCDEFGHIJKLMNOPQRSTUVWXYZ</code></li><li>Numbers: <code>0123456789</code></li><li>Custom: a custom character set</li></ul></td></tr><tr><td style="text-align:left">prefix</br><code>string</code></td><td style="text-align:left"><p>A text appended before the code.</p></td></tr><tr><td style="text-align:left">postfix</br><code>string</code></td><td style="text-align:left"><p>A text appended after the code.</p></td></tr><tr><td style="text-align:left">pattern</br><code>string</code></td><td style="text-align:left"><p>A pattern for codes where hashes (#) will be replaced with random characters. Overrides <code>length</code>.</p></td></tr></tbody></table> |
| is_referral_code</br>`boolean` | <p>Indicates whether the voucher is a referral code; this is <code>true</code> for campaign type <code>REFERRAL_PROGRAM</code>.</p> |

## Category Object
## Category
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Unique category ID assigned by Voucherify.</p> |
| name</br>`string` | <p>Category name.</p> |
| hierarchy</br>`integer` | <p>Category hierarchy.</p> |
| object</br>`string` | <p>The type of object represented by the JSON. This object stores information about the category.</p> Available values: `category` |
| created_at</br>`string` | <p>Timestamp representing the date and time when the category was created in ISO 8601 format.</p> **Example:** <p>2022-07-14T10:45:13.156Z</p> |
| updated_at</br>`string` | <p>Timestamp representing the date and time when the category was updated in ISO 8601 format.</p> **Example:** <p>2022-08-16T10:52:08.094Z</p> |
| object</br>`string` | <p>The type of object represented by the JSON. This object stores information about the category.</p> |
| stacking_rules_type</br>`string` | <p>The type of the stacking rule eligibility.</p> Available values: `JOINT`, `EXCLUSIVE` |

## Balance
| Attributes | Description |
Expand Down
7 changes: 4 additions & 3 deletions docs/reference-docs/LOYALTIES-API-Loyalty-Card-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ order: 2
| campaign_id</br>`string` | <p>Assigned by the Voucherify API, identifies the voucher's parent campaign.</p> **Example:** <p>camp_FNYR4jhqZBM9xTptxDGgeNBV</p> |
| category</br>`string` | <p>Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.</p> |
| category_id</br>`string` | <p>Unique category ID assigned by Voucherify.</p> **Example:** <p>cat_0bb343dee3cdb5ec0c</p> |
| categories</br>`array` | <p>Contains details about the category.</p> Array of [Category Object](#category-object) |
| categories</br>`array` | <p>Contains details about the category.</p> Array of [Category](#category) |
| type</br>`string` | <p>Defines the type of the voucher.</p> Available values: `LOYALTY_CARD` |
| discount</br>`null` | <p>Object representing discount parameters. Child attributes are present only if <code>type</code> is <code>DISCOUNT_VOUCHER</code>. Defaults to <code>null</code>.</p> |
| gift</br>`null` | <p>Object representing gift parameters. Child attributes are present only if <code>type</code> is <code>GIFT_VOUCHER</code>. Defaults to <code>null</code>.</p> |
Expand All @@ -38,15 +38,16 @@ order: 2
| publish</br>`object` | <p>This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event. A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or publish voucher API method.</p><!-- title: My Table Title --><table><thead><tr><th>Required</th><th style="text-align:center">Optional</th></tr></thead><tbody><tr><td><code>type</code>:<code>LOYALTY_CARD</code></td><td style="text-align:center"><code>type</code>:<code>DISCOUNT_VOUCHER</code></td></tr><tr><td><code>is_referral_code</code>:<code>true</code></td><td style="text-align:center"><code>type</code>:<code>GIFT_VOUCHER</code></td></tr></tbody></table> <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">object</br><code>string</code></td><td style="text-align:left"><p>The type of object represented is by default <code>list</code>. To get this list, you need to make a call to the endpoint returned in the <code>url</code> attribute.</p></td></tr><tr><td style="text-align:left">count</br><code>integer</code></td><td style="text-align:left"><p>Publication events counter.</p> <strong>Example:</strong> <p>0</p></td></tr><tr><td style="text-align:left">url</br><code>string</code></td><td style="text-align:left"><p>The endpoint where this list of publications can be accessed using a GET method. <code>/v1/vouchers/{voucher_code}/publications</code></p> <strong>Example:</strong> <p>/v1/vouchers/WVPblOYX/publications?page=1&amp;limit=10</p></td></tr></tbody></table> |
| object</br>`string` | <p>The type of object represented by JSON. Default is <code>voucher</code>.</p> |

## Category Object
## Category
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Unique category ID assigned by Voucherify.</p> |
| name</br>`string` | <p>Category name.</p> |
| hierarchy</br>`integer` | <p>Category hierarchy.</p> |
| object</br>`string` | <p>The type of object represented by the JSON. This object stores information about the category.</p> Available values: `category` |
| created_at</br>`string` | <p>Timestamp representing the date and time when the category was created in ISO 8601 format.</p> **Example:** <p>2022-07-14T10:45:13.156Z</p> |
| updated_at</br>`string` | <p>Timestamp representing the date and time when the category was updated in ISO 8601 format.</p> **Example:** <p>2022-08-16T10:52:08.094Z</p> |
| object</br>`string` | <p>The type of object represented by the JSON. This object stores information about the category.</p> |
| stacking_rules_type</br>`string` | <p>The type of the stacking rule eligibility.</p> Available values: `JOINT`, `EXCLUSIVE` |

[block:html]
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"readme-fix-reference-docs": "ts-node ./scripts/readme-fix-reference-docs.ts",
"remove-stoplight-tags-from-openapi": "ts-node ./scripts/remove-stoplight-tags-from-openapi.ts",
"remove-deprecated-from-openapi": "ts-node ./scripts/remove-deprecated-from-openapi.ts",
"generate-open-api-with-specific-endpoints": "ts-node ./scripts/generate-open-api-with-specific-endpoints.ts",
"manage-project": "ts-node ./scripts/build-md-tables-from-openapi.ts && ts-node ./scripts/manage-project.ts",
"readme-upload-missing-images": "ts-node ./scripts/readme-upload-missing-images.ts"
},
Expand Down
Loading

0 comments on commit edff1df

Please sign in to comment.