diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 492b85091..ad5806f99 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -9466,7 +9466,7 @@ } }, "reward_base": { - "title": "Reward Base", + "title": "Reward Object Base", "type": "object", "properties": { "name": { @@ -10547,26 +10547,17 @@ ], "allOf": [ { - "$ref": "#/components/schemas/reward_assignment_base", - "x-stoplight": { - "id": "jh3hi27sz0tb0" - } + "$ref": "#/components/schemas/reward_assignment_base" }, { - "$ref": "#/components/schemas/reward_assignment_identity", - "x-stoplight": { - "id": "t6wsmzz6nx39e" - } + "$ref": "#/components/schemas/reward_assignment_identity" }, { - "$ref": "#/components/schemas/reward_assignment_response_data", - "x-stoplight": { - "id": "oyv1erbi7j8wp" - } + "$ref": "#/components/schemas/reward_assignment_response_data" } ] }, - "4_res_list_reward_assignments": { + "rewards_list_assignments_response_body": { "type": "object", "description": "Response body schema for **GET** `/rewards/{rewardID}/assignments`.", "title": "List Reward Assignments Response Body", @@ -10584,16 +10575,22 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/4_obj_reward_assignment_object" + "$ref": "#/components/schemas/reward_assignment" } }, "total": { "type": "integer", "description": "Total number of reward assignments." } - } + }, + "required": [ + "object", + "data_ref", + "data", + "total" + ] }, - "4_req_update_reward_assignment": { + "rewards_update_assignments_request_body": { "type": "object", "description": "Request body schema for **PUT** `/rewards/{rewardID}/assignments/{assignmentID}`.", "title": "Update Reward Assignment Request Body", @@ -10616,39 +10613,43 @@ } } }, - "4_req_create_reward_assignment": { - "type": "object", + "rewards_create_assignment_request_body": { "description": "Request body schema for **POST** `/rewards/{rewardID}/assignments`.", "title": "Create Reward Assignment Request Body", - "properties": { - "campaign": { - "type": "string", - "description": "The campaign ID of the campaign to which the reward is to be assigned." - }, - "parameters": { - "type": "object", - "description": "Defines the cost of the reward.", - "required": [ - "loyalty" - ], + "oneOf": [ + { "properties": { - "loyalty": { + "campaign": { + "type": "string", + "description": "The campaign ID of the campaign to which the reward is to be assigned." + }, + "parameters": { "type": "object", - "description": "Defines the equivalent points value of the reward.", + "description": "Defines the cost of the reward.", + "required": [ + "loyalty" + ], "properties": { - "points": { - "type": "integer", - "description": "Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed." + "loyalty": { + "type": "object", + "description": "Defines the equivalent points value of the reward.", + "properties": { + "points": { + "type": "integer", + "description": "Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed." + } + } } } } - } + }, + "required": [ + "campaign", + "parameters" + ] } - }, - "required": [ - "campaign", - "parameters" - ] + ], + "type": "object" }, "5_obj_publication_object": { "title": "Publication Object", @@ -54376,7 +54377,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/4_res_list_reward_assignments" + "$ref": "#/components/schemas/rewards_list_assignments_response_body" }, "examples": { "Example": { @@ -54464,7 +54465,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/4_req_create_reward_assignment" + "$ref": "#/components/schemas/rewards_create_assignment_request_body" }, "examples": { "Example": { @@ -54487,7 +54488,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/4_obj_reward_assignment_object" + "$ref": "#/components/schemas/reward_assignment" }, "examples": { "Example": { @@ -54655,7 +54656,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/4_obj_reward_assignment_object" + "$ref": "#/components/schemas/reward_assignment" }, "examples": { "Example": { @@ -73145,7 +73146,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/8_req_update_reward_assignment" + "$ref": "#/components/schemas/rewards_update_assignments_request_body" }, "examples": { "Example": {