{ "openapi": "3.0.1", "info": { "title": "Notification System API", "description": "This API provides rest operations to manage Webhook Configs and on demand Notifications", "version": "0.2-oas3" }, "servers": [ { "url": "https://api.developer-vizio.external.plat.vizio.com/notifications" } ], "paths": { "/v1/webhooks/{partnerId}": { "get": { "tags": [ "Webhooks" ], "description": "Return all webhooks configs by Partner id", "parameters": [ { "name": "partnerId", "in": "path", "description": "Unique identifier for Partner organization ID in Vizio ecosystem. The internal format is vizio_partner_{partnerId}", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "vizio_partner_watchfree_inc" } }, { "name": "status", "in": "query", "description": "filter by status of webhook config", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "appId", "in": "query", "description": "filter by App id (\"vizio_partner_watchfreeplus\")", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "page.size", "in": "query", "description": "Return {x} number of items in the response if available (default 20 per page)", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "page.number", "in": "query", "description": "Cursor position", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of webhooks configs items", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookListResponseMeta" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "404": { "description": "List of webhooks configs items", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookListNotFoundResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/v1/webhooks": { "post": { "tags": [ "Webhooks" ], "description": "Creates a new Webhook handler for a given Partner id", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookRequest" } } }, "x-examples": { "application/json": "{\r\n \"data\": {\r\n \"description\": \"WatchFree Webhook Handler\",\r\n \"partner_id\": \"vizio_partner_watchfree_inc\",\r\n \"app_id\": \"vizio_partner_watchfreeplus\",\r\n \"webhook_url\": \"https://stage.notifications.internal.plat.vizio.com/watchfree_inc/callback?resp=ok\",\r\n \"subscribed_events\": [\r\n \"subscriptions.created\"\r\n ],\r\n \"metadata\": {},\r\n \"status\": \"active\"\r\n }\r\n}" } }, "responses": { "201": { "description": "A new webhook handler record has been created in partner portal system", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWebhookResponse" } } } }, "400": { "description": "Missing or Invalid properties in request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BadRequestResponse" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/v1/webhooks/{partnerId}/{webhookId}": { "get": { "tags": [ "Webhooks" ], "description": "Return webhook config for a Partner by webhook Id", "parameters": [ { "name": "partnerId", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "vizio_partner_watchfree_inc" } }, { "name": "webhookId", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful Response for fetching a specific webhook", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FetchWebhookResponse" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] }, "put": { "tags": [ "Webhooks" ], "description": "Updates a Webhook configuration", "parameters": [ { "name": "webhookId", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "partnerId", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "vizio_partner_watchfree_inc" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWebhookRequest" } } }, "x-examples": { "application/json": "{\r\n \"data\": {\r\n \"metadata\": {\r\n \"test\": \"test_updated\"\r\n },\r\n \"status\": \"inactive\",\r\n \"subscribed_events\": [\r\n \"subscription.reactivated\",\r\n \"orders.refunded\"\r\n ],\r\n \"webhook_url\": \"https://partner-site.com/api/webhooks/viziopay_updated\"\r\n }\r\n}" } }, "responses": { "200": { "description": "Successful response after updating the Webhook record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWebhookResponse" } } } }, "400": { "description": "Missing or Invalid properties in request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BadRequestResponse" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] }, "delete": { "tags": [ "Webhooks" ], "description": "Removes a webhook config", "parameters": [ { "name": "webhookId", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "partnerId", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "vizio_partner_watchfree_inc" } } ], "responses": { "200": { "description": "Disables a Webhook Handler for a Partner", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteWebhookHandler" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/v1/webhooks/signing-key": { "put": { "tags": [ "Webhooks" ], "description": "Rotate signing key for webhook request payloads.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhooks_signingkey_body" }, "examples": { "0": { "value": "{\r\n \"data\": {\r\n \"partner_id\": \"vizio_partner_watchfree_inc\",\r\n \"webhook_id\": \"96070aa5-eabd-4404-9430-ced22a1c27b9\" }\r\n}" } } } } }, "responses": { "200": { "description": "Auto generated using Swagger Inspector", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RotateKeyResponse_200" }, "examples": { "0": { "value": "{\"message\":\"Key updated\",\"data\":{\"signing_key\":\"6725dd0e05a8bf7c39988a8e6a14244c19462da7e8a40500cef1fd2f0bbc918a\"}}" } } } } }, "400": { "description": "Missing or Invalid properties in request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BadRequestResponse" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/v1/notifications/events": { "post": { "tags": [ "Notifications API - Transactions" ], "description": "Creates a new transaction event in the notification system", "summary": "API to send notification events to sqs for further processing", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationRequest" } } } }, "responses": { "202": { "description": "A new transaction event has been added to the system for further processing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationResponse" } } } }, "400": { "description": "Missing or Invalid properties in request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BadRequestResponse" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/v1/notifications/{partnerId}": { "get": { "tags": [ "Notifications API - Transactions" ], "description": "Return a list of webhooks notifications by Partner ID from the Notification History system", "parameters": [ { "name": "partnerId", "in": "path", "description": "Unique identifier for Partner organization ID in Vizio ecosystem. The internal format is vizio_partner_{partnerId}", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "vizio_partner_watchfree_inc" } }, { "name": "httpStatusCode", "in": "query", "description": "Filter by status code of webhook config", "required": false, "style": "form", "explode": true, "schema": { "type": "string", "example": "500" } }, { "name": "appId", "in": "query", "description": "Filter by App id (\"vizio.app.watchfreeplus\")", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "transactionType", "in": "query", "description": "Filter by Transaction type (SVOD, TVOD, etc.)", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "orderNumber", "in": "query", "description": "Filter by Order Number for TVOD notifications", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "subscriptionId", "in": "query", "description": "Filter by Subscriptions Ids for SVOD notifications", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "page.size", "in": "query", "description": "Return {x} number of items in the response if available (default 20 per page)", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "page.number", "in": "query", "description": "Cursor position", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of webhooks configs items", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetHistoryNotificationsResponse" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "404": { "description": "List of webhooks configs items", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookListNotFoundResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/v1/notifications/{partnerId}/{notification_id}": { "get": { "tags": [ "Notifications API - Transactions" ], "description": "Return a specific notification by eventId sent to a Partner Backend, from the Notification History system", "parameters": [ { "name": "partnerId", "in": "path", "required": true, "style": "simple", "explode": false, "description": "Unique identifier for Partner organization ID in Vizio ecosystem. The internal format is vizio_partner_{partnerId}", "schema": { "type": "string", "example": "vizio_partner_watchfree_inc" } }, { "name": "notification_id", "in": "path", "required": true, "style": "simple", "description": "Unique notification id stored in Vizio system for traceability", "explode": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful Response for fetching a specific webhook", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetHistoryNotificationResponse" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } }, "/events": { "get": { "tags": [ "Notifications API - Transactions" ], "description": "Returns a list of events that clients can subscribe when creating a webhook listener", "summary": "Events to retrieve eventType=subscription or eventType=order", "parameters": [ { "name": "eventType", "in": "query", "description": "Filter by Transaction type (subscription, order)", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful Response for fetching Partner subscription events. Example for eventType=subscription", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetEventsResponse" } } } }, "401": { "description": "Authorization mechanism -> Access Token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedResponse" } } } }, "500": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnhaltedError" } } } } }, "security": [ { "ApiKeyAuth": [] } ] } } }, "components": { "schemas": { "WebhookRequest_Data_Metadata": { "properties": { "test": { "type": "string" } } }, "UpdateWebhookRequest_Data": { "properties": { "metadata": { "$ref": "#/components/schemas/WebhookRequest_Data_Metadata" }, "status": { "type": "string", "description": "Webhook status (If not provided the system will set it to active, valid values-> active/inactive)", "example": "inactive" }, "subscribed_events": { "type": "array", "description": "List of transaction events to be subscribed to", "items": { "type": "string", "oneOf": [ { "type": "string", "example": "subscription.created", "description": "A new subscription is created." }, { "type": "string", "example": "subscription.canceled", "description": "A subscription is canceled and will not renew. The subscription state is set to canceled, but the subscription is still valid until the end of the billing period." }, { "type": "string", "example": "subscription.expired", "description": "A subscription is no longer valid. This can happen if a canceled subscription expires or if an active subscription is refunded and terminated immediately." }, { "type": "string", "example": "subscription.reactivated", "description": "A subscription is reactivated after having been canceled and before expiring." }, { "type": "string", "example": "subscription.updated", "description": "For an upgrade/downgrade" }, { "type": "string", "example": "subscription.payment.successful", "description": "A payment is successfully captured for a subscription." }, { "type": "string", "example": "subscription.payment.failed", "description": "A payment is declined by the payment gateway for a subscription." } ] } }, "webhook_url": { "type": "string", "description": "target URL to send notifications", "example": "https://vizio.watchfree.inc/v1/watchfree_inc/notifications/vizio-pay-callback_updated" }, "description": { "type": "string", "description": "Friendly description for this Webhook Handler", "example": "Watchfree Inc. Media Hanlder updated" } } }, "WebhookRequest_Data": { "properties": { "metadata": { "$ref": "#/components/schemas/WebhookRequest_Data_Metadata" }, "partner_id": { "type": "string", "description": "Unique ID of Partner organization", "example": "vizio_partner_watchfree_inc" }, "app_id": { "type": "string", "description": "Unique identifier in Vizio ecosystem for apps", "example": "vizio.app.watchfreeplus" }, "status": { "type": "string", "description": "Webhook status (If not provided the system will set it to active, valid values-> active/inactive)", "example": "active" }, "subscribed_events": { "type": "array", "description": "List of transaction events to be subscribed to", "items": { "type": "string", "oneOf": [ { "type": "string", "example": "subscription.created", "description": "A new subscription is created." }, { "type": "string", "example": "subscription.canceled", "description": "A subscription is canceled and will not renew. The subscription state is set to canceled, but the subscription is still valid until the end of the billing period." }, { "type": "string", "example": "subscription.expired", "description": "A subscription is no longer valid. This can happen if a canceled subscription expires or if an active subscription is refunded and terminated immediately." }, { "type": "string", "example": "subscription.reactivated", "description": "A subscription is reactivated after having been canceled and before expiring." }, { "type": "string", "example": "subscription.updated", "description": "For an upgrade/downgrade" }, { "type": "string", "example": "subscription.payment.successful", "description": "A payment is successfully captured for a subscription." }, { "type": "string", "example": "subscription.payment.failed", "description": "A payment is declined by the payment gateway for a subscription" } ] } }, "webhook_url": { "type": "string", "description": "target URL to send notifications", "example": "https://vizio.watchfree.inc/v1/watchfree_inc/notifications/vizio-pay-callback" }, "description": { "type": "string", "description": "Friendly description for this Webhook Handler", "example": "WatchFree Media Hook Handler Inc. Handler" }, "created_at": { "type": "integer", "format": "int64", "description": "Date of creation - timestamp", "example": "1641572312636" } } }, "WebhookRequest": { "properties": { "data": { "$ref": "#/components/schemas/WebhookRequest_Data" } } }, "UpdateWebhookRequest": { "properties": { "data": { "$ref": "#/components/schemas/UpdateWebhookRequest_Data" } } }, "WebhookListResponse_Data_Items_Metadata": { "properties": { "trace_id": { "type": "string" } } }, "WebhookListResponse_Data_Items": { "properties": { "metadata": { "$ref": "#/components/schemas/WebhookListResponse_Data_Items_Metadata" }, "webhook_url": { "type": "string", "description": "Target URL to send notifications", "example": "https://vizio.watchfree.inc/v1/watchfree_inc/notifications/vizio-pay-callback" }, "partner_id": { "type": "string", "description": "Unique Partner organization ID (vizio_partner_{partner_id})", "example": "vizio_partner_watchfree_inc" }, "app_id": { "type": "string", "description": "Unique identifier in Vizio ecosystem for a specific App (vizo.app.app_id)", "example": "vizio.app.watchfreeplus" }, "content_type": { "type": "string", "description": "Payload content-type", "example": "application/json" }, "subscribed_events": { "type": "array", "description": "List of transaction events to be subscribed", "items": { "type": "string", "oneOf": [ { "type": "string", "example": "subscription.created", "description": "A new subscription is created." }, { "type": "string", "example": "subscription.canceled", "description": "A subscription is canceled and will not renew. The subscription state is set to canceled, but the subscription is still valid until the end of the billing period." }, { "type": "string", "example": "subscription.expired", "description": "A subscription is no longer valid. This can happen if a canceled subscription expires or if an active subscription is refunded and terminated immediately." }, { "type": "string", "example": "subscription.reactivated", "description": "A subscription is reactivated after having been canceled and before expiring." }, { "type": "string", "example": "subscription.updated", "description": "For an upgrade/downgrade" }, { "type": "string", "example": "subscription.payment.successful", "description": "A payment is successfully captured for a subscription." }, { "type": "string", "example": "subscription.payment.failed", "description": "A payment is declined by the payment gateway for a subscription." } ] } }, "status": { "type": "string", "description": "Status of the hook handler (active/inactive)", "example": "active" }, "description": { "type": "string", "example": "WatchFree Media Hook Handler," }, "webhook_id": { "type": "string", "description": "Unique id of the webhook config", "example": "d6850601-1d08-4d0d-a248-6761b9a6e97f" }, "created_at": { "type": "integer", "format": "int64", "description": "Date of creation - timestamp", "example": "1641572312636" }, "updated_at": { "type": "integer", "format": "int64", "description": "If this entity was updated. Represents updated date", "example": "1641572312636" } } }, "Links": { "properties": { "self": { "type": "string", "example": "https://stage.notifications.internal.plat.vizio.com/v1/webhooks/watchfree_inc" }, "first": { "type": "string", "example": "https://stage.notifications.internal.plat.vizio.com/v1/webhooks/watchfree_inc?page.size=20" }, "prev": { "type": "string", "example": "No more Items" }, "next": { "type": "string", "example": "No more Items" }, "last": { "type": "string", "example": "https://stage.notifications.internal.plat.vizio.com/v1/webhooks/watchfree_inc?previous=true&page.size=20" } } }, "WebhookResponse_Data": { "properties": { "metadata": { "$ref": "#/components/schemas/WebhookListResponse_Data_Items_Metadata" }, "webhook_url": { "type": "string", "description": "Target URL to send notifications", "example": "https://vizio.watchfree.inc/v1/watchfree_inc/notifications/vizio-pay-callback" }, "partner_id": { "type": "string", "description": "Unique Partner organization ID (vizio_partner_{partner_id})", "example": "vizio_partner_watchfree_inc" }, "app_id": { "type": "string", "description": "Unique identifier in Vizio ecosystem for a specific App (vizo.app.app_id)", "example": "vizio.app.watchfreeplus" }, "content_type": { "type": "string", "description": "Payload content-type", "example": "application/json" }, "subscribed_events": { "type": "array", "description": "List of transaction events to be subscribed", "items": { "type": "string", "oneOf": [ { "type": "string", "example": "subscription.created", "description": "A new subscription is created." }, { "type": "string", "example": "subscription.canceled", "description": "A subscription is canceled and will not renew. The subscription state is set to canceled, but the subscription is still valid until the end of the billing period." }, { "type": "string", "example": "subscription.expired", "description": "A subscription is no longer valid. This can happen if a canceled subscription expires or if an active subscription is refunded and terminated immediately." }, { "type": "string", "example": "subscription.reactivated", "description": "A subscription is reactivated after having been canceled and before expiring." }, { "type": "string", "example": "subscription.updated", "description": "For an upgrade/downgrade" }, { "type": "string", "example": "subscription.payment.successful", "description": "A payment is successfully captured for a subscription." }, { "type": "string", "example": "subscription.payment.failed", "description": "A payment is declined by the payment gateway for a subscription." } ] } }, "status": { "type": "string", "description": "Status of the hook handler (active/inactive)", "example": "active" }, "description": { "type": "string", "example": "WatchFree Media Hook Handler," }, "webhook_id": { "type": "string", "description": "Unique id of the webhook config", "example": "d6850601-1d08-4d0d-a248-6761b9a6e97f" }, "created_at": { "type": "integer", "format": "int64", "description": "Date of creation - timestamp", "example": "1641572312636" }, "updated_at": { "type": "integer", "format": "int64", "description": "If this entity was updated. Represents updated date", "example": "1641572312636" } } }, "WebhookDeleteResponse_Data": { "properties": { "metadata": { "$ref": "#/components/schemas/WebhookListResponse_Data_Items_Metadata" }, "webhook_url": { "type": "string", "description": "Target URL to send notifications", "example": "https://vizio.watchfree.inc/v1/watchfree_inc/notifications/vizio-pay-callback" }, "partner_id": { "type": "string", "description": "Unique Partner organization ID (vizio_partner_{partner_id})", "example": "vizio_partner_watchfree_inc" }, "app_id": { "type": "string", "description": "Unique identifier in Vizio ecosystem for a specific App (vizo.app.app_id)", "example": "vizio.app.watchfreeplus" }, "content_type": { "type": "string", "description": "Payload content-type", "example": "application/json" }, "subscribed_events": { "type": "array", "description": "List of transaction events to be subscribed", "items": { "type": "string", "oneOf": [ { "type": "string", "example": "subscription.created", "description": "A new subscription is created." }, { "type": "string", "example": "subscription.canceled", "description": "A subscription is canceled and will not renew. The subscription state is set to canceled, but the subscription is still valid until the end of the billing period." }, { "type": "string", "example": "subscription.expired", "description": "A subscription is no longer valid. This can happen if a canceled subscription expires or if an active subscription is refunded and terminated immediately." }, { "type": "string", "example": "subscription.reactivated", "description": "A subscription is reactivated after having been canceled and before expiring." }, { "type": "string", "example": "subscription.updated", "description": "For an upgrade/downgrade" }, { "type": "string", "example": "subscription.payment.successful", "description": "A payment is successfully captured for a subscription." }, { "type": "string", "example": "subscription.payment.failed", "description": "A payment is declined by the payment gateway for a subscription." } ] } }, "status": { "type": "string", "description": "Status of the hook handler (active/inactive)", "example": "inactive" }, "description": { "type": "string", "example": "WatchFree Media Hook Handler," }, "webhook_id": { "type": "string", "description": "Unique id of the webhook config", "example": "d6850601-1d08-4d0d-a248-6761b9a6e97f" }, "created_at": { "type": "integer", "format": "int64", "description": "Date of creation - timestamp", "example": "1641572312636" }, "updated_at": { "type": "integer", "format": "int64", "description": "If this entity was updated. Represents updated date", "example": "1641572312636" } } }, "WebhookListResponse_Data": { "properties": { "Items": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookListResponse_Data_Items" } }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Links" } } } }, "WebhookListResponseMeta": { "properties": { "message": { "type": "string", "description": "Friendly Message related to the response data", "example": "Items Found!" }, "data": { "$ref": "#/components/schemas/WebhookListResponse_Data" } } }, "WebhookListNotFoundResponse": { "properties": { "message": { "type": "string", "description": "Friendly Message related to the response data", "example": "Items Not Found!" }, "status": { "type": "string", "description": "Status of the rest operation success / fail" }, "data": { "$ref": "#/components/schemas/WebhookListNotFoundResponse_data" } } }, "CreateWebhookResponse": { "properties": { "message": { "type": "string", "example": "Item Created" }, "data": { "$ref": "#/components/schemas/WebhookResponse_Data" } } }, "FetchWebhookResponse": { "properties": { "message": { "type": "string", "description": "Friendly Message related to the response data", "example": "Item Found!" }, "data": { "$ref": "#/components/schemas/WebhookResponse_Data" } } }, "UpdateWebhookResponse": { "properties": { "message": { "type": "string", "example": "Item Updated!" }, "data": { "$ref": "#/components/schemas/WebhookListResponse_Data_Items" } } }, "DeleteWebhookHandler": { "properties": { "message": { "type": "string", "example": "Item deleted!" }, "data": { "$ref": "#/components/schemas/WebhookDeleteResponse_Data" } } }, "NotificationRequest": { "properties": { "data": { "type": "object", "properties": { "consumer_id": { "type": "string", "description": "Represents the cosumer for this transaction event", "example": "vizio_partner_watchfree_inc" }, "consumer_friendly_name": { "type": "string", "description": "A friendly description for this Partner consumer of Vizio Pay notifications", "example": "Watchfree Inc Webhook Handler\"" }, "event_body": { "type": "object", "properties": { "type": { "type": "string", "description": "The transaction event type", "example": "subscription.created" }, "app_id": { "type": "string", "description": "The related App where this transaction is associated", "example": "vizio.app.watchfreeplus" }, "source_system_id": { "type": "string", "description": "The originating system of this transaction event", "example": "vizio-ecommerce-subscriptions" }, "details": { "type": "object", "description": "This object represents the Message Body of the Notification", "additionalProperties": true } }, "required": [ "type" ] } } } } }, "NotificationResponse": { "properties": { "message": { "type": "string", "example": "Accepted" }, "data": { "type": "object", "properties": { "source_system_id": { "type": "string", "example": "vizio-ecommerce-subscriptions has pushed a notification" } } } } }, "UnauthorizedResponse": { "properties": { "message": { "type": "string", "example": "Unauthorized" } } }, "BadRequestResponse": { "properties": { "message": { "type": "string", "example": "Invalid Payload" }, "data": { "type": "object", "properties": {} } } }, "UnhaltedError": { "properties": { "message": { "type": "string", "example": "Server error" }, "data": { "type": "object", "properties": {} } } }, "v1webhookssigningkey_data": { "type": "object", "properties": { "partner_id": { "type": "string" }, "signing_key": { "type": "string" }, "webhook_id": { "type": "string" } } }, "webhooks_signingkey_body": { "required": [ "partner_id", "webhook_id" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/v1webhookssigningkey_data" } } }, "RotateKeyResponse_200": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/RotateKeyResponse_200_data" }, "message": { "type": "string" }, "status": { "type": "string" } } }, "WebhookListNotFoundResponse_data": { "type": "object", "properties": { "Items": { "type": "array", "items": {} } } }, "RotateKeyResponse_200_data": { "type": "object", "properties": { "signing_key": { "type": "string" } } }, "Notification": { "type": "object", "properties": { "partner_id": { "type": "string", "example": "vizio_partner_watchfree_inc" }, "event_type": { "type": "string", "example": "subscription.created" }, "webhook_url": { "type": "string", "example": "https://partner-site.com/api/webhooks/vizio_pay_callback" }, "http_status_code": { "type": "integer", "format": "int32", "example": "200" }, "created_at": { "type": "integer", "format": "int64", "example": "1631029312966" }, "details": { "type": "object", "properties": { "timestamp": { "type": "string", "example": "2021-08-03T20:24:29.833679Z" }, "plan_code": { "type": "string", "example": "vizio_partner_dm_001" }, "subscription_id": { "type": "string", "example": "189298893" }, "customer_id": { "type": "string", "example": "entry UUID" }, "starts_at": { "type": "string", "example": "2021-09-02T17:38:44.6847902Z" }, "expires_at": { "type": "string", "example": "2021-09-02T17:38:44.6848922Z" } } }, "notification_id": { "type": "string", "example": "WatchFree|subscription.created|1631029312966" }, "transaction_type": { "type": "string", "example": "SVOD" }, "source_system_id": { "type": "string", "example": "vizio-ecommerce-subscriptions" }, "app_id": { "type": "string", "example": "vizio_partner_watchfreeplus" }, "response_stack_trace": { "type": "string", "example": "NO_ERRORS" } } }, "GetHistoryNotificationsResponse": { "type": "object", "required": [ "message", "data" ], "properties": { "message": { "type": "string", "example": "Items Found!" }, "data": { "type": "object", "properties": { "Items": { "type": "array", "items": null, "$ref": "#/components/schemas/Notification" }, "links": { "type": "array", "items": null, "$ref": "#/components/schemas/Links" } } } } }, "GetHistoryNotificationResponse": { "type": "object", "required": [ "message", "data" ], "properties": { "message": { "type": "string", "example": "Item Found!" }, "data": { "type": "object", "$ref": "#/components/schemas/Notification" } } }, "Event": { "type": "object", "required": [ "eventType" ], "properties": { "eventType": { "type": "string" } }, "discriminator": { "propertyName": "eventType" } }, "GetEventsResponse": { "$ref": "#/components/schemas/Events_Items" }, "SubscriptionsEvents": { "type": "object", "example": [ { "eventType": "subscription", "id": "subscription.created", "name": "Subscription Created" }, { "eventType": "subscription", "id": "subscription.canceled", "name": "Subscription Canceled" }, { "eventType": "subscription", "id": "subscription.expired", "name": "Subscription Expired" }, { "eventType": "subscription", "id": "subscription.reactivated", "name": "Subscription Reactivated" }, { "eventType": "subscription", "id": "subscription.updated", "name": "Subscription Updated" }, { "eventType": "subscription", "id": "subscription.downgrade.pending", "name": "Subscription Downgrade Pending" }, { "eventType": "subscription", "id": "subscription.payment.successful", "name": "Subscription Payment Successful" }, { "eventType": "subscription", "id": "subscription.payment.failed", "name": "Subscription Payment Failed" } ] }, "OrdersEvents": { "type": "object", "example": [ { "eventType": "order", "id": "order.created", "name": "Order Created" } ] }, "Events_Items": { "allOf": [ { "$ref": "#/components/schemas/SubscriptionsEvents" }, { "type": "object", "properties": { "eventType": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" } } } ] } }, "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "name": "X-TYK-KEY", "in": "header" } } }, "security": [ { "ApiKeyAuth": [] } ] }