Read Subscription

The ReadSubscription API in OCS.io allows for retrieving details of a subscription using the subscription’s reference ID or external ID. This API is particularly useful when you need to fetch subscription information for display or processing purposes.

API Overview

Parameters Required for Reading Offer Subscription

The following table lists and describes the parameters required to read a subscription through the ReadSubscription API:

Parameter Description

refId

Ref ID of the Subscription.

externalId

External ID of the Subscription.

stateHistory

Indicates whether reads also State History belonging to the Subscription.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when reading a subscription:

Read Offer Subscription Example

Here is a cURL example for the ReadSubscription API:

curl -X GET 'https://api.ocs.io/v1/casm/subscriptions/read?refId=<subscription_ref_id>&stateHistory=true'

The outcome of the API call is as follows:

  • The subscription with Ref ID <subscription_ref_id> is retrieved.

  • If stateHistory is set to true, the state history of the subscription is included.