Read Subscriber
The ReadSubscriber API in OCS.io allows for retrieving subscriber details using the subscriber’s Ref ID or External ID, providing essential information for subscriber management.
API Overview
Parameters Required for Reading Subscriber
The following table lists and describes the parameters required to read a subscriber through the ReadSubscriber API:
| Parameter | Description |
|---|---|
refId |
Ref ID of the Subscriber. |
externalId |
External ID of the Subscriber. |
stateHistory |
Indicates whether reads also State History belonging to the Subscriber. |
resources |
Indicates whether reads also Resources belonging to the Subscriber. |
offers |
Indicates whether reads also Subscriptions belonging to the Subscriber. |
| Detailed API documentation and endpoint specifics are available here. |
Request Validations
The following validations are performed when reading a Subscriber:
-
Subscriber must exist in the system.
Read Subscriber Example
Here is a cURL example for the ReadSubscriber API:
curl -X GET 'https://api.ocs.io/v1/casm/subscribers/read?refId=<subscriber_ref_id>&stateHistory=true&resources=true&offers=true'
The outcome of the API call is as follows:
-
The subscriber with Ref ID
<subscriber_ref_id>is retrieved. -
If
stateHistoryis set totrue, the state history of the subscriber is included. -
If
resourcesis set totrue, the resources belonging to the subscriber are included. -
If
offersis set totrue, the subscriptions belonging to the subscriber are included.