{ "openapi": "3.0.1", "info": { "title": "SVOD Plans Add-Ons/Extras API", "description": "This API provides rest operations to manage additions to basic SVOD plan subscriptions.", "version": "0.2-oas3" }, "servers": [ { "url": "https://prod.api.developer-vizio.external.plat.vizio.com/ecommerce" } ], "paths": { "/v1/add-ons": { "get": { "tags": [ "Add-ons" ], "summary": "Get Add-ons", "parameters": [ { "name": "appId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "planCode", "in": "query", "schema": { "type": "string" } }, { "name": "state", "in": "query", "schema": { "$ref": "#/components/schemas/VizioAddOnState" } }, { "name": "pageNumber", "in": "query", "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "pageSize", "in": "query", "schema": { "type": "integer", "format": "int32", "default": 20 } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VizioAddOnPage" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } }, "security": [ { "ApiKeyAuth": [] } ] }, "post": { "tags": [ "Add-ons" ], "summary": "Create Add-on", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VizioAddOnCreate" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VizioAddOn" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/v1/add-ons/{id}": { "get": { "tags": [ "Add-ons" ], "summary": "Get Add-on", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "appId", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VizioAddOn" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } }, "security": [ { "ApiKeyAuth": [] } ] }, "put": { "tags": [ "Add-ons" ], "summary": "Update Add-on", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "appId", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VizioAddOnUpdate" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VizioAddOn" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } }, "security": [ { "ApiKeyAuth": [] } ] }, "delete": { "tags": [ "Add-ons" ], "summary": "Deactivate Add-on", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "appId", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VizioAddOn" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } } }, "components": { "schemas": { "ProblemDetails": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32", "nullable": true }, "detail": { "type": "string", "nullable": true }, "instance": { "type": "string", "nullable": true } }, "additionalProperties": {} }, "VizioAddOn": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "code": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "price": { "type": "number", "format": "double" }, "sku": { "type": "string", "nullable": true }, "imageUrl": { "type": "string", "nullable": true }, "hyperlinkUrl": { "type": "string", "nullable": true }, "modifiedDate": { "type": "string", "format": "date-time" }, "isActive": { "type": "boolean" } }, "additionalProperties": false }, "VizioAddOnCreate": { "required": [ "appId", "description", "name", "price" ], "type": "object", "properties": { "appId": { "minLength": 1, "type": "string" }, "name": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "price": { "type": "number", "format": "double" }, "sku": { "type": "string", "nullable": true }, "imageUrl": { "type": "string", "nullable": true }, "hyperlinkUrl": { "type": "string", "nullable": true } }, "additionalProperties": false }, "VizioAddOnPage": { "type": "object", "properties": { "currentPage": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "totalPages": { "type": "integer", "format": "int32" }, "totalCount": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/VizioAddOn" }, "nullable": true } }, "additionalProperties": false }, "VizioAddOnState": { "enum": [ "all", "active", "inactive" ], "type": "string" }, "VizioAddOnUpdate": { "required": [ "description", "name", "price" ], "type": "object", "properties": { "name": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "price": { "type": "number", "format": "double" }, "sku": { "type": "string", "nullable": true }, "imageUrl": { "type": "string", "nullable": true }, "hyperlinkUrl": { "type": "string", "nullable": true } }, "additionalProperties": false }, "VizioVersion": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "version": { "type": "string", "nullable": true } }, "additionalProperties": false } }, "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "name": "X-TYK-KEY", "in": "header" } } }, "security": [ { "ApiKeyAuth": [] } ] }