diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index be9a16adc..885ad08c3 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -16474,66 +16474,6 @@ } } }, - "7_obj_redemption_object": { - "title": "Redemption Object", - "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such an operation a [redemption rollback](ref:rollback-redemption).", - "anyOf": [ - { - "$ref": "#/components/schemas/7_obj_redemption_object_discount_voucher" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_gift_card" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_promotion_tier" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_stackable_discounts" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_voucher_fail" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_promotion_tier_fail" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_fail" - } - ] - }, - "7_obj_redemption_object_voucher": { - "title": "Redemption Object", - "description": "This is an object representing an attempted or successful voucher redemption.", - "anyOf": [ - { - "$ref": "#/components/schemas/7_obj_redemption_object_discount_voucher" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_gift_card" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_voucher_fail" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_discount_voucher" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_gift_card" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_loyalty_card" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_voucher_fail" - } - ] - }, "7_obj_redemption_object_voucher_extended": { "title": "Redemption Object", "description": "This is an object representing an attempted or successful voucher redemption.", @@ -17570,598 +17510,6 @@ } } }, - "7_obj_rollback_redemption_object_truncated": { - "title": "Rollback Redemption Object", - "description": "This is an object representing an attempted or successful voucher or promotion tier rollback.", - "anyOf": [ - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_discount_voucher" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_loyalty_card" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_gift_card" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_promotion_tier" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_voucher_fail" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_rollback_object_promotion_tier_fail" - } - ] - }, - "7_obj_rollback_redemption_object_extended": { - "title": "Rollback Redemption Object", - "description": "This is an object representing an attempted or successful voucher or promotion tier rollback.", - "anyOf": [ - { - "$ref": "#/components/schemas/7_obj_rollback_redemption_object_discount_voucher_extended" - }, - { - "$ref": "#/components/schemas/7_obj_rollback_redemption_object_loyalty_card_extended" - }, - { - "$ref": "#/components/schemas/7_obj_rollback_redemption_object_gift_card_extended" - }, - { - "$ref": "#/components/schemas/7_obj_rollback_redemption_object_promotion_tier_extended" - } - ] - }, - "7_obj_rollback_redemption_object_discount_voucher_extended": { - "type": "object", - "title": "Discount Voucher", - "description": "This is an object representing a redemption.", - "properties": { - "id": { - "type": "string", - "example": "rr_0bc92f81a6801f9bca", - "description": "Unique rollback redemption ID." - }, - "object": { - "type": "string", - "description": "The type of object represented by the JSON. This object stores information about the `redemption_rollback`.", - "default": "redemption_rollback" - }, - "date": { - "type": "string", - "format": "date-time", - "example": "2022-10-03T12:24:58.008Z", - "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured." - }, - "customer_id": { - "type": "string", - "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", - "description": "Unique customer ID of the redeeming customer." - }, - "tracking_id": { - "type": "string", - "example": "track_fxEMFiLowFHg==", - "description": "Hashed customer source ID." - }, - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption." - }, - "redemption": { - "type": "string", - "description": "The unique redemption ID of the initial redemption.", - "example": "r_0c5d6689b35320059a" - }, - "reason": { - "type": "string", - "description": "The reason for the redemption rollback." - }, - "result": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE" - ], - "description": "Redemption rollback result." - }, - "order": { - "description": "Defines the details of the order that is related to the redemption rollback.", - "$ref": "#/components/schemas/7_obj_order_object_rollback" - }, - "channel": { - "type": "object", - "description": "Defines the details of the channel through which the redemption rollback was issued.", - "properties": { - "channel_id": { - "type": "string", - "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH", - "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API." - }, - "channel_type": { - "type": "string", - "description": "The source of the channel for the redemption rollback. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.", - "enum": [ - "USER", - "API" - ] - } - } - }, - "customer": { - "type": "object", - "description": "Defines the customer that is related to the redemption.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of a customer that is assigned by Voucherify.", - "example": "cust_eWgXlBBiY6THFRJwX45Iakv4" - }, - "name": { - "type": "string", - "description": "Customer's first and last name." - }, - "email": { - "type": "string", - "description": "Customer's email address." - }, - "source_id": { - "type": "string", - "description": "The merchant’s customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service." - }, - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format." - }, - "object": { - "type": "string", - "description": "Type of object represented is `customer`.", - "default": "customer" - } - } - }, - "related_object_type": { - "type": "string", - "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |", - "enum": [ - "voucher" - ] - }, - "related_object_id": { - "type": "string", - "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher." - }, - "voucher": { - "$ref": "#/components/schemas/Voucher", - "description": "Defines the details of the voucher being redeemed." - } - } - }, - "7_obj_rollback_redemption_object_loyalty_card_extended": { - "type": "object", - "title": "Loyalty Card Voucher", - "description": "This is an object representing a loyalty card rollback redemption.", - "properties": { - "id": { - "type": "string", - "example": "rr_0bc92f81a6801f9bca", - "description": "Unique redemption rollback ID." - }, - "object": { - "type": "string", - "description": "The type of object represented by the JSON. This object stores information about the `redemption_rollback`.", - "default": "redemption_rollback" - }, - "date": { - "type": "string", - "format": "date-time", - "example": "2022-10-03T12:24:58.008Z", - "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured." - }, - "customer_id": { - "type": "string", - "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", - "description": "Unique customer ID of the redeeming customer." - }, - "tracking_id": { - "type": "string", - "example": "track_fxEMFiLowFHg==", - "description": "Hashed customer source ID." - }, - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption." - }, - "amount": { - "type": "integer", - "description": "Number of points being returned to the loyalty card." - }, - "redemption": { - "type": "string", - "description": "Unique redemption ID of the initial redemption.", - "example": "r_0b56726b09cfb73e84" - }, - "result": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE" - ], - "description": "Redemption rollback result." - }, - "order": { - "description": "Defines the details of the order that is related to the redemption rollback.", - "$ref": "#/components/schemas/7_obj_order_object_rollback" - }, - "channel": { - "type": "object", - "description": "Defines the details of the channel through which the redemption rollback was issued.", - "properties": { - "channel_id": { - "type": "string", - "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH", - "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API." - }, - "channel_type": { - "type": "string", - "description": "The source of the channel for the redemption rollback. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.", - "enum": [ - "USER", - "API" - ] - } - } - }, - "customer": { - "type": "object", - "description": "Defines the customer redeeming the reward.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of a customer that is assigned by Voucherify.", - "example": "cust_eWgXlBBiY6THFRJwX45Iakv4" - }, - "name": { - "type": "string", - "description": "Customer's first and last name." - }, - "email": { - "type": "string", - "description": "Customer's email address." - }, - "source_id": { - "type": "string", - "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service." - }, - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format." - }, - "object": { - "type": "string", - "description": "Type of object represented is `customer`.", - "default": "customer" - } - } - }, - "related_object_type": { - "type": "string", - "description": "Defines the related object. i.e. `voucher`.", - "enum": [ - "voucher" - ] - }, - "related_object_id": { - "type": "string", - "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher." - }, - "voucher": { - "$ref": "#/components/schemas/Voucher", - "description": "Defines the details of the voucher being redeemed." - }, - "reward": { - "description": "Defines the reward being redeemed.", - "anyOf": [ - { - "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_pay_with_points" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_product" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_sku" - }, - { - "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital" - } - ] - }, - "loyalty_card": { - "type": "object", - "description": "Stores the number of points being added back to the loyalty card for the reward redemption rollback.", - "properties": { - "points": { - "type": "integer", - "description": "Number of points being returned to the loyalty card for the reward redemption rollback." - } - } - } - } - }, - "7_obj_rollback_redemption_object_gift_card_extended": { - "type": "object", - "title": "Gift Card", - "description": "This is an object representing a gift card rollback redemption.", - "properties": { - "id": { - "type": "string", - "example": "rr_0bc92f81a6801f9bca", - "description": "Unique redemption rollback ID." - }, - "object": { - "type": "string", - "description": "The type of object represented by the JSON. This object stores information about the `redemption_rollback`.", - "default": "redemption_rollback" - }, - "date": { - "type": "string", - "format": "date-time", - "example": "2022-10-03T12:24:58.008Z", - "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured." - }, - "customer_id": { - "type": "string", - "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", - "description": "Unique customer ID of the redeeming customer." - }, - "tracking_id": { - "type": "string", - "example": "track_fxEMFiLowFHg==", - "description": "Hashed customer source ID." - }, - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption." - }, - "amount": { - "type": "integer", - "description": "The amount credited back to the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)." - }, - "redemption": { - "type": "string", - "description": "Unique redemption ID of the initial redemption.", - "example": "r_0b56726b09cfb73e84" - }, - "result": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE" - ], - "description": "Redemption rollback result." - }, - "order": { - "description": "Defines the details of the order that is related to the redemption rollback.", - "$ref": "#/components/schemas/7_obj_order_object_rollback" - }, - "channel": { - "type": "object", - "description": "Defines the details of the channel through which the redemption rollback was issued.", - "properties": { - "channel_id": { - "type": "string", - "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH", - "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API." - }, - "channel_type": { - "type": "string", - "description": "The source of the channel for the redemption rollback. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.", - "enum": [ - "USER", - "API" - ] - } - } - }, - "customer": { - "type": "object", - "description": "Defines the customer redeeming the gift card.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of a customer that is assigned by Voucherify.", - "example": "cust_eWgXlBBiY6THFRJwX45Iakv4" - }, - "name": { - "type": "string", - "description": "Customer's first and last name." - }, - "email": { - "type": "string", - "description": "Customer's email address." - }, - "source_id": { - "type": "string", - "description": "The merchant’s customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service." - }, - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format." - }, - "object": { - "type": "string", - "description": "Type of object represented is `customer`.", - "default": "customer" - } - } - }, - "related_object_type": { - "type": "string", - "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |", - "enum": [ - "voucher" - ] - }, - "related_object_id": { - "type": "string", - "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher." - }, - "voucher": { - "$ref": "#/components/schemas/Voucher", - "description": "Defines the details of the voucher being redeemed." - }, - "gift": { - "type": "object", - "description": "Contains the amount being added back to the gift card for the redemption rollback.", - "properties": { - "amount": { - "type": "integer", - "description": "The amount added back on the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)." - } - } - } - } - }, - "7_obj_rollback_redemption_object_promotion_tier_extended": { - "type": "object", - "title": "Promotion Tier", - "description": "This is an object representing a promotion tier rollback redemption.", - "properties": { - "id": { - "type": "string", - "example": "rr_0bc92f81a6801f9bca", - "description": "Unique redemption rollback ID." - }, - "object": { - "type": "string", - "description": "The type of object represented by the JSON. This object stores information about the `redemption_rollback`.", - "default": "redemption" - }, - "date": { - "type": "string", - "format": "date-time", - "example": "2022-10-03T12:24:58.008Z", - "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured." - }, - "customer_id": { - "type": "string", - "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", - "description": "Unique customer ID of the redeeming customer." - }, - "tracking_id": { - "type": "string", - "example": "track_fxEMFiLowFHg==", - "description": "Hashed customer source ID." - }, - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption." - }, - "redemption": { - "type": "string", - "description": "Unique redemption ID of the initial redemption.", - "example": "r_0b56726b09cfb73e84" - }, - "result": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE" - ], - "description": "Redemption rollback result." - }, - "order": { - "description": "Defines the details of the order that is related to the redemption rollback.", - "$ref": "#/components/schemas/7_obj_order_object_rollback" - }, - "channel": { - "type": "object", - "description": "Defines the details of the channel through which the redemption rollback was issued.", - "properties": { - "channel_id": { - "type": "string", - "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH", - "description": "Unique channel ID of the user performing the rollback redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API." - }, - "channel_type": { - "type": "string", - "description": "The source of the channel for the redemption rollback. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.", - "enum": [ - "USER", - "API" - ] - } - } - }, - "customer": { - "type": "object", - "description": "Defines the customer that is related to the redemption.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of a customer that is assigned by Voucherify.", - "example": "cust_eWgXlBBiY6THFRJwX45Iakv4" - }, - "name": { - "type": "string", - "description": "Customer's first and last name." - }, - "email": { - "type": "string", - "description": "Customer's email address." - }, - "source_id": { - "type": "string", - "description": "The merchant’s customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service." - }, - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format." - }, - "object": { - "type": "string", - "description": "Type of object represented is `customer`.", - "default": "customer" - } - } - }, - "related_object_type": { - "type": "string", - "description": "Defines the related object.", - "enum": [ - "promotion_tier" - ] - }, - "related_object_id": { - "type": "string", - "description": "Unique related object ID assigned by Voucherify, i.e. promo_NzjTc3ZXTe7md5SziK3uYtei for a promotion tier." - }, - "voucher": { - "type": "null" - }, - "promotion_tier": { - "type": "object", - "description": "Contains details of the promotion tier and the parent campaign.", - "properties": { - "id": { - "type": "string", - "description": "Unique promotion tier ID assigned by Voucherify.", - "example": "promo_NzjTc3ZXTe7md5SziK3uYtei" - }, - "campaign": { - "type": "object", - "description": "Promotion tier's parent campaign.", - "properties": { - "id": { - "type": "string", - "example": "camp_VEL7UX0jZjrvLx3hfNZBVzpq", - "description": "Unique ID assigned by Voucherify of the promotion tier's parent campaign." - } - } - } - } - } - } - }, "7_obj_redemption_object_discount_voucher": { "type": "object", "title": "Discount Voucher", @@ -39655,7 +39003,7 @@ }, "SimpleCustomerResponse": { "type": "object", - "description": "This is an object representing a customer. \n\nThis entity allows you to:\n* store customer details in Voucherify\n* link [redemptions](ref:list-redemptions) and [validations](ref:validate-voucher) to a particular customer\n* build customer segments and use them in validation rules. ", + "description": "This is an object representing a customer with limited properties used in Event Tracking endpoints.", "title": "Customer Object", "examples": [ {