Skip to main content
Skip table of contents

Updating the status of a third-party product entitlement

Overview

When the status of a customer’s subscription to a third-party product changes in your self-care portal (for example, the customer cancels their subscription to the product) the portal must call OpenTV Platform to update the status of the entitlement.

OpenTV Platform then calls Bango to update the status there and with the third-party product provider.

Request

To update the status of a third-party product entitlement, make a PUT request to:

BASH
https://<host>:<port>/crm-gateway/v2/rmg/v1/entitlements/{entitlementId}

Headers

  • x-correlation-id  – identifier for logging, to correlate messages across a call flow

  • Authorization – Keycloak access token (see Accessing operator APIs using Keycloak)

  • Content-Type: application/json

Mandatory arguments

  • entitlementId (in URL)

  • status (in body) – the updated status of the entitlement. This is one of:

    • SUBSCRIBED

    • UNSUBSCRIBED

    • SUSPENDED

    • PENDING

    • ACTIVE

    • ACTIVE-ENDING

    • CANCELLED

    • REVOKED

Optional arguments

  • productId – the ID of the product that the entitlement is for

  • accountId – the ID of the account that holds the entitlement

  • productType – the product type, in this case THIRDPARTY

  • reasonCode – the reason for the status change

  • reasonCategory – the reason category

Example

A PUT request with the following body will update the status of the entitlement whose ID is specified in the URL:

JSON
{
  "status": "CANCELLED"
}

Response

A successful request returns an HTTP 200 status.

A bad request returns an HTTP 400 status.

A forbidden request returns an HTTP 403 status.

If the specified tenant does not exist, the request returns an HTTP 404 status.

See the CRM Gateway API documentation for the specific error codes and their meanings.

Example

A successful request returns the following response body:

CODE
{
  "matchedCount": 1,
  "modifiedCount": 1
}

See also

CRM Gateway API documentation

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.