Download OpenAPI specification:Download
This guide describes list of API services that are provided by OT Rainbow End user portal. This portal is dedicated to end user features.
REST interface is used for sending/receiving OT rainbow API messages. HTTP requests GET, DELETE, POST, UPDATE are used. Standard HTTP responses are used to provide requested information or error status. There is no session notion in OT Rainbow system, so requests could be issued according stateless model, without transport conservation between them. Additional data could be provided in message body. JSON is used as a main format for data encoding in message body part. Each request is started with the following pattern /{module}/{version}/ where {module} is a portal module name to address and {version} is a version of used API, par example, “v1.0”.
Each request should contain some credential information to authenticate itself. Standard HTTP authentication with basic/bearer modes is used. JSON Web Token mechanism is used to provide authentication information. JWT has a expire timeout that is controlled by OT Rainbow portal to prevent very long token usage. Also authentication with application token is used. The token must be provided in the request HTTP header, using a custom header: APIKey. At server side, token is verified, and if it doesn’t match, 403 Not Allowed response is sent. TLS is used as a transport protocol to support message exchanges between OT Rainbow portal and an application.
For accessing the API a valid JWT token or a valid OAuth access token must be passed in all the queries in the 'Authorization' header.
Security Scheme Type | API Key |
---|---|
Header parameter name: | Authorization |
This API retrieves the list of invoices available on Zuora for the requested company.
superadmin
can list invoices being available to any company existing in Rainbow.
bp_finance
can only list invoices available to their BP company.
Users being both bp_finance
and organization_admin
can list invoices available for
all the companies being in their organization.
Currently only BP DR
and BP VAD
companies have invoices in Zuora. An error is
returned when trying to list invoices for companies which are not BP DR or BP VAD.
Invoices are returned in reverse chronological order by updatedDate.
For more details about the response, see Zuora documentation.
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
format | string Default: "small" Enum: "small" "medium" "full" Allows to retrieve more or less invoice details in response.
|
accept required | string application/json |
{- "data": [
- {
- "id": "2c92c0fa5b4237df015b6bc6ed483919",
- "accountId": "2c92c0f95a6b2281015a6fd742211675",
- "accountNumber": "HAGSH87176",
- "accountName": "BP NOD",
- "invoiceDate": "2017-04-14",
- "invoiceNumber": "INV00000376",
- "dueDate": "2017-06-13",
- "invoiceTargetDate": "2017-04-14",
- "amount": 361.65,
- "balance": 0,
- "creditBalanceAdjustmentAmount": 0,
- "createdBy": "2c92c0f85721ff7c015742a336a67d7b",
- "status": "Posted",
- "body": "/v1/files/2c92c08a5b4237b2015b6bc6f2a732b6",
- "invoiceItems": [
- {
- "id": "2c92c0fa5b4237df015b6bc6ed51391b",
- "subscriptionName": "RB-201703001822",
- "subscriptionId": "2c92c0fa5b1473e8015b16e3fdcb1397",
- "serviceStartDate": "2017-04-01",
- "serviceEndDate": "2017-04-09",
- "chargeAmount": 1.63,
- "chargeDescription": "",
- "chargeName": "Price per user Enterprise",
- "chargeId": "2c92c0fa5b1473e8015b16e3fdb91396",
- "productName": "Rainbow Enterprise - Reseller - old",
- "quantity": 2,
- "taxAmount": 0,
- "unitOfMeasure": "Each",
- "chargeDate": "2017-04-14 11:24:10",
- "chargeType": "Recurring",
- "processingType": "Charge"
}, - {
- "id": "2c92c0fa5b4237df015b6bc6ed51391c",
- "subscriptionName": "RB-201703001804",
- "subscriptionId": "2c92c0fb5af4870e015afc1769b5102f",
- "serviceStartDate": "2017-04-01",
- "serviceEndDate": "2017-04-30",
- "chargeAmount": 12,
- "chargeDescription": "",
- "chargeName": "Price per user Enterprise",
- "chargeId": "2c92c0fb5af4870e015afc1769a7102e",
- "productName": "Rainbow Business Reseller V2 - old",
- "quantity": 10,
- "taxAmount": 2.4,
- "unitOfMeasure": "User",
- "chargeDate": "2017-04-14 11:24:10",
- "chargeType": "Recurring",
- "processingType": "Charge"
}
], - "invoiceFiles": [
- {
- "id": "2c92c08a5b4237b2015b6bc6f2a732b6",
- "versionNumber": 1492161851199
}, - {
- "id": "2c92c08c5b423798015b6bc6f203350b",
- "versionNumber": 1492161851175
}
]
}, - {
- "id": "2c92c0955ab279cd015ab8f3a7342f1f",
- "accountId": "2c92c0f95a6b2281015a6fd742211675",
- "accountNumber": "HAGSH87176",
- "accountName": "BP NOD",
- "invoiceDate": "2017-03-10",
- "invoiceNumber": "INV00000355",
- "dueDate": "2017-05-09",
- "invoiceTargetDate": "2017-03-10",
- "amount": 1.8,
- "balance": 0,
- "creditBalanceAdjustmentAmount": 0,
- "createdBy": "2c92c0f858eca4720158f3af945443d0",
- "status": "Posted",
- "body": "/v1/files/2c92c08d5b42423c015b6bc6efb524ca",
- "invoiceItems": [
- {
- "id": "2c92c0955ab279cd015ab8f3a7382f21",
- "subscriptionName": "RB-201702013280",
- "subscriptionId": "2c92c0fa5a6b1360015a705c69a519ad",
- "serviceStartDate": "2017-03-01",
- "serviceEndDate": "2017-03-09",
- "chargeAmount": 1.8,
- "chargeDescription": "",
- "chargeName": "Price per user Enterprise",
- "chargeId": "2c92c0fa5a6b1360015a705c699219ac",
- "productName": "Rainbow Enterprise - Reseller - old",
- "quantity": 2,
- "taxAmount": 0,
- "unitOfMeasure": "Each",
- "chargeDate": "2017-03-10 17:01:00",
- "chargeType": "Recurring",
- "processingType": "Charge"
}
], - "invoiceFiles": [
- {
- "id": "2c92c08d5b42423c015b6bc6efb524ca",
- "versionNumber": 1492161851155
}, - {
- "id": "2c92c08d5ab28263015ab8f3a81d5323",
- "versionNumber": 1489161660291
}, - {
- "id": "8ad087d2924c38d001925481c94432a4",
- "fileContentType": "text/csv"
}
]
}
], - "total": 2
}
This API retrieves an invoice file available on Zuora. The file is in PDF format.
superadmin
can get invoice files belonging to any company existing in Rainbow.
bp_finance
can only get invoice files for their BP company.
Users being both bp_finance
and organization_admin
can get invoice files for
all the companies being in their organization.
fileId to provide comes from the response of API
GET /api/rainbow/subscription/v1.0/companies/:companyId/invoices
(field invoicesFiles.id).
fileId required | string id of the invoice file to download. |
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
accept required | string application/json |
{- "Invoice": "string"
}
Get an offer from its id
The requested offer must be in the requested company's assigned catalog, otherwise an error 403 is returned.
offerId required | string Offer unique identifier. |
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
accept required | string application/json |
{- "data": {
- "id": "58072f646237427a3687dc90",
- "name": "Professional",
- "description": "Professional offer",
- "profileId": "57cd90ddc04fd92e232ae258",
- "isDefault": false,
- "canBeSold": true,
- "businessModel": "nb_users",
- "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
- "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
- "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
- "creationDate": "2016-10-19T14:12:13.352"
}
}
This API retrieves the list of offers available to the requested company.
The available offers for a company corresponds to the offers being in the catalog assigned to this company.
superadmin
and support
can list offers being available to any company existing
in Rainbow.
business_admin
can list only demo offers being available to any company existing
in Rainbow.
bp_admin
can only list offers available to their own company and offers available to End
Customer / BP IR companies for which the BP company is bp_admin's one.
bp_finance
can only list offers available to their own company and offers available to End
Customer / BP IR companies for which the BP company is bp_finance's one.
organization_admin
can only list offers available for all the companies being in their organisation.
company_admin
can only list offers available to their own company.
Users being both bp_admin
or bp_finance
and organization_admin
can list offers available for
all the companies being in their organization and the End Customers / BP IR being linked to BP companies of the
organisation.
Offers which can be sold are flagged with boolean canBeSold
set to true.
Other offers (with canBeSold set to false) can't be subscribed using API
POST /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions.
For example, free offers like Essential, Beta, Alpha, Enterprise Demo... can't be subscribed directly by customers
(Essential is automatically assigned when creating company, Beta, Alpha, Enterprise Demo, ... are reserved for
specific companies and can only be assigned by a superadmin).
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
format | string Default: "small" Enum: "small" "medium" "full" Allows to retrieve more or less offer details in response.
|
name | string Allows to filter offer list on field name. |
canBeSold | boolean Allows to filter offer list on field canBeSold. |
autoSubscribe | boolean Allows to filter offer list on field autoSubscribe. |
isExclusive | boolean Allows to filter offer list on field isExclusive. |
isPrepaid | boolean Allows to filter offer list on field isPrepaid. |
profileId | boolean Allows to filter offer list on field profileId. |
offerReference | boolean Allows to filter offer list on field offerReference. |
sapReference | boolean Allows to filter offer list on field sapReference. |
limit | number Default: 100 Allow to specify the number of offers to retrieve. |
offset | number Default: 0 Allow to specify the position of first offer to retrieve (first offer if not specified). Warning: if offset > total, no results are returned. |
sortField | string Default: "name" Enum: "_id" "name" Sort offer list based on the given field. |
sortOrder | number Default: 1 Enum: -1 1 Specify order when sorting offer list. |
accept required | string application/json |
{- "data": [
- {
- "id": "58050dc17c37990d161f6cb3",
- "name": "Essential",
- "description": "Essential offer",
- "isDefault": true,
- "creationDate": "2016-10-19T12:54:30.523",
- "profileId": "57cd4346d8793a0d124aa21e",
- "sapReference": "3EY95001AA",
- "offerReference": "RB-Essential",
- "isExclusive": false
}, - {
- "id": "58072f646237427a3687dc90",
- "name": "Enterprise",
- "description": "Rainbow Enterprise offer",
- "technicalDescription": "Enterprise offer for BP VAD",
- "profileId": "57cd90ddc04fd92e232ae258",
- "isDefault": false,
- "canBeSold": true,
- "businessModel": "nb_users",
- "isExclusive": true,
- "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
- "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
- "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
- "sapReference": "3EY95003AA",
- "offerReference": "RB-Enterprise",
- "creationDate": "2017-04-25T12:11:08.717Z",
- "groupName": "Enterprise"
}, - {
- "id": "59e8e083ca44fd228b850f39",
- "name": "Business 1Year",
- "description": "Rainbow Enterprise offer",
- "technicalDescription": "Rainbow Business 1 User 1 Year",
- "isDefault": false,
- "creationDate": "2017-10-19T14:12:13.352",
- "profileId": "58da6ef53b66b9584c1d1edf",
- "canBeSold": true,
- "businessModel": "nb_users",
- "isExclusive": true,
- "isPrepaid": true,
- "prepaidDuration": 12,
- "zuoraOfferId": "2c92c0f95b1abf84015b3acdf1ae0c32",
- "zuoraProductRatePlanId": "2c92c0f95b1abf84015b3acdf1c50c34",
- "zuoraProductRatePlanChargeId": "2c92c0f95b1abf84015b3acdf1dd0c36",
- "sapReference": "3EY95101AB",
- "offerReference": "RB-Business-1Y",
- "groupName": "Business"
}, - {
- "id": "58ff3cdc5b9f3e48ad4fb906",
- "name": "Conference",
- "description": "Rainbow Conference offer",
- "technicalDescription": "Conference offer for BP VAD",
- "profileId": "58ff3cdb5b9f3e48ad4fb903",
- "isDefault": false,
- "canBeSold": true,
- "businessModel": "usage",
- "isExclusive": false,
- "zuoraOfferId": "2c92c0f95c14fb2c015c15bb8cb56926",
- "zuoraProductRatePlanId": "2c92c0f95c14fb2c015c15bdaa8b79c1",
- "zuoraProductRatePlanChargeId": "2c92c0f95c14fb2c015c15c00da07657",
- "sapReference": "3EY95004AA",
- "offerReference": "RB-Conference",
- "creationDate": "2017-04-25T12:11:08.797Z",
- "groupName": "Conference"
}
], - "limit": 100,
- "offset": 0,
- "total": 4
}
This API can be used to create a quotation for a given offer for a given company
(creation of a subscription in preview mode).
superadmin
can create quotation for any company existing in Rainbow.
bp_finance
can only create quotation for their own company and for End Customer / BP IR
companies for which the BP company is bp_finance's one.
Users being both bp_finance
and organization_admin
can create quotation for
all the companies being in their organization and the End Customers / BP IR being linked to BP companies of the
organisation.
Only superadmin
and bp_finance
can create quotation (for now at least), users with
admin
role alone are denied.
Only offers with businessModel nb_users
or flat_fee
or nb_services
can be quoted.
The company for which the quotation is performed must be a BP company or be linked to a BP company.
If the BP company have resell
businessModel, his bpApplicantNumber must exist in Business Store
(i.e. API GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber} must return true).
Creating a quotation allows to retrieve information regarding amount that the BP will be invoiced if he
subscribes to the related paid offer (of updates an existing subscription) for one of his EC / BP IR companies.
Therefore, this API should be called before actually creating or updating the subscription for the offer
for this EC / BP IR company.
If the quotation is done for a company which does not have subscribed yet to the requested offer, offerId
parameter have to be used.
The list of offers which can be bought can be listed using API
GET /api/rainbow/subscription/v1.0/companies/:companyId/offers
(warning: the offers already bought are also listed).
Actual subscription to the offer is done by calling API
POST /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions
The offer has to be in the catalog assigned to the company's BP, otherwise an error 403 is returned.
If the quotation is done for a company which already have subscribed to the requested offer,
subscriptionId
parameter have to be used.
Actual update of the company subscription is done by calling API
PUT /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions/{subscriptionId}
For more information, see Zuora documentation.
companyId required | string Id of the company for which the quotation is requested.
|
autoRenew | boolean autoRenew value to set (only applicable for subscription to prepaid offers) |
autoRenewToMonthly | boolean autoRenewToMonthly value to set. It indicates if the prepaid subscription will be renewed to a monthly at end of it . If true, the prepaid will be deleted when renewing subscription and a monthly will be created to replace it. (only applicable for subscription to prepaid offers)
|
maxNumberUsers | integer <int32> Value: "0.." Number of users quoted for this offer.
|
offerId | string Id of the offer to quote.
|
prepaidDuration | number [ 12 .. 60 ] Prepaid duration quoted for existing subscription. Can only be increased. |
prepaidRenewalOption | string Enum: "billed" "allocated" "volume" Prepaid subscription renewal option. Renewal will be done either on |
renewalTerm | number [ 12 .. 60 ] Subscription renewal term. This is the duration that will be used when renewing a prepaid subscription (only applicable for subscription to prepaid offers). |
renewalVolume | number Number of licenses to use when renewing subscription with |
subscriptionId | string Id of the company subscription for which the quotation is requested.
|
{- "autoRenew": true,
- "autoRenewToMonthly": true,
- "maxNumberUsers": "0..",
- "offerId": "string",
- "prepaidDuration": 12,
- "prepaidRenewalOption": "billed",
- "renewalTerm": 12,
- "renewalVolume": 0,
- "subscriptionId": "string"
}
{- "data": {
- "currency": "EUR",
- "contractedMrr": 12,
- "totalContractedValue": null,
- "totalDeltaMrr": 2.8,
- "totalDeltaTcv": null,
- "amount": 0.92,
- "amountWithoutTax": 0.77,
- "taxAmount": 0.15,
- "invoiceTargetDate": "2017-03-30",
- "invoiceItems": [
- {
- "serviceStartDate": "2017-03-30",
- "serviceEndDate": "2017-03-31",
- "chargeAmount": 0.77,
- "chargeDescription": "",
- "chargeName": "Price per user Enterprise",
- "productName": "Rainbow Business Reseller V2",
- "productRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
- "quantity": 10,
- "unitOfMeasure": "User"
}
], - "chargeMetrics": [
- {
- "productRatePlanId": "2c92c0f85b1ab29a015b3ad63fcf7325",
- "productRatePlanChargeId": "2c92c0f85b1ab29a015b3ad63fe67327",
- "originRatePlanId": "2c92c0fb5e7f8f35015e870a31907335",
- "originalId": "2c92c0fb5e7f8f35015e870a31907336",
- "number": "C-00003452",
- "mrr": 30.8,
- "dmrr": 2.8,
- "tcv": null,
- "dtcv": null
}
], - "expirationDate": "2021-11-01T00:00:00.000Z"
}
}
/!\ For now, only resell model is managed (i.e. a bp_finance of BP VAD/IR/DR buy a subscription for one of his customer companies (EC)
or bp_finance of BP VAD buy a subscription for one of his BP IR).
This API can be used to create a subscription for a company to a given offer.
If BP company have resell
businessModel, his bpApplicantNumber must exist in Business Store
(i.e. API GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber} must return true).
Note: BP IR companies should not have a bpApplicantNumber, as they don't pay directly ALE (their BP VAD does).
superadmin
can create subscriptions for every company. superadmin
can create
subscription even for offers which can't be sold (not paid offers, like beta, Enterprise Demo, ...).
business_admin
can create subscriptions for every company. business_admin
can create
subscription only for demo offers. If business_admin tries to subscribe to an offer that is not a demo offer, request is rejected with a 400 bad request error.
bp_finance
can only create subscriptions for End Customer companies / BP IR companies for which
bp_finance's company is the BP company.
Users being both bp_finance
and organization_admin
can create subscription for
all the companies being in their organization and the End Customers / BP IR being linked to BP companies of the
organisation.
Only superadmin
and bp_finance
can create subscriptions (for now at least), users
with admin
role alone are denied.
bp_finance
of BP IR companies can only create subscriptions for End Customer companies / their own BP IR companies to pre-paid offers, and only
if their VAD have set the fieldadminHasRightToUpdateSubscriptions
to true for this BP IR company.
Creating a subscription corresponds to a company buying a paid offer.
Therefore, a subscription links a company to an offer.
The list of offers which can be bought can be listed using API
GET /api/rainbow/subscription/v1.0/companies/:companyId/offers
(warning: the offers already bought are also listed).
The offer has to be in the catalog assigned to the BP company, otherwise an error 403 is returned
(except if subscription creation is done by superadmin).
The offers have a businessModel corresponding to the way they are sold.
nb_users
or nb_services
correspond to offers sold for a given number of users (licences).
maxNumberUsers
.nb_users
or nb_services
, maxNumberUsers must be provided (it must be > 0).maxNumberUsers
corresponds to the maximum number of users who can be assigned to the subscription of this offer.nb_users
or nb_services
, a quotation can be made using API
POST /api/rainbow/subscription/v1.0/companies/:companyId/quotations.nb_services
, the company subscription can be assigned to as many users as available licences (field
maxNumberUsers of subscription objects) using API POST /api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}.usage
correspond to offers for which billing will be done according to
customer consumption (minutes of conference, TB of storage, ...).
usage
(as the invoice will depend of customer consumption)<message id="8413b42e-563c-4437-9a53-06f638b5ab69_0"
type="management"
from="pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532"
to="5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com"
xmlns="jabber:client">
<companysubscription xmlns="jabber:iq:configuration" subscriptionId="5808afeb4372eb19547e90cf"
companyId="58bd63d5dc5ef5eb3fe154c0" action="create">
<offerId>58072f646237427a3687dc90</offerId>
<offerName>Enterprise</offerName>
<profileId>57cd90ddc04fd92e232ae258</profileId>
<profileName>Enterprise</profileName>
<status>creating</status>
<syncOngoing>true</syncOngoing>
<maxNumberUsers>50</maxNumberUsers>
</companysubscription>
</message>
status
field with value creating
and the syncOngoing
flag indicates that the creation is ongoing on Business Store and Zuora side.
status
equal to active
and
syncOngoing
equal to false.
If superadmin
or business_admin
is creating a subscription to a Dial In custom offer, the expirationDate is mandatory. Otherwise, creation is refused with a bad request error (400516).
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
additionalPurchaseOrderNumber | string Subscription additional purchase order number. |
applicationId | string Id of the CPaaS application to link to the subscription.
|
autoRenew | boolean autoRenew value to set (only applicable for subscription to prepaid offers) |
autoRenewOneTime | boolean autoRenewOneTime value to set. It indicates if subscription will be renewed only one time. If true, |
autoRenewToMonthly | boolean autoRenewToMonthly value to set. It indicates if the prepaid subscription will be renewed to a monthly at end of it . If true, the prepaid will be deleted when renewing subscription and a monthly will be created to replace it. (only applicable for subscription to prepaid offers) |
businessAdminComment | string A business admin comment (max 256 characters) |
expirationDate | string <date> Subscription expiration date. Can only be managed by |
maxNumberUsers | number Number of users (licences) bought for this offer.
|
monthlyDuration | number [ 3 .. 60 ] Number of month during which the monthly subscription will exist. Can be set at creation, and can be increased or decreased (only applicable for subscription to monthly offers). If set to null or 0, expirationDate and monthlyDuration will be set to null. |
offerId required | string Id of the offer to subscribe. |
prepaidDuration | number [ 12 .. 60 ] Subscription prepaid duration. Can only be increased compared to the offer prepaid duration (only applicable for subscription to prepaid offers). |
promoCode required | string Name of the promo Code to apply. |
purchaseOrderNumber | string Subscription purchase order number. Not settable by IR BP. |
renewalTerm | number [ 12 .. 60 ] Subscription renewal term. This is the duration that will be used when renewing a prepaid subscription (only applicable for subscription to prepaid offers). |
renewalTermOption | string Enum: "1_year" "initial" Prepaid subscription renewal term option: renewal duration will be 1 year or equal to prepaidDuration if |
{- "additionalPurchaseOrderNumber": "string",
- "applicationId": "string",
- "autoRenew": true,
- "autoRenewOneTime": true,
- "autoRenewToMonthly": true,
- "businessAdminComment": "string",
- "expirationDate": "2019-08-24",
- "maxNumberUsers": 0,
- "monthlyDuration": 3,
- "offerId": "string",
- "prepaidDuration": 12,
- "promoCode": "string",
- "purchaseOrderNumber": "string",
- "renewalTerm": 12,
- "renewalTermOption": "1_year"
}
{- "data": {
- "id": "59199637d3f06c2fdc40b95e",
- "offerId": "580e05670f3cce8315072657",
- "offerName": "Enterprise",
- "offerDescription": "Rainbow Enterprise offer",
- "offerTechnicalDescription": "Enterprise offer for BP VAD",
- "sapReference": "3EY95003AA",
- "offerReference": "RB-Enterprise",
- "profileId": "580778556fbd22a442d4fb58",
- "profileName": "Enterprise",
- "isDefault": false,
- "businessModel": "nb_users",
- "isExclusive": true,
- "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
- "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
- "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
- "creationDate": "2017-05-15T11:51:19.180Z",
- "createdBy": {
- "bpApplicantNumber": "HAGSH87176",
- "loginEmail": "bpfinance@bp.fr",
- "userId": "589dea575a5f36a336a65704"
}, - "status": "creating",
- "syncOngoing": true,
- "bsSubscriptionId": "RB-201705005659",
- "maxNumberUsers": 50,
- "purchaseOrderNumber": "my po",
- "businessAdminComment": "A business admin comment"
}
}
This API can be used to list all subscriptions subscribed by a company.
All companies have at least a subscription to the default (free) offer.
superadmin
, business_admin
and support
can list subscriptions of all companies existing in Rainbow.
business_admin
can list only demo subscriptions of all companies existing in Rainbow.
bp_admin
can only list subscriptions of End Customer companies for which their bp_admin's company is the BP company.
bp_finance
can only list subscriptions of End Customer companies for which their bp_finance's company is the BP company.
organization_admin
can only list subscriptions of companies under their organisation.
company_admin
can list subscriptions only for their company.
If format is full, data regarding user assignment is added for each subscription:
bpType
=IR
and the
subscription has businessModel
=nb_users
, the following fields are computed and
added to the subscription data:
nbBPLicences
: the number of licences available for this subscription (equal to maxNumberUsers
),nbAssignedBPUsers
: the number of licences assigned to BP users for this subscription,nbLicencesAssignedToECs
: the number of licences assigned to users of EC companies under the BP IR for which
subscription have been bought (linked to the BP IR's subscription)nbLicencesUsed
: the number of licences used for this subscription (equal to nbAssignedBPUsers
+ nbLicencesAssignedToECs
)nbFreeLicences
: the number of licences available for this subscription (equal to nbBPLicences
- nbLicencesUsed
)numberAssignedUsers
: the number of licences assigned for this subscription (equal to nbLicencesUsed
).
Added for compatibility so that in all cases this field is set.numberAssignedUsers
: the number of licences assigned to company users for this subscription.companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
format | string Default: "small" Enum: "small" "medium" "full" Allows to retrieve more or less subscription details in response.
|
showTerminated | boolean Allows to get terminated subscriptions. By default, terminated subscription are not returned. |
accept required | string application/json |
{- "data": [
- {
- "id": "5808b655a55a36d354f75cbe",
- "offerId": "58079ed2041fa586e92337cd",
- "offerName": "Essential",
- "sapReference": "3EY95001AA",
- "offerReference": "RB-Essential",
- "profileId": "580777f56fbd22a442d4fb57",
- "profileName": "Essential",
- "creationDate": "2016-10-18T15:15:38.351Z",
- "status": "active",
- "isDefault": true,
- "isExclusive": false,
- "numberAssignedUsers": 32
}, - {
- "id": "5808afeb4372eb19547e90cf",
- "offerId": "58072f646237427a3687dc90",
- "offerName": "Enterprise",
- "offerDescription": "Rainbow Enterprise offer",
- "offerTechnicalDescription": "Enterprise offer for BP VAD",
- "sapReference": "3EY95003AA",
- "offerReference": "RB-Enterprise",
- "profileId": "57cd90ddc04fd92e232ae258",
- "profileName": "Enterprise",
- "isDefault": false,
- "businessModel": "nb_users",
- "isExclusive": true,
- "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
- "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
- "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
- "creationDate": "2016-10-20T12:19:33.043Z",
- "createdBy": {
- "userId": "5891dd587be005b39a4ee7bf",
- "loginEmail": "bp_finance@bp-company.com",
- "bpApplicantNumber": "The applicant number of the BP"
}, - "status": "active",
- "syncOngoing": false,
- "bsSubscriptionId": "RB-201705005659",
- "zuoraSubscriptionId": "2c92c0fb5ca5c5bc015ca6feafbc7995",
- "maxNumberUsers": 10,
- "bpBusinessType": "rainbow",
- "groupName": "Enterprise",
- "nbBPLicences": 10,
- "nbAssignedBPUsers": 1,
- "nbLicencesAssignedToECs": 9,
- "nbLicencesUsed": 10,
- "numberAssignedUsers": 10,
- "nbFreeLicences": 0
}, - {
- "id": "59396b2918f2e75c2bd3bb5b",
- "offerId": "58ff3cdc5b9f3e48ad4fb906",
- "offerName": "Conference",
- "offerDescription": "Rainbow Conference offer",
- "offerTechnicalDescription": "Conference offer for BP VAD",
- "sapReference": "3EY95004AA",
- "offerReference": "RB-Conference",
- "profileId": "58ff3cdb5b9f3e48ad4fb903",
- "profileName": "Conference",
- "isDefault": false,
- "businessModel": "usage",
- "isExclusive": false,
- "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
- "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
- "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
- "creationDate": "2017-06-08T15:20:09.000Z",
- "createdBy": {
- "userId": "5891dd587be005b39a4ee7bf",
- "loginEmail": "bp_finance@bp-company.com",
- "bpApplicantNumber": "The applicant number of the BP"
}, - "status": "active",
- "syncOngoing": false,
- "bsSubscriptionId": "RB-201706005824",
- "zuoraSubscriptionId": "2c92c0fb5ca5c5d0015ca78105b93dcc",
- "bpBusinessType": "conference_payg",
- "groupName": "Conference",
- "maxNumberUsers": null,
- "numberAssignedUsers": 9
}
]
}
This API can be used to delete or terminate a given company subscription.
superadmin
can delete subscriptions for every company. superadmin
can delete subscription even for offers which can't be sold (not paid offers, like beta, Enterprise Demo, ...).
business_admin
can delete subscriptions for every company. business_admin
can delete subscription only for demo offers. If business_admin user tries to delete a subscription that is not about a demo offer, an error 400 bad request is thrown.
bp_finance
can only delete subscriptions for End Customer companies for which the bp_finance's company is the BP company.
Subscriptions to prepaid offers can be terminated using this API only during the month the subscription was created (e.g. if subscription was created the 15th of september, it can be cancelled until the 1st of october. After that subscription can't be cancelled).
Prepaid offers auto renewal can be cancelled using API PUT /api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId and it will be terminated when expirationDate will be reached.
Subscriptions not being in Business Store / Zuora are deleted (i.e. subscriptions to free
offers like beta, Enterprise Demo, ...) from Rainbow database.
Others subscriptions (known on Zuora) are tagged with status terminated
.
Default subscription can't be deleted.
When the subscription is deleted/terminated, the profile of all users being linked to this subscription is updated (the profile linking to this subscription is removed).
When the subscription is deleted, all company_admin of the company and all the bp_admin and bp_finance of the BP company linked to this company are notified with the following XMPP message:
<message id="8413b42e-563c-4437-9a53-06f638b5ab69_0" type="management"
from="pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532"
to="5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com"
xmlns="jabber:client">
<companysubscription xmlns="jabber:iq:configuration"
subscriptionId="5808afeb4372eb19547e90cf"
companyId="58bd63d5dc5ef5eb3fe154c0" action="delete"></companysubscription>
</message>
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
subscriptionId required | string Company subscription unique identifier. |
accept required | string application/json |
{- "status": "Subscription 5808afeb4372eb19547e90cf successfully terminated",
- "data": [ ]
}
This API can be used to get a subscription of a company.
superadmin
and support
can get subscriptions of all companies existing in Rainbow.
business_admin
can get only demo subscriptions of all companies existing in Rainbow.
bp_admin
can only get subscriptions of End Customer companies for which their bp_admin's company is the BP company.
bp_finance
can only get subscriptions of End Customer companies for which their bp_finance's company is the BP company.
organization_admin
can only get subscriptions of companies under their organisation.
company_admin
can get subscriptions only for their company.
Data regarding user assignment is computed and returned for the requested subscription:
bpType
=IR
and the
subscription has businessModel
=nb_users
, the following fields are computed and added to the subscription data:
nbBPLicences
: the number of licences available for this subscription (equal to maxNumberUsers
),nbAssignedBPUsers
: the number of licences assigned to BP company's users for this subscription,nbLicencesAssignedToECs
: the number of licences affected to EC companies under the BP IR for which
subscription have been bought (linked to the BP IR's subscription)nbLicencesUsed
: the number of licences used for this subscription (equal to nbAssignedBPUsers
+ nbLicencesAssignedToECs
)nbFreeLicences
: the number of licences available for this subscription (equal to nbBPLicences
- nbLicencesUsed
)numberAssignedUsers
: the number of licences assigned for this subscription (equal to nbLicencesUsed
).numberAssignedUsers
: the number of licences assigned to company's users for this subscription.companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
subscriptionId required | string Company subscription unique identifier. |
accept required | string application/json |
{- "data": {
- "id": "59199637d3f06c2fdc40b95e",
- "offerId": "580e05670f3cce8315072657",
- "offerName": "Enterprise",
- "profileId": "580778556fbd22a442d4fb58",
- "profileName": "Enterprise",
- "offerDescription": "Rainbow Enterprise offer",
- "offerTechnicalDescription": "Enterprise offer for BP VAD",
- "sapReference": "3EY95003AA",
- "offerReference": "RB-Enterprise",
- "isDefault": false,
- "businessModel": "nb_users",
- "isExclusive": true,
- "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
- "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
- "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
- "creationDate": "2017-05-15T11:51:19.180Z",
- "createdBy": {
- "bpApplicantNumber": "HAGSH87176",
- "loginEmail": "bpfinance@bp.fr",
- "userId": "589dea575a5f36a336a65704"
}, - "status": "active",
- "syncOngoing": false,
- "bsSubscriptionId": "RB-201705005659",
- "zuoraSubscriptionId": "2c92c0fb5ca5c5bc015ca6feafbc7995",
- "maxNumberUsers": 10,
- "nbBPLicences": 10,
- "nbAssignedBPUsers": 1,
- "nbLicencesAssignedToECs": 9,
- "nbLicencesUsed": 10,
- "numberAssignedUsers": 10,
- "nbFreeLicences": 0
}
}
This API can be used to update a given company subscription.
Currently only maxNumberUsers
can be updated, so update is restricted to subscriptions linked to
offers having businessModel nb_users
.
Now also autoRenew
and autoRenewToMonthly
can be updated using this API. In this case, update is limited to subscriptions to prepaid offers
The subscription can only be updated if it is not synchronizing with Business Store and Zuora (i.e. syncOngoing
must be equal to false).
If BP company have resell
businessModel, his bpApplicantNumber must exist in Business Store
(i.e. API GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber} must return true).
Note: BP IR companies should not have a bpApplicantNumber, as they don't pay directly ALE (their BP VAD does).
business_admin
can update demo subscriptions for all existing companies. If business_admin user tries to update a subscription that is not about a demo offer, an error 400 bad request is thrown.
bp_finance
can only update subscriptions for End Customer companies for which the bp_finance's company is the BP company.
company_admin
can only update subscriptions for their own company (except if their company is linked to a BP IR company, in that case they are not allowed to update subscriptions of their company).
bp_admin
or bp_finance
can forbid administrators of his End Customer companies to:
adminHasRightToUpdateSubscriptions
),maxNumberUsers
of his subscriptions (company flag adminAllowedUpdateSubscriptionsOps
set to increase_only
),maxNumberUsers
of subscriptions to prepaid offers can be increase to any value.
maxNumberUsers
of subscriptions to prepaid offers can be decreased ONLY if a prepaid addon has been created during the month of the request (e.g. if a prepaid addon is created the 15th of september with 10 licenses, I'll be able to decrease the maxNumberUsers up to 10 licenses and until the 1st of october). This feature allows admin to cancel an addon to a prepaid subscription.
maxNumberUsers
of monthly subscriptions can be increase to any value.
maxNumberUsers
of monthly subscriptions can only be decreased to remove "free" licences, i.e. licences which are
not already assigned to users (updated maxNumberUsers must be greater or equal to numberAssignedUsers). To remove
additional licences, admin first have to un-assign licences to some users using API DELETE /api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}.
<message id="8413b42e-563c-4437-9a53-06f638b5ab69_0"
type="management"
from="pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532"
to="5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com"
xmlns="jabber:client">
<companysubscription xmlns="jabber:iq:configuration" subscriptionId="5808afeb4372eb19547e90cf"
companyId="58bd63d5dc5ef5eb3fe154c0" action="update">
<offerId>58072f646237427a3687dc90</offerId>
<offerName>Enterprise</offerName>
<profileId>57cd90ddc04fd92e232ae258</profileId>
<profileName>Enterprise</profileName>
<status>active</status>
<syncOngoing>true</syncOngoing>
<maxNumberUsers>50</maxNumberUsers>
</companysubscription>
</message>
syncOngoing
flag indicates that the update is being synchronizing with Business Store and Zuora.
It will not be possible to update again the subscription as long the synchronization is ongoing.
syncOngoing
equal to false.companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
subscriptionId required | string Company subscription unique identifier. |
additionalPurchaseOrderNumber | string Subscription additional purchase order number. |
applicationId | string Id of the CPaaS application to link to the subscription.
|
autoRenew | boolean autoRenew value to set (only applicable for subscription to prepaid offers) |
autoRenewOneTime | boolean autoRenewOneTime value to set. It indicates if subscription will be renewed only one time. If true, |
autoRenewToMonthly | boolean autoRenewToMonthly value to set. It indicates if the prepaid subscription will be renewed to a monthly at end of it . If true, the prepaid will be deleted when renewing subscription and a monthly will be created to replace it. (only applicable for subscription to prepaid offers) |
businessAdminComment | string A business admin comment (max 256 characters) |
expirationDate | string <date> Subscription expiration date. Can only be managed by |
maxNumberUsers | number Number of users (licences) bought for this offer.
|
monthlyDuration | number [ 3 .. 60 ] Number of month during which the monthly subscription will exist. Can be set at creation, and can be increased or decreased (only applicable for subscription to monthly offers). If set to null or 0, expirationDate and monthlyDuration will be set to null. |
prepaidDuration | number [ 12 .. 60 ] Subscription prepaid duration. Can only be increased compared to the offer prepaid duration (only applicable for subscription to prepaid offers). |
prepaidRenewalOption | string Enum: "billed" "allocated" "volume" Prepaid subscription renewal option. Renewal will be done either on |
purchaseOrderNumber | string Subscription purchase order number. Not settable by IR BP. |
renewalTerm | number [ 12 .. 60 ] Subscription renewal term. This is the duration that will be used when renewing a prepaid subscription (only applicable for subscription to prepaid offers). |
renewalTermOption | string Enum: "1_year" "initial" Prepaid subscription renewal term option: renewal duration will be 1 year or equal to prepaidDuration if |
renewalVolume | number Number of licenses to use when renewing subscription with |
{- "additionalPurchaseOrderNumber": "string",
- "applicationId": "string",
- "autoRenew": true,
- "autoRenewOneTime": true,
- "autoRenewToMonthly": true,
- "businessAdminComment": "string",
- "expirationDate": "2019-08-24",
- "maxNumberUsers": 0,
- "monthlyDuration": 3,
- "prepaidDuration": 12,
- "prepaidRenewalOption": "billed",
- "purchaseOrderNumber": "string",
- "renewalTerm": 12,
- "renewalTermOption": "1_year",
- "renewalVolume": 0
}
{- "data": {
- "id": "5808afeb4372eb19547e90cf",
- "offerId": "58072f646237427a3687dc90",
- "offerName": "Enterprise",
- "offerDescription": "Rainbow Enterprise offer",
- "offerTechnicalDescription": "Enterprise offer for BP VAD",
- "sapReference": "3EY95003AA",
- "offerReference": "RB-Enterprise",
- "profileId": "57cd90ddc04fd92e232ae258",
- "profileName": "Enterprise",
- "isDefault": false,
- "businessModel": "nb_users",
- "isExclusive": true,
- "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
- "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
- "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
- "creationDate": "2017-03-28T12:37:37.959Z",
- "createdBy": {
- "userId": "5891dd587be005b39a4ee7bf",
- "loginEmail": "bp_finance@bp-company.com",
- "bpApplicantNumber": "The applicant number of the BP"
}, - "status": "active",
- "syncOngoing": true,
- "bsSubscriptionId": "RB-201705005659",
- "zuoraSubscriptionId": "2c92c0fb5ca5c5bc015ca6feafbc7995",
- "maxNumberUsers": 50,
- "updatingMaxNumberUsers": 100,
- "numberAssignedUsers": 50,
- "bpBusinessType": "default",
- "purchaseOrderNumber": "my po",
- "businessAdminComment": "A business admin comment"
}
}
This API can be used to get features available to the company through its subscriptions.
Subscriptions bring to the company features (through a profile depending of the subscribed offer). Each subscription has his own list of features with their own value.
Company can have several subscriptions (if the company has subscribed to commercial offers). By default, company has at least a subscription to the default offer (i.e. Essential).
This API allows to aggregate all features from all company's subscriptions, listing therefore all available features for this company.
superadmin
and support
can get company features of all companies existing in Rainbow.
bp_admin
can only get company features of End Customer companies for which their bp_admin's company is the BP company.
bp_finance
can only get company features of End Customer companies for which their bp_finance's company is the BP company.
organization_admin
can only get company features of companies under their organisation.
company_admin
can get company features only for their company.
user
can get company features only for their company.
Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/features
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
accept required | string application/json |
{- "data": [
- {
- "featureId": "580773787853994e42d90f0b",
- "featureUniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
- "featureName": "Company admin",
- "featureType": "number",
- "limitMax": 10,
- "addedDate": "2017-02-16T11:22:54.270Z",
- "lastUpdateDate": "2017-02-16T11:22:54.270Z"
}, - {
- "featureId": "580e02660f3cce8315072656",
- "featureUniqueRef": "MASSPRO_USER_PROVISIONING_CSV",
- "featureName": "Mass user provisioning using CSV file",
- "featureType": "boolean",
- "isEnabled": true,
- "addedDate": "2017-02-16T11:23:29.296Z",
- "lastUpdateDate": "2017-02-16T11:23:29.296Z"
}
]
}
This API can be used to list counters regarding all offers subscribed by a BP company and its customers / resellers.
This API can only be used for BP companies (whatever the bpType).
For each subscribed offer, this API returns:
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
accept required | string application/json |
{- "data": [
- {
- "offerId": "58079ed2041fa586e92337cd",
- "offerName": "Essential",
- "offerReference": "RB-Essential",
- "sapReference": "3EY95100AA",
- "businessModel": null,
- "isDefault": true,
- "canBeSold": false,
- "isDemo": false,
- "isExclusive": false,
- "isPrepaid": null,
- "prepaidDuration": null,
- "isBundle": false,
- "hasConference": false,
- "hasVoice": false,
- "myCompanyNbLicences": 0,
- "myCompanyNumberAssignedUsers": 3,
- "myResellersNbLicences": 0,
- "myResellersNumberAssignedUsers": 6,
- "totalNbLicences": 0,
- "totalNumberAssignedUsers": 9
}, - {
- "offerId": "58ff3cdc5b9f3e48ad4fb905",
- "offerName": "Enterprise",
- "offerReference": "RB-Enterprise",
- "sapReference": "3EY95102AA",
- "businessModel": "nb_users",
- "isDefault": false,
- "canBeSold": true,
- "isDemo": false,
- "isExclusive": true,
- "isPrepaid": false,
- "prepaidDuration": null,
- "monthlyDuration": null,
- "isBundle": false,
- "hasConference": false,
- "hasVoice": false,
- "groupName": "Enterprise",
- "myCompanyNbLicences": 10,
- "myResellersNbLicences": 82,
- "totalNbLicences": 92,
- "totalNumberAssignedUsers": 0
}, - {
- "offerId": "58da6f083b66b9584c1d1ee0",
- "offerName": "Business",
- "offerReference": "RB-Business",
- "sapReference": "3EY95002AA",
- "businessModel": "nb_users",
- "isDefault": false,
- "canBeSold": true,
- "isDemo": false,
- "isExclusive": true,
- "isPrepaid": null,
- "prepaidDuration": null,
- "isBundle": false,
- "hasConference": false,
- "hasVoice": false,
- "groupName": "Business",
- "myCompanyNbLicences": 20,
- "myResellersNbLicences": 86,
- "totalNbLicences": 106,
- "totalNumberAssignedUsers": 9
}, - {
- "offerId": "599eb9fa7b8e74830998617e",
- "offerName": "Enterprise Demo",
- "offerReference": "RB-Enterprise",
- "sapReference": "3EY95003AA",
- "businessModel": "nb_users",
- "isDefault": false,
- "canBeSold": false,
- "isDemo": true,
- "isExclusive": true,
- "isPrepaid": false,
- "prepaidDuration": null,
- "isBundle": false,
- "hasConference": false,
- "hasVoice": false,
- "groupName": "Enterprise",
- "myCompanyNbLicences": 25,
- "myCompanyNumberAssignedUsers": 1,
- "myResellersNbLicences": 10,
- "totalNbLicences": 35,
- "totalNumberAssignedUsers": 1
}, - {
- "offerId": "58ff3cdc5b9f3e48ad4fb906",
- "offerName": "Conference",
- "offerReference": "RB-Conference",
- "sapReference": "3EY95004AA",
- "businessModel": "usage",
- "isDefault": false,
- "canBeSold": true,
- "isDemo": false,
- "isExclusive": false,
- "isPrepaid": false,
- "isBundle": false,
- "hasConference": true,
- "hasVoice": false,
- "myCompanyNumberAssignedUsers": 1,
- "myResellersNumberAssignedUsers": 3,
- "totalNbLicences": 0,
- "totalNumberAssignedUsers": 4
}, - {
- "offerId": "59b7f58c3c43dba62752b489",
- "offerName": "Early adopter",
- "offerReference": "RB-Beta",
- "sapReference": "3EY95001AA",
- "businessModel": "nb_users",
- "isDefault": false,
- "canBeSold": false,
- "isDemo": false,
- "isExclusive": false,
- "isPrepaid": false,
- "isBundle": false,
- "hasConference": false,
- "hasVoice": false,
- "myCompanyNbLicences": 10,
- "myCompanyNumberAssignedUsers": 1,
- "totalNbLicences": 10,
- "totalNumberAssignedUsers": 1
}
]
}
This API can be used to get default subscription of a company (i.e. subscription to default Rainbow offer).
superadmin
, business_admin
and support
can get default subscription of all companies existing in Rainbow.
bp_admin
can only get default subscription of End Customer companies for which their bp_admin's company is the BP company.
bp_finance
can only get default subscription of End Customer companies for which their bp_finance's company is the BP company.
organization_admin
can only get default subscription of companies under their organisation.
company_admin
can get default subscription only for their company.
Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/default
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
accept required | string application/json |
{- "data": {
- "id": "5808b655a55a36d354f75cbe",
- "offerId": "58079ed2041fa586e92337cd",
- "offerName": "Essential",
- "sapReference": "3EY95001AA",
- "offerReference": "RB-Essential",
- "profileId": "580777f56fbd22a442d4fb57",
- "profileName": "Essential",
- "isDefault": true,
- "isExclusive": false,
- "creationDate": "2016-10-18T15:15:38.351Z",
- "status": "active",
- "numberAssignedUsers": 32
}
}
This API can be used to list prepaid subscriptions ending soon
superadmin
and support
can list prepaid subscriptions of any company(ies) existing in Rainbow.
bp_finance
can only list prepaid subscriptions of End Customer companies linked to their BP company.
company_admin
can only list prepaid subscriptions of his own End Customer company.
Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/prepaid
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
days | number If provided, API will return prepaid subscriptions expiring in the next given days. If not provided, default value is 45 days |
accept required | string application/json |
{- "data": [
- {
- "companyId": "5bf2b670e93dafdf3dd4c462",
- "companyName": "BP_Bundle_Company",
- "offerReference": "RB-Enterprise-Conf-1Y",
- "offerName": "Enterprise Conference",
- "autoRenew": true,
- "expirationDate": "2019-12-01T00:00:00.000Z"
}, - {
- "companyId": "5bf2b729e93dafdf3dd4c468",
- "companyName": "EC_Bundle_Company",
- "offerReference": "RB-Enterprise-Conf-1Y",
- "offerName": "Enterprise Conference",
- "autoRenew": true,
- "expirationDate": "2019-12-01T00:00:00.000Z"
}
]
}
This API can be used to list users having a given subscription in their profile
superadmin
and support
can get users attached to any company subscriptions existing in Rainbow.
bp_admin
can only retrieve users attached to subscriptions of End Customer companies linked to their BP company.
bp_finance
can only retrieve users attached to subscriptions of End Customer companies linked to their BP company.
organization_admin
can only retrieve users attached to subscriptions of companies under their organisation.
company_admin
can only retrieve users attached to subscriptions of their company.
Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/5808afeb4372eb19547e90cf/users
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) |
subscriptionId required | string Company subscription unique identifier. |
limit | number Default: 100 Allow to specify the number of users to retrieve. |
offset | number Allow to specify the position of first user to retrieve (first user if not specified). Warning: if offset > total, no results are returned. |
sortField | string Default: "displayName" Sort user list based on the given field. |
sortOrder | number Default: 1 Enum: -1 1 Specify order when sorting user list. |
format | string Default: "small" Enum: "small" "medium" "full" Allows to retrieve more or less user details in response.
|
accept required | string application/json |
{- "data": [
- {
- "id": "56c5c19f94141765119f896c",
- "loginEmail": "user1@company.com",
- "firstName": "Firstname",
- "lastName": "Lastname",
- "displayName": "Firstname Lastname",
- "companyId": "569ce8c8f9336c471b98eda1",
- "companyName": "My company",
- "isTerminated": false
}, - {
- "id": "56c5cb38e8078d7512c43985",
- "loginEmail": "user2@company.com",
- "firstName": "Firstname",
- "lastName": "Lastname",
- "displayName": "Firstname Lastname",
- "companyId": "569ce8c8f9336c471b98eda1",
- "companyName": "My company",
- "isTerminated": false
}
], - "total": 2,
- "limit": 100,
- "offset": 0
}
This API can be used to upload pre paid offers from ACTIS file, to set in the given company subscriptions.
Rules:
The API only returns status code > 200 if the requested companyId (from URL) is not a BP company or if the
provided file couldn't be parsed (wrong format, XML without the expected structure).
Otherwise, the API returns with a status code 200 and the following data are returned:
Please note that creation steps will NOT BE EXECUTED if parameter 'preview=true' is set.
This mode is used to check the validity of a given ACTIS file, and to show all the actions that should be performed
in standard mode ('preview' not set or set to false).
companyId required | string Company unique identifier (like 569ce8c8f9336c471b98eda1) of the BP company uploading the ACTIS file (must be a BP VAD or BP DR company) |
{- "data": [ ],
- "report": {
- "parsedData": {
- "purchaseOrderId": "CMCMCM00C01B",
- "offers": [
- {
- "sapReference": "3EY95101AB",
- "maxNumberUsers": "5",
- "offerId": "59e8e083ca44fd228b850f39",
- "offerName": "Business 1Year",
- "offerReference": "RB-Business-1Y"
}
], - "errors": [
- {
- "errorCode": 404,
- "errorMsg": "Resource Not Found",
- "errorDetails": "Offer with sapReference=3EY95002AB not found",
- "errorDetailsCode": 404301
}, - {
- "errorCode": 404,
- "errorMsg": "Resource Not Found",
- "errorDetails": "Offer with sapReference=3EY95102AB not found",
- "errorDetailsCode": 404301
}
], - "ec": {
- "name": "An existing EC (EC Under BP IR1 under BP VAD1)",
- "admin_email": "admin@junk-mail.com"
}, - "ir": {
- "name": "An existing BP IR1 under BP VAD1",
- "admin_email": "bpadmin@ir1-vad1.fr"
}
}, - "IRCompany": {
- "name": "An existing BP IR1 under BP VAD1",
- "id": "59bbbed63c43dba62752b492",
- "companyHasBeenCreated": false
}, - "ECCompany": {
- "name": "An existing EC (EC Under BP IR1 under BP VAD1)",
- "id": "59bbc1af3c43dba62752b496",
- "companyHasBeenCreated": false,
- "errors": [
- {
- "errorCode": 403,
- "errorMsg": "Forbidden",
- "errorDetails": "email admin@junk-mail.com is black-listed, not able to send join company invitation",
- "errorDetailsCode": 403500
}
]
}
}, - "warnings": [
- {
- "errorCode": 404,
- "errorMsg": "Resource Not Found",
- "errorDetails": "Offer with sapReference=3EY95002AB not found",
- "errorDetailsCode": 404301
}, - {
- "errorCode": 404,
- "errorMsg": "Resource Not Found",
- "errorDetails": "Offer with sapReference=3EY95102AB not found",
- "errorDetailsCode": 404301
}, - {
- "errorCode": 403,
- "errorMsg": "Forbidden",
- "errorDetails": "email admin@junk-mail.com is black-listed, not able to send join company invitation",
- "errorDetailsCode": 403500
}
], - "errors": [
- {
- "errorCode": 409,
- "errorMsg": "Conflict",
- "errorDetails": "Company 59bbc1af3c43dba62752b496 has already subscribed to offer 59e8e083ca44fd228b850f39",
- "errorDetailsCode": 409620
}
], - "status": "ACTIS file uploaded, but some errors occurred."
}