diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 93e35f3b5..dc7261ee8 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -515,6 +515,65 @@ "type": "string", "example": "camp_rRsfatlwN7unSeUIJDCYedal" }, + "ParameterCustomerValidateVoucherClientSide": { + "oneOf": [ + { + "type": "object", + "title": "Customer details", + "description": "Customer source ID and/or customer metadata.", + "properties": { + "source_id": { + "type": "string", + "description": "Customer source ID.", + "example": "name.lastname@email.com" + }, + "metadata": { + "type": "object", + "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.", + "style": "deepObject", + "explode": true + } + }, + "style": "deepObject", + "explode": true + }, + { + "type": "string", + "title": "Customer ID", + "description": "Unique customer ID assigned by Voucherify, i.e. `cust_eWgXlBBiY6THFRJwX45Iakv4`.", + "example": "cust_eWgXlBBiY6THFRJwX45Iakv4" + } + ] + }, + "ParameterOrderValidateVoucherClientSide": { + "type": "object", + "title": "Order details", + "description": "Order details.", + "properties": { + "metadata": { + "type": "object", + "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are attached to an order object. Stores additional information about the order in a structured format.", + "style": "deepObject", + "explode": true + } + } + }, + "ParameterSessionKey": { + "type": "string", + "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts" + }, + "ParameterSessionTtlUnit": { + "type": "string", + "enum": [ + "HOURS", + "DAYS", + "MINUTES", + "SECONDS", + "MILLISECONDS", + "MICROSECONDS", + "NANOSECONDS" + ] + }, "ParameterPromotionTierId": { "type": "string", "example": "promo_2EnAik6Jt7dKTOMkRTIgEjZH" @@ -50586,8 +50645,7 @@ }, { "schema": { - "type": "string", - "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts" + "$ref": "#/components/schemas/ParameterSessionKey" }, "in": "query", "name": "session_key", @@ -50595,7 +50653,7 @@ }, { "schema": { - "type": "integer" + "$ref": "#/components/schemas/ParameterInteger" }, "in": "query", "name": "session_ttl", @@ -50603,16 +50661,7 @@ }, { "schema": { - "type": "string", - "enum": [ - "HOURS", - "DAYS", - "MINUTES", - "SECONDS", - "MILLISECONDS", - "MICROSECONDS", - "NANOSECONDS" - ] + "$ref": "#/components/schemas/ParameterSessionTtlUnit" }, "in": "query", "name": "session_ttl_unit", @@ -50626,7 +50675,7 @@ }, { "schema": { - "type": "string" + "$ref": "#/components/schemas/ParameterString" }, "in": "query", "name": "session_type", @@ -50637,34 +50686,7 @@ "in": "query", "required": false, "schema": { - "oneOf": [ - { - "type": "object", - "title": "Customer details", - "description": "Customer source ID and/or customer metadata.", - "properties": { - "source_id": { - "type": "string", - "description": "Customer source ID.", - "example": "name.lastname@email.com" - }, - "metadata": { - "type": "object", - "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.", - "style": "deepObject", - "explode": true - } - }, - "style": "deepObject", - "explode": true - }, - { - "type": "string", - "title": "Customer ID", - "description": "Unique customer ID assigned by Voucherify, i.e. `cust_eWgXlBBiY6THFRJwX45Iakv4`.", - "example": "cust_eWgXlBBiY6THFRJwX45Iakv4" - } - ] + "$ref": "#/components/schemas/ParameterCustomerValidateVoucherClientSide" }, "description": "Customer details." }, @@ -50673,20 +50695,10 @@ "in": "query", "required": false, "schema": { - "type": "object", - "title": "Order details", - "description": "Order details.", - "properties": { - "metadata": { - "type": "object", - "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are attached to an order object. Stores additional information about the order in a structured format.", - "style": "deepObject", - "explode": true - } - }, - "style": "deepObject", - "explode": true + "$ref": "#/components/schemas/ParameterOrderValidateVoucherClientSide" }, + "style": "deepObject", + "explode": true, "description": "Order details." } ], @@ -51149,7 +51161,7 @@ "parameters": [ { "schema": { - "type": "string" + "$ref": "#/components/schemas/ParameterString" }, "in": "query", "name": "audienceRulesOnly",