Retrieve user subscription

A user should be able to get his subscription information.

For FULL API access users, this endpoint could be used to see the current balance and the activation status of the automatic renewal.

Note

The user should be logged in.

GET https://api.tradingpartners.ai/api/v1/users/subscription

Get users/subscription response object

Attributes


subscription - string enum
Current subscription plan of the user
  • FREE - Free API access
  • FULL - Full API access

balance - number fmt:uint64
User current balance.


automaticRenewal - boolean
When a FULL API access user run out of credits, if set to true the user will be automatically debited to renew his subscription.

Authorization header

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJmb3IiOiJ1c2VyIiwid2l0aCI6ImdyYWRlIiwiZnVsbCI6dHJ1ZX0.sWNz-Z0oGGWoSwaVlOGyzCQdYCWJQmKSSFvZIJzchZw

Get users/subscription response object

{
  "subscription": "FULL",
  "balance": 4,
  "automaticRenewal": true
}