For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

You are reading Travelping Open Subscriber Server 6.15, an older release. The newest release is 6.20. Go to 6.20

Subscriber API

TPOSS Subscriber API allows you to provision subscribers and manage them using these RPC methods:

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:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

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:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

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:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

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:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

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 to
  • neq - not equal to
  • lte - lower than or equal to
  • gt - greater than
  • lt - lower than
  • gte - greater than or equal to
  • starts_with - match objects which start with the given pattern
  • ends_with - match objects which end with the given pattern
  • contains - match objects which contain the given pattern

The value of the FilterValue parameter specifies what to filter from the results.

Example of the request:

bash

Example of the successful response:

json

In a case of an error, the response contains the error object with an error code and message:

json

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 the Filter parameter or an unknown field passed to the Fields, Sort, or Filter parameters.
  • -32700 - Can't decode JSON request body.
  • -33333 - Not authenticated.