Subscriber API
TPOSS Subscriber API allows you to provision subscribers and manage them using these RPC methods:
- Subscriber.Create - to provision a new subscriber
- Subscriber.Read - to fetch a subscriber by the given identifier
- Subscriber.Delete - to delete a subscriber by the given identifier
- Subscriber.Update - to update a subscriber by the given identifier
- Subscriber.List - to fetch a list of the subscribers filtered by the given criteria
Data model
A subscriber is represented by an object with the following properties:
API methods
Subscriber.Create
The method allows you to register a new subscriber with the given subscriber information. While SubscriberId and UserId must always be unique, a subscriber may be registered for multiple UserId. This means that the unique identification of a subscriber object is based on SubscriberId and UserId.
You can pass the following parameters in the request:
Example of the request:
Example of the successful response:
In the case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-31404- Duplicated subscriber.-31405- Duplicated user.-31406- Duplicated username.-31409- Duplicated IMSI.-31804- Charging account not found.-32700- Can't decode JSON request body.-33333- Not authenticated.
Subscriber.Read
This method allows you to fetch the subscriber information based on the UserId. If the subscriber is not found, TPOSS returns an error.
You can pass the following parameters in the request:
Example of the request:
Example of the successful response:
In the case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-31401- Private user not found.-32700- Can't decode JSON request body.-33333- Not authenticated.
Subscriber.Delete
The method allows you to delete all the information associated with the given subscriber and user identifiers. If the given subscriber is not found, TPOSS returns an error.
You can pass the following parameters in the request:
Example of the request:
Example of the successful response:
In the case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-32700- Can't decode JSON request body.-31401- Subscriber not found.-33333- Not authenticated.
Subscriber.Update
The method allows you to update a subscriber using SubscriberId and UserId. If a subscriber is not found in the system, TPOSS returns an error.
You can pass the following parameters in the request:
Example of the request:
Example of the successful response:
In the case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-31401- Subscriber not found.-31409- Duplicated IMSI.-32700- Can't decode JSON request body.-33333- Not authenticated.
Subscriber.List
The method allows you to fetch the list of subscribers based on the given criteria. If the number of results exceeds the internal query limit, only the initial subset is returned.
You can pass the following parameters in the request:
The Sort field defines the order of sorting by the given field value. For example, to sort the subscribers by the SubscriberId, pass the "Sort": "SubscriberId:asc" parameter in the body request. The format is FieldName:SortOrder, where the FieldName represents the field name of a subscriber and the SortOrder value is asc or desc. The possible fields are listed in the data model section.
The Filter field allows you to filter the subscribers. The filter format is: FilterKey:FilterOperator:FilterValue. The FilterKey represents the field name of a subscriber. The possible fields are listed in the data model section. The FilterOperator could be one of the following values:
is- equal toneq- not equal tolte- lower than or equal togt- greater thanlt- lower thangte- greater than or equal tostarts_with- match objects which start with the given patternends_with- match objects which end with the given patterncontains- match objects which contain the given pattern
The value of the FilterValue parameter specifies what to filter from the results.
Example of the request:
Example of the successful response:
In a case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-31411- Invalid parameters in the request query. This error may occur under different circumstances, such as the wrong format of theFilterparameter or an unknown field passed to theFields,Sort, orFilterparameters.-32700- Can't decode JSON request body.-33333- Not authenticated.