/
subscriptions

subscriptions

List subscriptions

Retrieves subscription(s) for the logged in user

Call

HTTP GET /subscriptions

Filter

Name

Example value

Description

Value amount/Data type

Default

filter

filter=all

Only retrieves certain subscriptions

all/nontemporary/ongoing

nontemporary

Example:

APIURL/subscriptions.xml?filter=nontemporary

Response

Tag

Format

Example

Description

subscriptions

 

<subscriptions>

The subscription tag contains the actual subscription

subscription

 

<subscription>

Represents a subscription

id

ID

<id>23</id>

Unique ID

start

Date

<start>2009-01-25</start>

Start date

end

Date

<end>2009-06-21</end>

End date or term end date

businessunit

 

<businessunit><id>11</id><name>Center</name></businessunit>

Facility

product

 

<product><id>25</id><name>Training</name></product>

The product the subscription was created from

price

Integer

<price>13200</price>

Price including two decimals (€13.50 = 1350)

users

 

<users>

People affiliated with the subscription (users, payers)

user

 

<user>

Person

id

ID

<id>23</id>

Unique ID

name

String

<name>John Doe</name>

Persons name

renew

Boolean

<renew>true</renew>

Should the subscription show be renewed after the term agreement period has been reached or not.

debiteduntil

Date

<debiteduntil>2009-06-21</debiteduntil>

Debited until (denotes the period of time the subscription has been charged for)

canceled

Boolean

<canceled>false</canceled>

Canceled

contractcancelday

Date

<contractcancelday>2009-06-21</contractcancelday>

Date canceled

frozen

Boolean

<frozen>false</frozen>

If the subscription is frozen or not

temporary

Boolean

<temporary>false</temporary>

If the subscripion is temporary or not

ongoing

Boolean

<ongoing>true</ongoing>

Hurivida abonnemanget är pågående med andra ord aktivt

<subscriptions>
  <subscription>
    <id>23</id>
    <start>2009-01-25</start>
    <end>2009-06-21</end>
    <businessunit>
      <id>12</id> 
      <name>Center</name> 
    </businessunit>
    <product>
      <id>25</id>
      <name>Training</name>
    </product>
    <price>100.00</price>
    <users>
      <user>
        <id>45</id>
        <name>John Doe</name>
      </user>
    </users>
    <renew>true</renew>
    <debiteduntil>2009-06-21</debiteduntil>
    <canceled>false</canceled>
    <contractcancelday/>
    <frozen>false</frozen>
    <temporary>false</temporary>
    <ongoing>true</ongoing>
  </subscription>
</subscriptions>

Modify subscription

Modifies an subscription. 

Request

Parameters:

 

 

Name

Required

exempelvärde

förklaring

Värdemängd/Datatyp

businessunitid

Yes

businessunitid=17

The ID of the businessunit that will be set on the subscription. Must belong to the same company as the existing businessunit on the subscription.

ID

 

Exempel:

PUT:APIURL/subscriptions/{id}.xml?apikey=338934897438&businessunitid=1
 
or with apikey 3:
 
PUT:APIURL/eventbookings/{id}.xml?apikey=338934897438&businessunitid=1&userid=1

Svar

Same as list of subscription

Delete

Call, requires basic HTTP authentication

HTTP DELETE /subscriptions/{id}

Example:

DELETE:APIURL/subscriptions/25345.xml?apikey=338934897438

Response

HTTP 204
Empy contents.

 

 

Related content

orders
orders
More like this
products
products
Read with this
activities
activities
More like this
receipts
receipts
Read with this
paymentcertificates
paymentcertificates
More like this
restapihowtos2
restapihowtos2
Read with this