Documentation
Difficulty level:
This section only applies if the module Subscriptions is active.
API - Customer - GET customer/activesubscriptions
GET customer/activesubscriptions
[[custom_message msg_text="Deze functie is alleen van toepassing indien de module abonnementen actief is"]]
Used for
Getting the active subscriptions for given customer
Authentication
Needs to be logged in with admin rights
Parameters
Parameter | Description | Required | Example |
---|---|---|---|
customer_id | Customer ID | Yes | 2 |
subscription_id | Subscription ID | No | 12 |
Output
Fields are depending on the configuration of the customer fields.
Response codes
- 200 OK
- 401 Unauthorized for current customer
Example
Login as user admin.
GET api/rest/customer/activesubscriptions?customer_id=104
Response
[ { "subscription_id":"2", "subscription_name":"Test Abo", "valid_from":"2014-01-02", "valid_till":"2015-01-01", "price":"12", "currency":"EUR", "setupprice":"0", "setupcurrency":"EUR", "last_from":null, "last_till":null }, { "subscription_id":"3", "subscription_name":"Test twee", "valid_from":"2014-01-02", "valid_till":"2015-01-01", "price":"15", "currency":"EUR", "setupprice":"0", "setupcurrency":"EUR", "last_from":null, "last_till":null } ]