{
    "info": {
        "name": "Rainbow subscription portal (1.170.0)",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
        "description": "#Rainbow Subscription Portal\n\nIn order to run the requests from the collection \"**Rainbow subscription portal**\", the following variables has to be set in Postman:\n   - `PortalServersUrl`: URL of the API portal, shall be set in environment variable (ex: openrainbow.net, demo.openrainbow.com, ...).\n     If not set, default URL used is https://openrainbow.com\n     \nVariables for authentication (only needed for Authentication portal collection)\n   - `userLogin`: login of the user, can be set in global variable if user login\n     is the same in all environments, or in environment variable (ex: user@company.com)\n   - `userPwd`: password of the user, can be set in global variable if user password\n     is the same in all environments, or in environment variable (ex: Password_123)\n   - `appId`: appId of the application, shall be set in environment variable as\n     appId is probably different between environments (ex: 304596006e3c11e88205e19d39f12481)\n   - `appSecret`: appSecret of the application, shall be set in environment variable as\n     appSecret is different between environments (ex: jAalnHOEiHEVIcuxVrYwXznrv5MLPLadHj7Fmy7x0DHm21Y1MS1uB5kEWOdAtuVn)\n "
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{token_user}}",
                "type": "string"
            }
        ]
    },
    "event": [
        {
            "listen": "prerequest",
            "script": {
                "type": "text/javascript",
                "exec": [
                    "// If SubscriptionPortalServer environment variable is not set, use PortalServersUrl variable from environment or global variables (if PortalServersUrl is not set fallback on https://openrainbow.com)",
                    "let rainbowServersUrl = pm.variables.get(\"PortalServersUrl\");",
                    "if (!pm.variables.get(\"SubscriptionPortalServer\")) {",
                    "    if (rainbowServersUrl) {",
                    "        // Prefix PortalServersUrl by https:// if not set in variable",
                    "        if (!rainbowServersUrl.startsWith(\"https://\") && !rainbowServersUrl.startsWith(\"http://\")) {",
                    "            rainbowServersUrl = `https://${rainbowServersUrl}`;",
                    "        }",
                    "        console.log(`SubscriptionPortalServer environment variable is not set, set it to PortalServersUrl's value (${rainbowServersUrl})`);",
                    "        pm.environment.set(\"SubscriptionPortalServer\", rainbowServersUrl);",
                    "    } else {",
                    "        // Use production environment if none of SubscriptionPortalServer or PortalServersUrl is set",
                    "        pm.environment.set(\"SubscriptionPortalServer\", \"https://openrainbow.com\");",
                    "    }",
                    "}"
                ]
            }
        },
        {
            "listen": "test",
            "script": {
                "type": "text/javascript",
                "exec": [
                    "pm.test(\"Is success response?\", function () {",
                    "    switch (pm.request.method) {",
                    "        case \"GET\":",
                    "        case \"PUT\":",
                    "        case \"DELETE\":",
                    "            pm.response.to.have.status(200);",
                    "            break;",
                    "        case \"POST\":",
                    "            pm.expect(pm.response.code).to.be.oneOf([200,201]);",
                    "            break;",
                    "        default:",
                    "            console.warn(`Response status code is not checked for method ${pm.request.method}`);",
                    "    }",
                    "});"
                ]
            }
        }
    ],
    "item": [
        {
            "name": "invoices",
            "description": "invoices",
            "item": [
                {
                    "name": "Get company invoices",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/invoices",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "invoices"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ],
                            "query": [
                                {
                                    "key": "format",
                                    "value": "small",
                                    "description": "Allows to retrieve more or less invoice details in response. <br/>- <codsmall</cod: id, invoiceDate, invoiceNumber, dueDate, amount, balance, status, invoiceFiles <br/>- <codmedium</cod: id, invoiceDate, invoiceNumber, dueDate, amount, balance, status, invoiceFiles, accountName, invoiceItems.id, invoiceItems.subscriptionName, invoiceItems.serviceStartDate, invoiceItems.serviceEndDate, invoiceItems.chargeAmount, invoiceItems.chargeName, invoiceItems.quantity <br/>- <codfull</cod: all fields",
                                    "disabled": true
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `bp_finance`, `admin`\n\n<p>This API retrieves the list of invoices available on Zuora for the requested company. <br/> <br/> <code>superadmin</code> can list invoices being available to any company existing in Rainbow. <br/> <code>bp_finance</code> can only list invoices available to their BP company. <br/> Users being both <code>bp_finance</code> and <code>organization_admin</code> can list invoices available for all the companies being in their organization. <br/> <br/> Currently only BP <code>DR</code> and BP <code>VAD</code> companies have invoices in Zuora. An error is returned when trying to list invoices for companies which are not BP DR or BP VAD. <br/> <br/> Invoices are returned in reverse chronological order by updatedDate. <br/> <br/> For more details about the response, see <a href='https://knowledgecenter.zuora.com/DC_Developers/REST_API/B_REST_API_reference/Transactions/GET_invoices#Response_Parameters'>Zuora documentation</a>.</p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/invoices",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "invoices"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ],
                                    "query": [
                                        {
                                            "key": "format",
                                            "value": "small",
                                            "description": "Allows to retrieve more or less invoice details in response. <br/>- <codsmall</cod: id, invoiceDate, invoiceNumber, dueDate, amount, balance, status, invoiceFiles <br/>- <codmedium</cod: id, invoiceDate, invoiceNumber, dueDate, amount, balance, status, invoiceFiles, accountName, invoiceItems.id, invoiceItems.subscriptionName, invoiceItems.serviceStartDate, invoiceItems.serviceEndDate, invoiceItems.chargeAmount, invoiceItems.chargeName, invoiceItems.quantity <br/>- <codfull</cod: all fields",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `bp_finance`, `admin`\n\n<p>This API retrieves the list of invoices available on Zuora for the requested company. <br/> <br/> <code>superadmin</code> can list invoices being available to any company existing in Rainbow. <br/> <code>bp_finance</code> can only list invoices available to their BP company. <br/> Users being both <code>bp_finance</code> and <code>organization_admin</code> can list invoices available for all the companies being in their organization. <br/> <br/> Currently only BP <code>DR</code> and BP <code>VAD</code> companies have invoices in Zuora. An error is returned when trying to list invoices for companies which are not BP DR or BP VAD. <br/> <br/> Invoices are returned in reverse chronological order by updatedDate. <br/> <br/> For more details about the response, see <a href='https://knowledgecenter.zuora.com/DC_Developers/REST_API/B_REST_API_reference/Transactions/GET_invoices#Response_Parameters'>Zuora documentation</a>.</p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": [\n    {\n      \"id\": \"2c92c0fa5b4237df015b6bc6ed483919\",\n      \"accountId\": \"2c92c0f95a6b2281015a6fd742211675\",\n      \"accountNumber\": \"HAGSH87176\",\n      \"accountName\": \"BP NOD\",\n      \"invoiceDate\": \"2017-04-14\",\n      \"invoiceNumber\": \"INV00000376\",\n      \"dueDate\": \"2017-06-13\",\n      \"invoiceTargetDate\": \"2017-04-14\",\n      \"amount\": 361.65,\n      \"balance\": 0,\n      \"creditBalanceAdjustmentAmount\": 0,\n      \"createdBy\": \"2c92c0f85721ff7c015742a336a67d7b\",\n      \"status\": \"Posted\",\n      \"body\": \"/v1/files/2c92c08a5b4237b2015b6bc6f2a732b6\",\n      \"invoiceItems\": [\n        {\n          \"id\": \"2c92c0fa5b4237df015b6bc6ed51391b\",\n          \"subscriptionName\": \"RB-201703001822\",\n          \"subscriptionId\": \"2c92c0fa5b1473e8015b16e3fdcb1397\",\n          \"serviceStartDate\": \"2017-04-01\",\n          \"serviceEndDate\": \"2017-04-09\",\n          \"chargeAmount\": 1.63,\n          \"chargeDescription\": \"\",\n          \"chargeName\": \"Price per user Enterprise\",\n          \"chargeId\": \"2c92c0fa5b1473e8015b16e3fdb91396\",\n          \"productName\": \"Rainbow Enterprise - Reseller - old\",\n          \"quantity\": 2,\n          \"taxAmount\": 0,\n          \"unitOfMeasure\": \"Each\",\n          \"chargeDate\": \"2017-04-14 11:24:10\",\n          \"chargeType\": \"Recurring\",\n          \"processingType\": \"Charge\"\n        },\n        {\n          \"id\": \"2c92c0fa5b4237df015b6bc6ed51391c\",\n          \"subscriptionName\": \"RB-201703001804\",\n          \"subscriptionId\": \"2c92c0fb5af4870e015afc1769b5102f\",\n          \"serviceStartDate\": \"2017-04-01\",\n          \"serviceEndDate\": \"2017-04-30\",\n          \"chargeAmount\": 12,\n          \"chargeDescription\": \"\",\n          \"chargeName\": \"Price per user Enterprise\",\n          \"chargeId\": \"2c92c0fb5af4870e015afc1769a7102e\",\n          \"productName\": \"Rainbow Business Reseller V2 - old\",\n          \"quantity\": 10,\n          \"taxAmount\": 2.4,\n          \"unitOfMeasure\": \"User\",\n          \"chargeDate\": \"2017-04-14 11:24:10\",\n          \"chargeType\": \"Recurring\",\n          \"processingType\": \"Charge\"\n        }\n      ],\n      \"invoiceFiles\": [\n        {\n          \"id\": \"2c92c08a5b4237b2015b6bc6f2a732b6\",\n          \"versionNumber\": 1492161851199\n        },\n        {\n          \"id\": \"2c92c08c5b423798015b6bc6f203350b\",\n          \"versionNumber\": 1492161851175\n        }\n      ]\n    },\n    {\n      \"id\": \"2c92c0955ab279cd015ab8f3a7342f1f\",\n      \"accountId\": \"2c92c0f95a6b2281015a6fd742211675\",\n      \"accountNumber\": \"HAGSH87176\",\n      \"accountName\": \"BP NOD\",\n      \"invoiceDate\": \"2017-03-10\",\n      \"invoiceNumber\": \"INV00000355\",\n      \"dueDate\": \"2017-05-09\",\n      \"invoiceTargetDate\": \"2017-03-10\",\n      \"amount\": 1.8,\n      \"balance\": 0,\n      \"creditBalanceAdjustmentAmount\": 0,\n      \"createdBy\": \"2c92c0f858eca4720158f3af945443d0\",\n      \"status\": \"Posted\",\n      \"body\": \"/v1/files/2c92c08d5b42423c015b6bc6efb524ca\",\n      \"invoiceItems\": [\n        {\n          \"id\": \"2c92c0955ab279cd015ab8f3a7382f21\",\n          \"subscriptionName\": \"RB-201702013280\",\n          \"subscriptionId\": \"2c92c0fa5a6b1360015a705c69a519ad\",\n          \"serviceStartDate\": \"2017-03-01\",\n          \"serviceEndDate\": \"2017-03-09\",\n          \"chargeAmount\": 1.8,\n          \"chargeDescription\": \"\",\n          \"chargeName\": \"Price per user Enterprise\",\n          \"chargeId\": \"2c92c0fa5a6b1360015a705c699219ac\",\n          \"productName\": \"Rainbow Enterprise - Reseller - old\",\n          \"quantity\": 2,\n          \"taxAmount\": 0,\n          \"unitOfMeasure\": \"Each\",\n          \"chargeDate\": \"2017-03-10 17:01:00\",\n          \"chargeType\": \"Recurring\",\n          \"processingType\": \"Charge\"\n        }\n      ],\n      \"invoiceFiles\": [\n        {\n          \"id\": \"2c92c08d5b42423c015b6bc6efb524ca\",\n          \"versionNumber\": 1492161851155\n        },\n        {\n          \"id\": \"2c92c08d5ab28263015ab8f3a81d5323\",\n          \"versionNumber\": 1489161660291\n        }\n      ]\n    }\n  ],\n  \"total\": 2\n}"
                        }
                    ]
                },
                {
                    "name": "Get an invoice file",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/invoices/files/:fileId",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "invoices",
                                "files",
                                ":fileId"
                            ],
                            "variable": [
                                {
                                    "key": "fileId",
                                    "description": "id of the invoice file to download."
                                },
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `bp_finance`, `admin`\n\n<p>This API retrieves an invoice file available on Zuora. The file is in PDF format. <br/> <br/> <code>superadmin</code> can get invoice files belonging to any company existing in Rainbow. <br/> <code>bp_finance</code> can only get invoice files for their BP company. <br/> Users being both <code>bp_finance</code> and <code>organization_admin</code> can get invoice files for all the companies being in their organization. <br/> <br/> fileId to provide comes from the response of API <a href=\"#api-invoices-subscription_GetInvoices\">GET /api/rainbow/subscription/v1.0/companies/:companyId/invoices</a> (field invoicesFiles.id).</p>"
                    }
                }
            ]
        },
        {
            "name": "offers",
            "description": "offers",
            "item": [
                {
                    "name": "Get an offer",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/offers/:offerId",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "offers",
                                ":offerId"
                            ],
                            "variable": [
                                {
                                    "key": "offerId",
                                    "description": "Offer unique identifier."
                                },
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `admin`\n\n<p>Get an offer from its id <br/> <br/> The requested offer must be in the requested company's assigned catalog, otherwise an error 403 is returned.</p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/offers/:offerId",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "offers",
                                        ":offerId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "offerId",
                                            "description": "Offer unique identifier."
                                        },
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `admin`\n\n<p>Get an offer from its id <br/> <br/> The requested offer must be in the requested company's assigned catalog, otherwise an error 403 is returned.</p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n    \"data\": {\n         \"id\": \"58072f646237427a3687dc90\",\n         \"name\": \"Professional\",\n         \"description\": \"Professional offer\",\n         \"profileId\": \"57cd90ddc04fd92e232ae258\",\n         \"isDefault\": false,\n         \"canBeSold\": true,\n         \"businessModel\": \"nb_users\",\n         \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n         \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n         \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n         \"creationDate\": \"2016-10-19T14:12:13.352\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get offers",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/offers",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "offers"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ],
                            "query": [
                                {
                                    "key": "format",
                                    "value": "small",
                                    "description": "Allows to retrieve more or less offer details in response. <br/> - <codsmall</cod: id name <br/> - <codmedium</cod: id name description <br/> - <codfull</cod: all offer fields",
                                    "disabled": true
                                },
                                {
                                    "key": "name",
                                    "description": "Allows to filter offer list on field name.",
                                    "disabled": true
                                },
                                {
                                    "key": "canBeSold",
                                    "description": "Allows to filter offer list on field canBeSold.",
                                    "disabled": true
                                },
                                {
                                    "key": "autoSubscribe",
                                    "description": "Allows to filter offer list on field autoSubscribe.",
                                    "disabled": true
                                },
                                {
                                    "key": "isExclusive",
                                    "description": "Allows to filter offer list on field isExclusive.",
                                    "disabled": true
                                },
                                {
                                    "key": "isPrepaid",
                                    "description": "Allows to filter offer list on field isPrepaid.",
                                    "disabled": true
                                },
                                {
                                    "key": "profileId",
                                    "description": "Allows to filter offer list on field profileId.",
                                    "disabled": true
                                },
                                {
                                    "key": "offerReference",
                                    "description": "Allows to filter offer list on field offerReference.",
                                    "disabled": true
                                },
                                {
                                    "key": "sapReference",
                                    "description": "Allows to filter offer list on field sapReference.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "100",
                                    "description": "Allow to specify the number of offers to retrieve.",
                                    "disabled": true
                                },
                                {
                                    "key": "offset",
                                    "value": "0",
                                    "description": "Allow to specify the position of first offer to retrieve (first offer if not specified). Warning: if offset &gt; total, no results are returned.",
                                    "disabled": true
                                },
                                {
                                    "key": "sortField",
                                    "value": "name",
                                    "description": "Sort offer list based on the given field.",
                                    "disabled": true
                                },
                                {
                                    "key": "sortOrder",
                                    "value": "1",
                                    "description": "Specify order when sorting offer list.",
                                    "disabled": true
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `admin`, `user`\n\n<p>This API retrieves the list of offers available to the requested company. <br/> The available offers for a company corresponds to the offers being in the catalog assigned to this company. <br/> <br/> <code>superadmin</code> and <code>support</code> can list offers being available to any company existing in Rainbow. <br/> <code>business_admin</code> can list only demo offers being available to any company existing in Rainbow. <br/> <code>bp_admin</code> 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. <br/> <code>bp_finance</code> 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. <br/> <code>organization_admin</code> can only list offers available for all the companies being in their organisation. <br/> <code>company_admin</code> can only list offers available to their own company. <br/> Users being both <code>bp_admin</code> or <code>bp_finance</code> and <code>organization_admin</code> 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. <br/> <br/> Offers which can be sold are flagged with boolean <code>canBeSold</code> set to true. <br/> Other offers (with canBeSold set to false) can't be subscribed using API <a href=\"#api-subscriptions-subscription_CreateCompanySubscriptions\">POST /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions</a>. 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).</p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response (format=full):",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/offers",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "offers"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ],
                                    "query": [
                                        {
                                            "key": "format",
                                            "value": "small",
                                            "description": "Allows to retrieve more or less offer details in response. <br/> - <codsmall</cod: id name <br/> - <codmedium</cod: id name description <br/> - <codfull</cod: all offer fields",
                                            "disabled": true
                                        },
                                        {
                                            "key": "name",
                                            "description": "Allows to filter offer list on field name.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "canBeSold",
                                            "description": "Allows to filter offer list on field canBeSold.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "autoSubscribe",
                                            "description": "Allows to filter offer list on field autoSubscribe.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "isExclusive",
                                            "description": "Allows to filter offer list on field isExclusive.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "isPrepaid",
                                            "description": "Allows to filter offer list on field isPrepaid.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "profileId",
                                            "description": "Allows to filter offer list on field profileId.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "offerReference",
                                            "description": "Allows to filter offer list on field offerReference.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "sapReference",
                                            "description": "Allows to filter offer list on field sapReference.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "limit",
                                            "value": "100",
                                            "description": "Allow to specify the number of offers to retrieve.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "offset",
                                            "value": "0",
                                            "description": "Allow to specify the position of first offer to retrieve (first offer if not specified). Warning: if offset &gt; total, no results are returned.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "sortField",
                                            "value": "name",
                                            "description": "Sort offer list based on the given field.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "sortOrder",
                                            "value": "1",
                                            "description": "Specify order when sorting offer list.",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `admin`, `user`\n\n<p>This API retrieves the list of offers available to the requested company. <br/> The available offers for a company corresponds to the offers being in the catalog assigned to this company. <br/> <br/> <code>superadmin</code> and <code>support</code> can list offers being available to any company existing in Rainbow. <br/> <code>business_admin</code> can list only demo offers being available to any company existing in Rainbow. <br/> <code>bp_admin</code> 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. <br/> <code>bp_finance</code> 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. <br/> <code>organization_admin</code> can only list offers available for all the companies being in their organisation. <br/> <code>company_admin</code> can only list offers available to their own company. <br/> Users being both <code>bp_admin</code> or <code>bp_finance</code> and <code>organization_admin</code> 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. <br/> <br/> Offers which can be sold are flagged with boolean <code>canBeSold</code> set to true. <br/> Other offers (with canBeSold set to false) can't be subscribed using API <a href=\"#api-subscriptions-subscription_CreateCompanySubscriptions\">POST /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions</a>. 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).</p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n    \"data\": [\n      {\n         \"id\": \"58050dc17c37990d161f6cb3\",\n         \"name\": \"Essential\",\n         \"description\": \"Essential offer\",\n         \"isDefault\": true,\n         \"creationDate\": \"2016-10-19T12:54:30.523\",\n         \"profileId\": \"57cd4346d8793a0d124aa21e\",\n         \"sapReference\": \"3EY95001AA\",\n         \"offerReference\": \"RB-Essential\",\n         \"isExclusive\": false\n      },\n      {\n         \"id\": \"58072f646237427a3687dc90\",\n         \"name\": \"Enterprise\",\n         \"description\": \"Rainbow Enterprise offer\",\n         \"technicalDescription\": \"Enterprise offer for BP VAD\",\n         \"profileId\": \"57cd90ddc04fd92e232ae258\",\n         \"isDefault\": false,\n         \"canBeSold\": true,\n         \"businessModel\": \"nb_users\",\n         \"isExclusive\": true,\n         \"provisioningNeeded\": [\n             {\n                 \"providerType\": \"JANUS\",\n                 \"mediaType\": \"webrtc\"\n             }\n         ],\n         \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n         \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n         \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n         \"sapReference\": \"3EY95003AA\",\n         \"offerReference\": \"RB-Enterprise\",\n         \"creationDate\": \"2017-04-25T12:11:08.717Z\",\n         \"groupName\": \"Enterprise\"\n      },\n      {\n        \"id\": \"59e8e083ca44fd228b850f39\",\n        \"name\": \"Business 1Year\",\n        \"description\": \"Rainbow Enterprise offer\",\n        \"technicalDescription\": \"Rainbow Business 1 User 1 Year\",\n        \"isDefault\": false,\n        \"creationDate\": \"2017-10-19T14:12:13.352\",\n        \"profileId\": \"58da6ef53b66b9584c1d1edf\",\n        \"canBeSold\": true,\n        \"businessModel\": \"nb_users\",\n        \"isExclusive\": true,\n        \"isPrepaid\" : true,\n        \"prepaidDuration\" : 12,\n        \"provisioningNeeded\": [\n            {\n                \"providerType\": \"JANUS\",\n                \"mediaType\": \"webrtc\"\n            }\n        ],\n        \"zuoraOfferId\": \"2c92c0f95b1abf84015b3acdf1ae0c32\",\n        \"zuoraProductRatePlanId\": \"2c92c0f95b1abf84015b3acdf1c50c34\",\n        \"zuoraProductRatePlanChargeId\": \"2c92c0f95b1abf84015b3acdf1dd0c36\",\n        \"sapReference\": \"3EY95101AB\",\n        \"offerReference\": \"RB-Business-1Y\",\n        \"groupName\": \"Business\"\n      },\n      {\n         \"id\": \"58ff3cdc5b9f3e48ad4fb906\",\n         \"name\": \"Conference\",\n         \"description\": \"Rainbow Conference offer\",\n         \"technicalDescription\": \"Conference offer for BP VAD\",\n         \"profileId\": \"58ff3cdb5b9f3e48ad4fb903\",\n         \"isDefault\": false,\n         \"canBeSold\": true,\n         \"businessModel\": \"usage\",\n         \"isExclusive\": false,\n         \"provisioningNeeded\": [\n             {\n                 \"providerType\": \"PGI\",\n                 \"pgiEnterpriseId\": \"testEnterpriseId\"\n             }\n         ],\n         \"zuoraOfferId\": \"2c92c0f95c14fb2c015c15bb8cb56926\",\n         \"zuoraProductRatePlanId\": \"2c92c0f95c14fb2c015c15bdaa8b79c1\",\n         \"zuoraProductRatePlanChargeId\": \"2c92c0f95c14fb2c015c15c00da07657\",\n         \"sapReference\": \"3EY95004AA\",\n         \"offerReference\": \"RB-Conference\",\n         \"creationDate\": \"2017-04-25T12:11:08.797Z\",\n         \"groupName\": \"Conference\"\n      }\n    ],\n    \"limit\": 100,\n    \"offset\": 0,\n    \"total\": 4\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "quotations",
            "description": "quotations",
            "item": [
                {
                    "name": "Create a quotation for a company and an offer",
                    "request": {
                        "method": "POST",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/quotations",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "quotations"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Id of the company for which the quotation is requested. <br/> <br/> The company must be a BP or be linked to a BP company having a valid <codbpApplicantNumber</cod."
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "\n{\n    \"offerId\": \"58072f646237427a3687dc90\",\n    \"maxNumberUsers\": 50\n}"
                        },
                        "description": "Required role(s): `bp_finance`, `organization_admin`\n\n<p>This API can be used to create a quotation for a given offer for a given company (creation of a subscription in preview mode). <br/> <br/> <code>superadmin</code> can create quotation for any company existing in Rainbow. <br/> <code>bp_finance</code> 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. <br/> Users being both <code>bp_finance</code> and <code>organization_admin</code> 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. <br/> Only <code>superadmin</code> and <code>bp_finance</code> can create quotation (for now at least), users with <code>admin</code> role alone are denied. <br/> <br/> Only offers with businessModel <code>nb_users</code> or <code>flat_fee</code> or <code>nb_services</code> can be quoted. <br/> <br/> The company for which the quotation is performed must be a BP company or be linked to a BP company. <br/> <br/> If the BP company have <code>resell</code> businessModel, his bpApplicantNumber must exist in Business Store (i.e. API <a href=\"#api-companies-subscription_CheckApplicantNumber\">GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber}</a> must return true). <br/> <br/> 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. <br/> Therefore, this API should be called before actually creating or updating the subscription for the offer for this EC / BP IR company. <br/> <br/> If the quotation is done for a company which does not have subscribed yet to the requested offer, <code>offerId</code> parameter have to be used. <br/> The list of offers which can be bought can be listed using API <a href=\"#api-offers-subscription_GetOffers\">GET /api/rainbow/subscription/v1.0/companies/:companyId/offers</a> (warning: the offers already bought are also listed). <br/> Actual subscription to the offer is done by calling API <a href=\"#api-subscriptions-subscription_CreateCompanySubscriptions\">POST /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions</a> <br/> The offer has to be in the catalog assigned to the company's BP, otherwise an error 403 is returned. <br/> <br/> If the quotation is done for a company which already have subscribed to the requested offer, <code>subscriptionId</code> parameter have to be used. <br/> Actual update of the company subscription is done by calling API <a href=\"#api-subscriptions-subscription_UpdateCompanySubscriptions\">PUT /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions/{subscriptionId}</a> <br/> <br/> For more information, see <a href=\"https://knowledgecenter.zuora.com/DC_Developers/C_REST_API/B_REST_API_reference/Subscriptions/01_Preview_subscription#Request_body\">Zuora documentation</a>.</p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "POST",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/quotations",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "quotations"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Id of the company for which the quotation is requested. <br/> <br/> The company must be a BP or be linked to a BP company having a valid <codbpApplicantNumber</cod."
                                        }
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "\n{\n    \"offerId\": \"58072f646237427a3687dc90\",\n    \"maxNumberUsers\": 50\n}"
                                },
                                "description": "Required role(s): `bp_finance`, `organization_admin`\n\n<p>This API can be used to create a quotation for a given offer for a given company (creation of a subscription in preview mode). <br/> <br/> <code>superadmin</code> can create quotation for any company existing in Rainbow. <br/> <code>bp_finance</code> 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. <br/> Users being both <code>bp_finance</code> and <code>organization_admin</code> 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. <br/> Only <code>superadmin</code> and <code>bp_finance</code> can create quotation (for now at least), users with <code>admin</code> role alone are denied. <br/> <br/> Only offers with businessModel <code>nb_users</code> or <code>flat_fee</code> or <code>nb_services</code> can be quoted. <br/> <br/> The company for which the quotation is performed must be a BP company or be linked to a BP company. <br/> <br/> If the BP company have <code>resell</code> businessModel, his bpApplicantNumber must exist in Business Store (i.e. API <a href=\"#api-companies-subscription_CheckApplicantNumber\">GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber}</a> must return true). <br/> <br/> 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. <br/> Therefore, this API should be called before actually creating or updating the subscription for the offer for this EC / BP IR company. <br/> <br/> If the quotation is done for a company which does not have subscribed yet to the requested offer, <code>offerId</code> parameter have to be used. <br/> The list of offers which can be bought can be listed using API <a href=\"#api-offers-subscription_GetOffers\">GET /api/rainbow/subscription/v1.0/companies/:companyId/offers</a> (warning: the offers already bought are also listed). <br/> Actual subscription to the offer is done by calling API <a href=\"#api-subscriptions-subscription_CreateCompanySubscriptions\">POST /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions</a> <br/> The offer has to be in the catalog assigned to the company's BP, otherwise an error 403 is returned. <br/> <br/> If the quotation is done for a company which already have subscribed to the requested offer, <code>subscriptionId</code> parameter have to be used. <br/> Actual update of the company subscription is done by calling API <a href=\"#api-subscriptions-subscription_UpdateCompanySubscriptions\">PUT /api/rainbow/subscription/v1.0/companies/{companyId}/subscriptions/{subscriptionId}</a> <br/> <br/> For more information, see <a href=\"https://knowledgecenter.zuora.com/DC_Developers/C_REST_API/B_REST_API_reference/Subscriptions/01_Preview_subscription#Request_body\">Zuora documentation</a>.</p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": {\n    \"currency\": \"EUR\",\n    \"contractedMrr\": 12,\n    \"totalContractedValue\": null,\n    \"totalDeltaMrr\": 2.8,  \n    \"totalDeltaTcv\": null,  \n    \"amount\": 0.92,\n    \"amountWithoutTax\": 0.77,\n    \"taxAmount\": 0.15,\n    \"invoiceTargetDate\": \"2017-03-30\",\n    \"invoiceItems\": [\n      {\n        \"serviceStartDate\": \"2017-03-30\",\n        \"serviceEndDate\": \"2017-03-31\",\n        \"chargeAmount\": 0.77,\n        \"chargeDescription\": \"\",\n        \"chargeName\": \"Price per user Enterprise\",\n        \"productName\": \"Rainbow Business Reseller V2\",\n        \"productRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n        \"quantity\": 10,\n        \"unitOfMeasure\": \"User\"\n      }\n    ],\n    \"chargeMetrics\": [  \n        {\n            \"productRatePlanId\": \"2c92c0f85b1ab29a015b3ad63fcf7325\",\n            \"productRatePlanChargeId\": \"2c92c0f85b1ab29a015b3ad63fe67327\",\n            \"originRatePlanId\": \"2c92c0fb5e7f8f35015e870a31907335\",\n            \"originalId\": \"2c92c0fb5e7f8f35015e870a31907336\",\n            \"number\": \"C-00003452\",\n            \"mrr\": 30.8,\n            \"dmrr\": 2.8,\n            \"tcv\": null,\n            \"dtcv\": null\n        }\n    ],\n    \"expirationDate\":\"2021-11-01T00:00:00.000Z\"\n  }\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "subscriptions_from_file",
            "description": "subscriptions_from_file",
            "item": [
                {
                    "name": "Create subscriptions by file",
                    "request": {
                        "method": "POST",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/files",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                "files"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1) of the BP company uploading the ACTIS file (must be a BP VAD or BP DR company)"
                                }
                            ],
                            "query": [
                                {
                                    "key": "expectedBpIrCompanyId",
                                    "description": "If specified, the API will check that the BP IR name (if any) being in the Actis file corresponds to the name of the company having the provided expectedBpIrCompanyId in Rainbow database. <br/> If expectedBpIrCompanyId is not provided, the API will try to find the company having the name being in Actis file (exact name match). If a company is found, it will check that its bpId is well the provided companyId (otherwise an error is raised). <br/> If no company match, the BP IR company is created with the name being in Actis file.",
                                    "disabled": true
                                },
                                {
                                    "key": "expectedEcCompanyId",
                                    "description": "If specified, the API will check that the EC name being in the Actis file corresponds to the name of the company having the provided expectedEcCompanyId in Rainbow database. <br/> If expectedEcCompanyId is not provided, the API will try to find the company having the name being in Actis file (exact name match). If a company is found, it will check that its bpId is well the provided companyId in case of BP DR, the IR companyId in case of a VAD (otherwise an error is raised). <br/> If no company match, the EC company is created with the name being in Actis file.",
                                    "disabled": true
                                },
                                {
                                    "key": "preview",
                                    "description": "If set to true (default false), will NOT create companies and users, but will generate a full report. *",
                                    "disabled": true
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "content-type",
                                "name": "content-type",
                                "value": "application/*",
                                "description": "application/*",
                                "type": "text",
                                "disabled": false
                            },
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `bp_finance`\n\n<p>This API can be used to upload pre paid offers from ACTIS file, to set in the given company subscriptions. <br/> Rules:</p> <ul>     <li> ACTIS file has to be sent directly in http body (no JSon). </li>     <li> Two format are supported: one plain XML file (extension .xpo2), and one zipped file (extension .SAP).</li>     <li> By default, ACTIS file size is limited to 4 MB.</li>     <li> If the company requesting the subscription(s) creation is a BP VAD, the requested offers must be prepaid offers.</li> </ul> <p>The API only returns status code &gt; 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). <br/> Otherwise, the API returns with a status code 200 and the following data are returned:</p> <ul>     <li> The created subscription(s) (if any) in field data, </li>     <li> A report regarding the import process in field report (file parsing, offers and companies used), </li>     <li> The potential non blocking errors which may have occurred during the import process in warning field, </li>     <li> The potential blocking errors which may have occurred during the import process in error field.</li> </ul> Node that if BP company is a DR, IRCOMPANY section of Actis file is not validated (as the data in this section will be the one of the DR company) <p><br/><b>Please note that creation steps will NOT BE EXECUTED if parameter 'preview=true' is set</b>.<br/> This mode is used to <i>check</i> 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).<br/></p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response (with some warnings):",
                            "originalRequest": {
                                "method": "POST",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/files",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        "files"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1) of the BP company uploading the ACTIS file (must be a BP VAD or BP DR company)"
                                        }
                                    ],
                                    "query": [
                                        {
                                            "key": "expectedBpIrCompanyId",
                                            "description": "If specified, the API will check that the BP IR name (if any) being in the Actis file corresponds to the name of the company having the provided expectedBpIrCompanyId in Rainbow database. <br/> If expectedBpIrCompanyId is not provided, the API will try to find the company having the name being in Actis file (exact name match). If a company is found, it will check that its bpId is well the provided companyId (otherwise an error is raised). <br/> If no company match, the BP IR company is created with the name being in Actis file.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "expectedEcCompanyId",
                                            "description": "If specified, the API will check that the EC name being in the Actis file corresponds to the name of the company having the provided expectedEcCompanyId in Rainbow database. <br/> If expectedEcCompanyId is not provided, the API will try to find the company having the name being in Actis file (exact name match). If a company is found, it will check that its bpId is well the provided companyId in case of BP DR, the IR companyId in case of a VAD (otherwise an error is raised). <br/> If no company match, the EC company is created with the name being in Actis file.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "preview",
                                            "description": "If set to true (default false), will NOT create companies and users, but will generate a full report. *",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "content-type",
                                        "name": "content-type",
                                        "value": "application/*",
                                        "description": "application/*",
                                        "type": "text",
                                        "disabled": false
                                    },
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `bp_finance`\n\n<p>This API can be used to upload pre paid offers from ACTIS file, to set in the given company subscriptions. <br/> Rules:</p> <ul>     <li> ACTIS file has to be sent directly in http body (no JSon). </li>     <li> Two format are supported: one plain XML file (extension .xpo2), and one zipped file (extension .SAP).</li>     <li> By default, ACTIS file size is limited to 4 MB.</li>     <li> If the company requesting the subscription(s) creation is a BP VAD, the requested offers must be prepaid offers.</li> </ul> <p>The API only returns status code &gt; 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). <br/> Otherwise, the API returns with a status code 200 and the following data are returned:</p> <ul>     <li> The created subscription(s) (if any) in field data, </li>     <li> A report regarding the import process in field report (file parsing, offers and companies used), </li>     <li> The potential non blocking errors which may have occurred during the import process in warning field, </li>     <li> The potential blocking errors which may have occurred during the import process in error field.</li> </ul> Node that if BP company is a DR, IRCOMPANY section of Actis file is not validated (as the data in this section will be the one of the DR company) <p><br/><b>Please note that creation steps will NOT BE EXECUTED if parameter 'preview=true' is set</b>.<br/> This mode is used to <i>check</i> 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).<br/></p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n   \"data\": [\n       {\n           \"profileName\": \"Business\",\n           \"expirationDate\": \"2018-11-01T00:00:00.000Z\",\n           \"offerReference\": \"RB-Business-1Y\",\n           \"sapReference\": \"3EY95101AB\",\n           \"zuoraProductRatePlanChargeId\": \"2c92c0f95b1abf84015b3acdf1dd0c36\",\n           \"zuoraProductRatePlanId\": \"2c92c0f95b1abf84015b3acdf1c50c34\",\n           \"zuoraOfferId\": \"2c92c0f95b1abf84015b3acdf1ae0c32\",\n           \"businessModel\": \"nb_users\",\n           \"profileId\": \"58da6ef53b66b9584c1d1edf\",\n           \"offerName\": \"Business 1Year\",\n           \"bsSubscriptionId\": \"RB-201710006565\",\n           \"maxNumberUsers\": 5,\n           \"createdBy\": {\n               \"bpApplicantNumber\": \"HAGSH87176\",\n               \"loginEmail\": \"bpfinance@vad1.fr\",\n               \"userId\": \"59bbbd5e3c43dba62752b48d\"\n           },\n           \"syncOngoing\": true,\n           \"offerId\": \"59e8e083ca44fd228b850f39\",\n           \"isPrepaid\": true,\n           \"creationDate\": \"2017-10-20T15:47:56.930Z\",\n           \"provisioningNeeded\": [],\n           \"status\": \"creating\",\n           \"isDefault\": false,\n           \"isExclusive\": true,\n           \"canBeSold\": true,\n           \"id\": \"59ea1aad5fe7069f36eb0fc7\"\n       }\n   ],\n   \"report\": {\n       \"parsedData\": {\n           \"purchaseOrderId\": \"CMCMCM00C01A\",\n           \"offers\": [\n               {\n                   \"sapReference\": \"3EY95101AB\",\n                   \"maxNumberUsers\": \"5\",\n                   \"offerId\": \"59e8e083ca44fd228b850f39\",\n                   \"offerName\": \"Business 1Year\",\n                   \"offerReference\": \"RB-Business-1Y\"\n               }\n           ],\n           \"errors\": [\n               {\n                   \"errorCode\": 404,\n                   \"errorMsg\": \"Resource Not Found\",\n                   \"errorDetails\": \"Offer with sapReference=3EY95002AB not found\",\n                   \"errorDetailsCode\": 404301,\n                   \"errorDetailsData\": {\n                       \"sapReference\": \"3EY95002AB\"\n                   }\n               },\n               {\n                   \"errorCode\": 404,\n                   \"errorMsg\": \"Resource Not Found\",\n                   \"errorDetails\": \"Offer with sapReference=3EY95102AB not found\",\n                   \"errorDetailsCode\": 404301,\n                   \"errorDetailsData\": {\n                       \"sapReference\": \"3EY95102AB\"\n                   }\n               }\n           ],\n           \"ec\": {\n               \"name\": \"Hyponte (EC Under BP IR1 under BP VAD1)\",\n               \"admin_email\": \"admin@junk-mail.com\"\n           },\n           \"ir\": {\n               \"name\": \"An existing BP IR1 under BP VAD1\",\n               \"admin_email\": \"bpadmin@ir1-vad1.fr\"\n           }\n       },\n       \"IRCompany\": {\n           \"name\": \"An existing BP IR1 under BP VAD1\",\n           \"id\": \"59bbbed63c43dba62752b492\",\n           \"companyHasBeenCreated\": false\n       },\n       \"ECCompany\": {\n           \"name\": \"Hyponte (EC Under BP IR1 under BP VAD1)\",\n           \"id\": \"59bbc1af3c43dba62752b496\",\n           \"companyHasBeenCreated\": true,\n           \"errors\": [\n               {\n                   \"errorCode\": 403,\n                   \"errorMsg\": \"Forbidden\",\n                   \"errorDetails\": \"email admin@junk-mail.com is black-listed, not able to send join company invitation\",\n                   \"errorDetailsCode\": 403500\n               }\n           ]\n       }\n   },\n   \"warnings\": [\n       {\n           \"errorCode\": 404,\n           \"errorMsg\": \"Resource Not Found\",\n           \"errorDetails\": \"Offer with sapReference=3EY95002AB not found\",\n           \"errorDetailsCode\": 404301,\n           \"errorDetailsData\": {\n               \"sapReference\": \"3EY95002AB\"\n           }\n       },\n       {\n           \"errorCode\": 404,\n           \"errorMsg\": \"Resource Not Found\",\n           \"errorDetails\": \"Offer with sapReference=3EY95102AB not found\",\n           \"errorDetailsCode\": 404301,\n           \"errorDetailsData\": {\n               \"sapReference\": \"3EY95102AB\"\n           }\n       },\n       {\n           \"errorCode\": 403,\n           \"errorMsg\": \"Forbidden\",\n           \"errorDetails\": \"email admin@junk-mail.com is black-listed, not able to send join company invitation\",\n           \"errorDetailsCode\": 403500\n       }\n   ],\n   \"errors\": [],\n   \"status\": \"ACTIS file uploaded, but some warnings occurred.\"\n}"
                        },
                        {
                            "name": "Success-Response (with some errors):",
                            "originalRequest": {
                                "method": "POST",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/files",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        "files"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1) of the BP company uploading the ACTIS file (must be a BP VAD or BP DR company)"
                                        }
                                    ],
                                    "query": [
                                        {
                                            "key": "expectedBpIrCompanyId",
                                            "description": "If specified, the API will check that the BP IR name (if any) being in the Actis file corresponds to the name of the company having the provided expectedBpIrCompanyId in Rainbow database. <br/> If expectedBpIrCompanyId is not provided, the API will try to find the company having the name being in Actis file (exact name match). If a company is found, it will check that its bpId is well the provided companyId (otherwise an error is raised). <br/> If no company match, the BP IR company is created with the name being in Actis file.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "expectedEcCompanyId",
                                            "description": "If specified, the API will check that the EC name being in the Actis file corresponds to the name of the company having the provided expectedEcCompanyId in Rainbow database. <br/> If expectedEcCompanyId is not provided, the API will try to find the company having the name being in Actis file (exact name match). If a company is found, it will check that its bpId is well the provided companyId in case of BP DR, the IR companyId in case of a VAD (otherwise an error is raised). <br/> If no company match, the EC company is created with the name being in Actis file.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "preview",
                                            "description": "If set to true (default false), will NOT create companies and users, but will generate a full report. *",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "content-type",
                                        "name": "content-type",
                                        "value": "application/*",
                                        "description": "application/*",
                                        "type": "text",
                                        "disabled": false
                                    },
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `bp_finance`\n\n<p>This API can be used to upload pre paid offers from ACTIS file, to set in the given company subscriptions. <br/> Rules:</p> <ul>     <li> ACTIS file has to be sent directly in http body (no JSon). </li>     <li> Two format are supported: one plain XML file (extension .xpo2), and one zipped file (extension .SAP).</li>     <li> By default, ACTIS file size is limited to 4 MB.</li>     <li> If the company requesting the subscription(s) creation is a BP VAD, the requested offers must be prepaid offers.</li> </ul> <p>The API only returns status code &gt; 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). <br/> Otherwise, the API returns with a status code 200 and the following data are returned:</p> <ul>     <li> The created subscription(s) (if any) in field data, </li>     <li> A report regarding the import process in field report (file parsing, offers and companies used), </li>     <li> The potential non blocking errors which may have occurred during the import process in warning field, </li>     <li> The potential blocking errors which may have occurred during the import process in error field.</li> </ul> Node that if BP company is a DR, IRCOMPANY section of Actis file is not validated (as the data in this section will be the one of the DR company) <p><br/><b>Please note that creation steps will NOT BE EXECUTED if parameter 'preview=true' is set</b>.<br/> This mode is used to <i>check</i> 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).<br/></p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "\n{\n   \"data\": [],\n   \"report\": {\n       \"parsedData\": {\n           \"purchaseOrderId\": \"CMCMCM00C01B\",\n           \"offers\": [\n               {\n                   \"sapReference\": \"3EY95101AB\",\n                   \"maxNumberUsers\": \"5\",\n                   \"offerId\": \"59e8e083ca44fd228b850f39\",\n                   \"offerName\": \"Business 1Year\",\n                   \"offerReference\": \"RB-Business-1Y\"\n               }\n           ],\n           \"errors\": [\n               {\n                   \"errorCode\": 404,\n                   \"errorMsg\": \"Resource Not Found\",\n                   \"errorDetails\": \"Offer with sapReference=3EY95002AB not found\",\n                   \"errorDetailsCode\": 404301\n               },\n               {\n                   \"errorCode\": 404,\n                   \"errorMsg\": \"Resource Not Found\",\n                   \"errorDetails\": \"Offer with sapReference=3EY95102AB not found\",\n                   \"errorDetailsCode\": 404301\n               }\n           ],\n           \"ec\": {\n               \"name\": \"An existing EC (EC Under BP IR1 under BP VAD1)\",\n               \"admin_email\": \"admin@junk-mail.com\"\n           },\n           \"ir\": {\n               \"name\": \"An existing BP IR1 under BP VAD1\",\n               \"admin_email\": \"bpadmin@ir1-vad1.fr\"\n           }\n       },\n       \"IRCompany\": {\n           \"name\": \"An existing BP IR1 under BP VAD1\",\n           \"id\": \"59bbbed63c43dba62752b492\",\n           \"companyHasBeenCreated\": false\n       },\n       \"ECCompany\": {\n           \"name\": \"An existing EC (EC Under BP IR1 under BP VAD1)\",\n           \"id\": \"59bbc1af3c43dba62752b496\",\n           \"companyHasBeenCreated\": false,\n           \"errors\": [\n               {\n                   \"errorCode\": 403,\n                   \"errorMsg\": \"Forbidden\",\n                   \"errorDetails\": \"email admin@junk-mail.com is black-listed, not able to send join company invitation\",\n                   \"errorDetailsCode\": 403500\n               }\n           ]\n       }\n   },\n   \"warnings\": [\n       {\n           \"errorCode\": 404,\n           \"errorMsg\": \"Resource Not Found\",\n           \"errorDetails\": \"Offer with sapReference=3EY95002AB not found\",\n           \"errorDetailsCode\": 404301\n       },\n       {\n           \"errorCode\": 404,\n           \"errorMsg\": \"Resource Not Found\",\n           \"errorDetails\": \"Offer with sapReference=3EY95102AB not found\",\n           \"errorDetailsCode\": 404301\n       },\n       {\n           \"errorCode\": 403,\n           \"errorMsg\": \"Forbidden\",\n           \"errorDetails\": \"email admin@junk-mail.com is black-listed, not able to send join company invitation\",\n           \"errorDetailsCode\": 403500\n       }\n   ],\n   \"errors\": [\n       {\n           \"errorCode\": 409,\n           \"errorMsg\": \"Conflict\",\n           \"errorDetails\": \"Company 59bbc1af3c43dba62752b496 has already subscribed to offer 59e8e083ca44fd228b850f39\",\n           \"errorDetailsCode\": 409620\n       }\n   ],\n   \"status\": \"ACTIS file uploaded, but some errors occurred.\"\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "subscriptions",
            "description": "subscriptions",
            "item": [
                {
                    "name": "Subscribe to an offer",
                    "request": {
                        "method": "POST",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            },
                            {
                                "key": "content-type",
                                "name": "content-type",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"offerId\": \"58072f646237427a3687dc90\",\n    \"maxNumberUsers\": 50,\n    \"autoRenew\": false,\n    \"purchaseOrderNumber\": \"my po\",\n    \"renewalTerm\":42\n}"
                        },
                        "description": "Required role(s): `business_admin`, `bp_finance`, `organization_admin`\n\n<p>/!\\ 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). <br/> <br/> This API can be used to create a subscription for a company to a given offer. <br/> <br/> If BP company have <code>resell</code> businessModel, his bpApplicantNumber must exist in Business Store (i.e. API <a href=\"#api-companies-subscription_CheckApplicantNumber\">GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber}</a> must return true). <br/> Note: BP IR companies should not have a bpApplicantNumber, as they don't pay directly ALE (their BP VAD does). <br/> <br/> <code>superadmin</code> can create subscriptions for every company. <code>superadmin</code> can create subscription even for offers which can't be sold (not paid offers, like beta, Enterprise Demo, ...). <br/> <code>business_admin</code> can create subscriptions for every company. <code>business_admin</code> 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. <br/> <code>bp_finance</code> can only create subscriptions for End Customer companies / BP IR companies for which bp_finance's company is the BP company. <br/> Users being both <code>bp_finance</code> and <code>organization_admin</code> 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. <br/> Only <code>superadmin</code> and <code>bp_finance</code> can create subscriptions (for now at least), users with <code>admin</code> role alone are denied. <br/> <code>bp_finance</code> 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 field<code>adminHasRightToUpdateSubscriptions</code> to true for this BP IR company. <br/> <br/> Creating a subscription corresponds to a company buying a paid offer. Therefore, a subscription links a company to an offer. <br/> The list of offers which can be bought can be listed using API <a href=\"#api-offers-subscription_GetOffers\">GET /api/rainbow/subscription/v1.0/companies/:companyId/offers</a> (warning: the offers already bought are also listed). <br/> 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). <br/> <br/> The offers have a businessModel corresponding to the way they are sold.</p> <ul>     <li> Offers with businessModel <code>nb_users</code> or <code>nb_services</code> correspond to offers sold for a given number of users (licences).          <ul>              <li> The number of licences corresponds to the field <code>maxNumberUsers</code>.</li>              <li> For offers with businessModel <code>nb_users</code> or <code>nb_services</code>, maxNumberUsers must be provided (it must be > 0).</li>              <li> <code>maxNumberUsers</code> corresponds to the maximum number of users who can be assigned to the subscription of this offer.</li>              <li> The customer will be billed according to this number of licences bought (and not on the number of users assigned to the subscription).</li>              <li> Before creating the actual subscription for offers with businessModel <code>nb_users</code> or <code>nb_services</code>, a quotation can be made using API              <a href=\"#api-quotations-subscription_CreateQuotation\">POST /api/rainbow/subscription/v1.0/companies/:companyId/quotations</a>.</li>              <li> Once bought, except for offers with businessModel <code>nb_services</code>, the company subscription can be assigned to as many users as available licences (field              maxNumberUsers of subscription objects) using API <a href=\"/admin/#api-users_profiles-admin_users_PostUserProfiles\">POST /api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}</a>.</li>          </ul>      </li>     <li> Offers with businessModel <code>usage</code> correspond to offers for which billing will be done according to          customer consumption (minutes of conference, TB of storage, ...).          <ul>              <li> The customer will be billed according to his consumption (and not on the number of users assigned to the subscription).</li>              <li> No quotation can be done before subscribing to offers with businessModel <code>usage</code> (as the invoice will depend of customer consumption)</li>              <li> Once bought, the company subscription can be assigned to as many users as desired (there is no maximum number of users who              can be assigned to these offers) using API <a href=\"/admin/#api-users_profiles-admin_users_PostUserProfiles\">POST /api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}</a>.</li>              <li> Field maxNumberUsers is not used for these offers.</li>          </ul>      </li> </ul> <br/> When the subscription is created with this API, 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: <pre><code class=\"language-html\">&lt;message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"           type=\"management\"           from=\"pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532\"           to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"           xmlns=\"jabber:client\"&gt;      &lt;companysubscription xmlns=\"jabber:iq:configuration\" subscriptionId=\"5808afeb4372eb19547e90cf\"          companyId=\"58bd63d5dc5ef5eb3fe154c0\" action=\"create\"&gt;          &lt;offerId&gt;58072f646237427a3687dc90&lt;/offerId&gt;          &lt;offerName&gt;Enterprise&lt;/offerName&gt;          &lt;profileId&gt;57cd90ddc04fd92e232ae258&lt;/profileId&gt;          &lt;profileName&gt;Enterprise&lt;/profileName&gt;          &lt;status&gt;creating&lt;/status&gt;          &lt;syncOngoing&gt;true&lt;/syncOngoing&gt;          &lt;maxNumberUsers&gt;50&lt;/maxNumberUsers&gt;      &lt;/companysubscription&gt;  &lt;/message&gt;</code></pre> <br/> <br/> The <code>status</code> field with value <code>creating</code> and the <code>syncOngoing</code> flag indicates that the creation is ongoing on Business Store and Zuora side. <br/> Once the creation is done on their side, all company_admin bp_admin and bp_finance will receive again the same XMPP message with the field <code>status</code> equal to <code>active</code> and <code>syncOngoing</code> equal to false. <br/> <br/> If the created subscription requires conference provisioning on PGI or JANUS, a PGI/JANUS account will be created for this company once the Business Store will confirm the creation of the subscription on Zuora. This creation is done asynchronously by conf provisioning portal. A flag <code>provisioningOngoing</code> in <code>provisioningNeeded</code> array indicates the status of the creation on PGI/JANUS."
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "POST",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    },
                                    {
                                        "key": "content-type",
                                        "name": "content-type",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"offerId\": \"58072f646237427a3687dc90\",\n    \"maxNumberUsers\": 50,\n    \"autoRenew\": false,\n    \"purchaseOrderNumber\": \"my po\",\n    \"renewalTerm\":42\n}"
                                },
                                "description": "Required role(s): `business_admin`, `bp_finance`, `organization_admin`\n\n<p>/!\\ 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). <br/> <br/> This API can be used to create a subscription for a company to a given offer. <br/> <br/> If BP company have <code>resell</code> businessModel, his bpApplicantNumber must exist in Business Store (i.e. API <a href=\"#api-companies-subscription_CheckApplicantNumber\">GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber}</a> must return true). <br/> Note: BP IR companies should not have a bpApplicantNumber, as they don't pay directly ALE (their BP VAD does). <br/> <br/> <code>superadmin</code> can create subscriptions for every company. <code>superadmin</code> can create subscription even for offers which can't be sold (not paid offers, like beta, Enterprise Demo, ...). <br/> <code>business_admin</code> can create subscriptions for every company. <code>business_admin</code> 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. <br/> <code>bp_finance</code> can only create subscriptions for End Customer companies / BP IR companies for which bp_finance's company is the BP company. <br/> Users being both <code>bp_finance</code> and <code>organization_admin</code> 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. <br/> Only <code>superadmin</code> and <code>bp_finance</code> can create subscriptions (for now at least), users with <code>admin</code> role alone are denied. <br/> <code>bp_finance</code> 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 field<code>adminHasRightToUpdateSubscriptions</code> to true for this BP IR company. <br/> <br/> Creating a subscription corresponds to a company buying a paid offer. Therefore, a subscription links a company to an offer. <br/> The list of offers which can be bought can be listed using API <a href=\"#api-offers-subscription_GetOffers\">GET /api/rainbow/subscription/v1.0/companies/:companyId/offers</a> (warning: the offers already bought are also listed). <br/> 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). <br/> <br/> The offers have a businessModel corresponding to the way they are sold.</p> <ul>     <li> Offers with businessModel <code>nb_users</code> or <code>nb_services</code> correspond to offers sold for a given number of users (licences).          <ul>              <li> The number of licences corresponds to the field <code>maxNumberUsers</code>.</li>              <li> For offers with businessModel <code>nb_users</code> or <code>nb_services</code>, maxNumberUsers must be provided (it must be > 0).</li>              <li> <code>maxNumberUsers</code> corresponds to the maximum number of users who can be assigned to the subscription of this offer.</li>              <li> The customer will be billed according to this number of licences bought (and not on the number of users assigned to the subscription).</li>              <li> Before creating the actual subscription for offers with businessModel <code>nb_users</code> or <code>nb_services</code>, a quotation can be made using API              <a href=\"#api-quotations-subscription_CreateQuotation\">POST /api/rainbow/subscription/v1.0/companies/:companyId/quotations</a>.</li>              <li> Once bought, except for offers with businessModel <code>nb_services</code>, the company subscription can be assigned to as many users as available licences (field              maxNumberUsers of subscription objects) using API <a href=\"/admin/#api-users_profiles-admin_users_PostUserProfiles\">POST /api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}</a>.</li>          </ul>      </li>     <li> Offers with businessModel <code>usage</code> correspond to offers for which billing will be done according to          customer consumption (minutes of conference, TB of storage, ...).          <ul>              <li> The customer will be billed according to his consumption (and not on the number of users assigned to the subscription).</li>              <li> No quotation can be done before subscribing to offers with businessModel <code>usage</code> (as the invoice will depend of customer consumption)</li>              <li> Once bought, the company subscription can be assigned to as many users as desired (there is no maximum number of users who              can be assigned to these offers) using API <a href=\"/admin/#api-users_profiles-admin_users_PostUserProfiles\">POST /api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}</a>.</li>              <li> Field maxNumberUsers is not used for these offers.</li>          </ul>      </li> </ul> <br/> When the subscription is created with this API, 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: <pre><code class=\"language-html\">&lt;message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"           type=\"management\"           from=\"pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532\"           to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"           xmlns=\"jabber:client\"&gt;      &lt;companysubscription xmlns=\"jabber:iq:configuration\" subscriptionId=\"5808afeb4372eb19547e90cf\"          companyId=\"58bd63d5dc5ef5eb3fe154c0\" action=\"create\"&gt;          &lt;offerId&gt;58072f646237427a3687dc90&lt;/offerId&gt;          &lt;offerName&gt;Enterprise&lt;/offerName&gt;          &lt;profileId&gt;57cd90ddc04fd92e232ae258&lt;/profileId&gt;          &lt;profileName&gt;Enterprise&lt;/profileName&gt;          &lt;status&gt;creating&lt;/status&gt;          &lt;syncOngoing&gt;true&lt;/syncOngoing&gt;          &lt;maxNumberUsers&gt;50&lt;/maxNumberUsers&gt;      &lt;/companysubscription&gt;  &lt;/message&gt;</code></pre> <br/> <br/> The <code>status</code> field with value <code>creating</code> and the <code>syncOngoing</code> flag indicates that the creation is ongoing on Business Store and Zuora side. <br/> Once the creation is done on their side, all company_admin bp_admin and bp_finance will receive again the same XMPP message with the field <code>status</code> equal to <code>active</code> and <code>syncOngoing</code> equal to false. <br/> <br/> If the created subscription requires conference provisioning on PGI or JANUS, a PGI/JANUS account will be created for this company once the Business Store will confirm the creation of the subscription on Zuora. This creation is done asynchronously by conf provisioning portal. A flag <code>provisioningOngoing</code> in <code>provisioningNeeded</code> array indicates the status of the creation on PGI/JANUS."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": {\n     \"id\": \"59199637d3f06c2fdc40b95e\",\n     \"offerId\": \"580e05670f3cce8315072657\",\n     \"offerName\": \"Enterprise\",\n     \"offerDescription\": \"Rainbow Enterprise offer\",\n     \"offerTechnicalDescription\": \"Enterprise offer for BP VAD\",\n     \"sapReference\": \"3EY95003AA\",\n     \"offerReference\": \"RB-Enterprise\",\n     \"profileId\": \"580778556fbd22a442d4fb58\",\n     \"profileName\": \"Enterprise\",\n     \"isDefault\": false,\n     \"businessModel\": \"nb_users\",\n     \"isExclusive\": true,\n     \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n     \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n     \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n     \"creationDate\": \"2017-05-15T11:51:19.180Z\",\n     \"createdBy\": {\n       \"bpApplicantNumber\": \"HAGSH87176\", \n       \"loginEmail\": \"bpfinance@bp.fr\",\n       \"userId\": \"589dea575a5f36a336a65704\"\n     },\n     \"status\": \"creating\",\n     \"syncOngoing\": true,\n     \"bsSubscriptionId\": \"RB-201705005659\",\n     \"maxNumberUsers\": 50,\n     \"purchaseOrderNumber\": \"my po\"\n  }\n}"
                        }
                    ]
                },
                {
                    "name": "Delete a subscription",
                    "request": {
                        "method": "DELETE",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                ":subscriptionId"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                },
                                {
                                    "key": "subscriptionId",
                                    "description": "Company subscription unique identifier."
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `bp_finance`\n\n<p>This API can be used to delete or terminate a given company subscription. <br/> <br/> <code>superadmin</code> can delete subscriptions for every company. <code>superadmin</code> can delete subscription even for offers which can't be sold (not paid offers, like beta, Enterprise Demo, ...). <br/> <code>business_admin</code> can delete subscriptions for every company. <code>business_admin</code> 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. <br/> <code>bp_finance</code> can only delete subscriptions for End Customer companies for which the bp_finance's company is the BP company. <br/> <br/> 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). <br/> 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. <br/> Subscriptions not being in Business Store / Zuora are deleted (i.e. subscriptions to free offers like beta, Enterprise Demo, ...) from Rainbow database. <br/> Others subscriptions (known on Zuora) are tagged with status <code>terminated</code>. <br/> Default subscription can't be deleted. <br/> <br/> 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). <br/> <br/> 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:</p> <pre><code class=\"language-html\">&lt;message id=&quot;8413b42e-563c-4437-9a53-06f638b5ab69_0&quot; type=&quot;management&quot;     from=&quot;pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532&quot;     to=&quot;5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com&quot;     xmlns=&quot;jabber:client&quot;&gt;     &lt;companysubscription xmlns=&quot;jabber:iq:configuration&quot;     subscriptionId=&quot;5808afeb4372eb19547e90cf&quot;     companyId=&quot;58bd63d5dc5ef5eb3fe154c0&quot; action=&quot;delete&quot;&gt;&lt;/companysubscription&gt; &lt;/message&gt;</code></pre> <br/>"
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "DELETE",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        ":subscriptionId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        },
                                        {
                                            "key": "subscriptionId",
                                            "description": "Company subscription unique identifier."
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `bp_finance`\n\n<p>This API can be used to delete or terminate a given company subscription. <br/> <br/> <code>superadmin</code> can delete subscriptions for every company. <code>superadmin</code> can delete subscription even for offers which can't be sold (not paid offers, like beta, Enterprise Demo, ...). <br/> <code>business_admin</code> can delete subscriptions for every company. <code>business_admin</code> 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. <br/> <code>bp_finance</code> can only delete subscriptions for End Customer companies for which the bp_finance's company is the BP company. <br/> <br/> 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). <br/> 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. <br/> Subscriptions not being in Business Store / Zuora are deleted (i.e. subscriptions to free offers like beta, Enterprise Demo, ...) from Rainbow database. <br/> Others subscriptions (known on Zuora) are tagged with status <code>terminated</code>. <br/> Default subscription can't be deleted. <br/> <br/> 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). <br/> <br/> 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:</p> <pre><code class=\"language-html\">&lt;message id=&quot;8413b42e-563c-4437-9a53-06f638b5ab69_0&quot; type=&quot;management&quot;     from=&quot;pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532&quot;     to=&quot;5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com&quot;     xmlns=&quot;jabber:client&quot;&gt;     &lt;companysubscription xmlns=&quot;jabber:iq:configuration&quot;     subscriptionId=&quot;5808afeb4372eb19547e90cf&quot;     companyId=&quot;58bd63d5dc5ef5eb3fe154c0&quot; action=&quot;delete&quot;&gt;&lt;/companysubscription&gt; &lt;/message&gt;</code></pre> <br/>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n     \"status\": \"Subscription 5808afeb4372eb19547e90cf successfully terminated\",\n     \"data\": []\n}"
                        }
                    ]
                },
                {
                    "name": "Get a company subscription",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                ":subscriptionId"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                },
                                {
                                    "key": "subscriptionId",
                                    "description": "Company subscription unique identifier."
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to get a subscription of a company. <br/> <br/> <code>superadmin</code> and <code>support</code> can get subscriptions of all companies existing in Rainbow. <br/> <code>business_admin</code> can get only demo subscriptions of all companies existing in Rainbow. <br/> <code>bp_admin</code> can only get subscriptions of End Customer companies for which their bp_admin's company is the BP company. <br/> <code>bp_finance</code> can only get subscriptions of End Customer companies for which their bp_finance's company is the BP company. <br/> <code>organization_admin</code> can only get subscriptions of companies under their organisation. <br/> <code>company_admin</code> can get subscriptions only for their company. <br/> <br/> Data regarding user assignment is computed and returned for the requested subscription:</p> <ul>     <li> If the company owning the subscription is a BP with <code>bpType</code>=<code>IR</code> and the     subscription has <code>businessModel</code>=<code>nb_users</code>, the following fields are computed and added to the subscription data:     <ul>         <li><code>nbBPLicences</code>: the number of licences available for this subscription (equal to <code>maxNumberUsers</code>),</li>         <li><code>nbAssignedBPUsers</code>: the number of licences assigned to BP company's users for this subscription,</li>         <li><code>nbLicencesAssignedToECs</code>: 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)</li>         <li><code>nbLicencesUsed</code>: the number of licences used for this subscription (equal to <code>nbAssignedBPUsers</code> + <code>nbLicencesAssignedToECs</code>)</li>         <li><code>nbFreeLicences</code>: the number of licences available for this subscription (equal to <code>nbBPLicences</code> - <code>nbLicencesUsed</code>)</li>         <li><code>numberAssignedUsers</code>: the number of licences assigned for this subscription (equal to <code>nbLicencesUsed</code>).</li>     </ul>     </li>     <li>Otherwise, the following field is computed and added to the subscription data:     <ul>         <li><code>numberAssignedUsers</code>: the number of licences assigned to company's users for this subscription.</li>     </ul>     </li> </ul> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/5808afeb4372eb19547e90cf"
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        ":subscriptionId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        },
                                        {
                                            "key": "subscriptionId",
                                            "description": "Company subscription unique identifier."
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to get a subscription of a company. <br/> <br/> <code>superadmin</code> and <code>support</code> can get subscriptions of all companies existing in Rainbow. <br/> <code>business_admin</code> can get only demo subscriptions of all companies existing in Rainbow. <br/> <code>bp_admin</code> can only get subscriptions of End Customer companies for which their bp_admin's company is the BP company. <br/> <code>bp_finance</code> can only get subscriptions of End Customer companies for which their bp_finance's company is the BP company. <br/> <code>organization_admin</code> can only get subscriptions of companies under their organisation. <br/> <code>company_admin</code> can get subscriptions only for their company. <br/> <br/> Data regarding user assignment is computed and returned for the requested subscription:</p> <ul>     <li> If the company owning the subscription is a BP with <code>bpType</code>=<code>IR</code> and the     subscription has <code>businessModel</code>=<code>nb_users</code>, the following fields are computed and added to the subscription data:     <ul>         <li><code>nbBPLicences</code>: the number of licences available for this subscription (equal to <code>maxNumberUsers</code>),</li>         <li><code>nbAssignedBPUsers</code>: the number of licences assigned to BP company's users for this subscription,</li>         <li><code>nbLicencesAssignedToECs</code>: 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)</li>         <li><code>nbLicencesUsed</code>: the number of licences used for this subscription (equal to <code>nbAssignedBPUsers</code> + <code>nbLicencesAssignedToECs</code>)</li>         <li><code>nbFreeLicences</code>: the number of licences available for this subscription (equal to <code>nbBPLicences</code> - <code>nbLicencesUsed</code>)</li>         <li><code>numberAssignedUsers</code>: the number of licences assigned for this subscription (equal to <code>nbLicencesUsed</code>).</li>     </ul>     </li>     <li>Otherwise, the following field is computed and added to the subscription data:     <ul>         <li><code>numberAssignedUsers</code>: the number of licences assigned to company's users for this subscription.</li>     </ul>     </li> </ul> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/5808afeb4372eb19547e90cf"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": {\n     \"id\": \"59199637d3f06c2fdc40b95e\",\n     \"offerId\": \"580e05670f3cce8315072657\",\n     \"offerName\": \"Enterprise\",\n     \"offerDescription\": \"Rainbow Enterprise offer\",\n     \"offerTechnicalDescription\": \"Enterprise offer for BP VAD\",\n     \"sapReference\": \"3EY95003AA\",\n     \"offerReference\": \"RB-Enterprise\",\n     \"profileId\": \"580778556fbd22a442d4fb58\",\n     \"profileName\": \"Enterprise\",\n     \"isDefault\": false,\n     \"businessModel\": \"nb_users\",\n     \"isExclusive\": true,\n     \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n     \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n     \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n     \"creationDate\": \"2017-05-15T11:51:19.180Z\",\n     \"createdBy\": {\n       \"bpApplicantNumber\": \"HAGSH87176\", \n       \"loginEmail\": \"bpfinance@bp.fr\",\n       \"userId\": \"589dea575a5f36a336a65704\"\n     },\n     \"status\": \"active\",\n     \"syncOngoing\": false,\n     \"bsSubscriptionId\": \"RB-201705005659\",\n     \"zuoraSubscriptionId\": \"2c92c0fb5ca5c5bc015ca6feafbc7995\",\n     \"maxNumberUsers\": 10,\n     \"numberAssignedUsers\": 7\n  }\n}"
                        },
                        {
                            "name": "Success-Response (BP IR):",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        ":subscriptionId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        },
                                        {
                                            "key": "subscriptionId",
                                            "description": "Company subscription unique identifier."
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to get a subscription of a company. <br/> <br/> <code>superadmin</code> and <code>support</code> can get subscriptions of all companies existing in Rainbow. <br/> <code>business_admin</code> can get only demo subscriptions of all companies existing in Rainbow. <br/> <code>bp_admin</code> can only get subscriptions of End Customer companies for which their bp_admin's company is the BP company. <br/> <code>bp_finance</code> can only get subscriptions of End Customer companies for which their bp_finance's company is the BP company. <br/> <code>organization_admin</code> can only get subscriptions of companies under their organisation. <br/> <code>company_admin</code> can get subscriptions only for their company. <br/> <br/> Data regarding user assignment is computed and returned for the requested subscription:</p> <ul>     <li> If the company owning the subscription is a BP with <code>bpType</code>=<code>IR</code> and the     subscription has <code>businessModel</code>=<code>nb_users</code>, the following fields are computed and added to the subscription data:     <ul>         <li><code>nbBPLicences</code>: the number of licences available for this subscription (equal to <code>maxNumberUsers</code>),</li>         <li><code>nbAssignedBPUsers</code>: the number of licences assigned to BP company's users for this subscription,</li>         <li><code>nbLicencesAssignedToECs</code>: 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)</li>         <li><code>nbLicencesUsed</code>: the number of licences used for this subscription (equal to <code>nbAssignedBPUsers</code> + <code>nbLicencesAssignedToECs</code>)</li>         <li><code>nbFreeLicences</code>: the number of licences available for this subscription (equal to <code>nbBPLicences</code> - <code>nbLicencesUsed</code>)</li>         <li><code>numberAssignedUsers</code>: the number of licences assigned for this subscription (equal to <code>nbLicencesUsed</code>).</li>     </ul>     </li>     <li>Otherwise, the following field is computed and added to the subscription data:     <ul>         <li><code>numberAssignedUsers</code>: the number of licences assigned to company's users for this subscription.</li>     </ul>     </li> </ul> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/5808afeb4372eb19547e90cf"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": {\n     \"id\": \"59199637d3f06c2fdc40b95e\",\n     \"offerId\": \"580e05670f3cce8315072657\",\n     \"offerName\": \"Enterprise\",\n     \"profileId\": \"580778556fbd22a442d4fb58\",\n     \"profileName\": \"Enterprise\",\n     \"offerDescription\": \"Rainbow Enterprise offer\",\n     \"offerTechnicalDescription\": \"Enterprise offer for BP VAD\",\n     \"sapReference\": \"3EY95003AA\",\n     \"offerReference\": \"RB-Enterprise\",\n     \"isDefault\": false,\n     \"businessModel\": \"nb_users\",\n     \"isExclusive\": true,\n     \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n     \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n     \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n     \"creationDate\": \"2017-05-15T11:51:19.180Z\",\n     \"createdBy\": {\n       \"bpApplicantNumber\": \"HAGSH87176\", \n       \"loginEmail\": \"bpfinance@bp.fr\",\n       \"userId\": \"589dea575a5f36a336a65704\"\n     },\n     \"status\": \"active\",\n     \"syncOngoing\": false,\n     \"bsSubscriptionId\": \"RB-201705005659\",\n     \"zuoraSubscriptionId\": \"2c92c0fb5ca5c5bc015ca6feafbc7995\",\n     \"maxNumberUsers\": 10,\n     \"nbBPLicences\": 10,\n     \"nbAssignedBPUsers\": 1,\n     \"nbLicencesAssignedToECs\": 9,\n     \"nbLicencesUsed\": 10,\n     \"numberAssignedUsers\": 10,\n     \"nbFreeLicences\": 0\n  }\n}"
                        }
                    ]
                },
                {
                    "name": "Get company subscription features",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/features",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                "features"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`, `user`, `guest`\n\n<p>This API can be used to get features available to the company through its subscriptions.</p> <p>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.</p> <p>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).</p> <p>This API allows to aggregate all features from all company's subscriptions, listing therefore all available features for this company.</p> <p><code>superadmin</code> and <code>support</code> can get company features of all companies existing in Rainbow. <code>bp_admin</code> can only get company features of End Customer companies for which their bp_admin's company is the BP company. <code>bp_finance</code> can only get company features of End Customer companies for which their bp_finance's company is the BP company. <code>organization_admin</code> can only get company features of companies under their organisation. <code>company_admin</code> can get company features only for their company. <code>user</code> can get company features only for their company.</p> <p>Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/features</p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/features",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        "features"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`, `user`, `guest`\n\n<p>This API can be used to get features available to the company through its subscriptions.</p> <p>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.</p> <p>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).</p> <p>This API allows to aggregate all features from all company's subscriptions, listing therefore all available features for this company.</p> <p><code>superadmin</code> and <code>support</code> can get company features of all companies existing in Rainbow. <code>bp_admin</code> can only get company features of End Customer companies for which their bp_admin's company is the BP company. <code>bp_finance</code> can only get company features of End Customer companies for which their bp_finance's company is the BP company. <code>organization_admin</code> can only get company features of companies under their organisation. <code>company_admin</code> can get company features only for their company. <code>user</code> can get company features only for their company.</p> <p>Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/features</p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": [\n    {\n      \"featureId\": \"580773787853994e42d90f0b\",\n      \"featureUniqueRef\": \"COMPANY_ADMIN_ALLOWED_NB\",\n      \"featureName\": \"Company admin\",\n      \"featureType\": \"number\",\n      \"limitMax\": 10,\n      \"addedDate\": \"2017-02-16T11:22:54.270Z\",\n      \"lastUpdateDate\": \"2017-02-16T11:22:54.270Z\"\n    },\n    {\n      \"featureId\": \"580e02660f3cce8315072656\",\n      \"featureUniqueRef\": \"MASSPRO_USER_PROVISIONING_CSV\",\n      \"featureName\": \"Mass user provisioning using CSV file\",\n      \"featureType\": \"boolean\",\n      \"isEnabled\": true,\n      \"addedDate\": \"2017-02-16T11:23:29.296Z\",\n      \"lastUpdateDate\": \"2017-02-16T11:23:29.296Z\"\n    }\n  ]\n}"
                        }
                    ]
                },
                {
                    "name": "Get company subscriptions",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ],
                            "query": [
                                {
                                    "key": "format",
                                    "value": "small",
                                    "description": "Allows to retrieve more or less subscription details in response. <br/>- <codsmall</cod: id offerId profileId isDefault <br/>- <codmedium</cod: id offerId profileId isDefault maxNumberUsers status <br/>- <codfull</cod: all offer fields, including computed user assignment fields (numberAssignedUsers, nbAssignedBPUsers, nbLicencesAssignedToECs, ...)",
                                    "disabled": true
                                },
                                {
                                    "key": "showTerminated",
                                    "description": "Allows to get terminated subscriptions. By default, terminated subscription are not returned.",
                                    "disabled": true
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`, `ldap_admin`\n\n<p>This API can be used to list all subscriptions subscribed by a company. <br/> All companies have at least a subscription to the default (free) offer. <br/> <br/> <code>superadmin</code>, <code>business_admin</code> and <code>support</code> can list subscriptions of all companies existing in Rainbow. <br/> <code>business_admin</code> can list only demo subscriptions of all companies existing in Rainbow. <br/> <code>bp_admin</code> can only list subscriptions of End Customer companies for which their bp_admin's company is the BP company. <br/> <code>bp_finance</code> can only list subscriptions of End Customer companies for which their bp_finance's company is the BP company. <br/> <code>organization_admin</code> can only list subscriptions of companies under their organisation. <br/> <code>company_admin</code> can list subscriptions only for their company. <br/> <br/> If format is full, data regarding user assignment is added for each subscription:</p> <ul>     <li> If the company owning the subscription is a BP with <code>bpType</code>=<code>IR</code> and the     subscription has <code>businessModel</code>=<code>nb_users</code>, the following fields are computed and     added to the subscription data:     <ul>         <li><code>nbBPLicences</code>: the number of licences available for this subscription (equal to <code>maxNumberUsers</code>),</li>         <li><code>nbAssignedBPUsers</code>: the number of licences assigned to BP users for this subscription,</li>         <li><code>nbLicencesAssignedToECs</code>: 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)</li>         <li><code>nbLicencesUsed</code>: the number of licences used for this subscription (equal to <code>nbAssignedBPUsers</code> + <code>nbLicencesAssignedToECs</code>)</li>         <li><code>nbFreeLicences</code>: the number of licences available for this subscription (equal to <code>nbBPLicences</code> - <code>nbLicencesUsed</code>)</li>         <li><code>numberAssignedUsers</code>: the number of licences assigned for this subscription (equal to <code>nbLicencesUsed</code>).         Added for compatibility so that in all cases this field is set.</li>     </ul>     </li>     <li>Otherwise, the following field is computed and added to the subscription data:     <ul>         <li><code>numberAssignedUsers</code>: the number of licences assigned to company users for this subscription.</li>     </ul>     </li> </ul> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions?format=full"
                    },
                    "response": [
                        {
                            "name": "Success-Response (format=full):",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ],
                                    "query": [
                                        {
                                            "key": "format",
                                            "value": "small",
                                            "description": "Allows to retrieve more or less subscription details in response. <br/>- <codsmall</cod: id offerId profileId isDefault <br/>- <codmedium</cod: id offerId profileId isDefault maxNumberUsers status <br/>- <codfull</cod: all offer fields, including computed user assignment fields (numberAssignedUsers, nbAssignedBPUsers, nbLicencesAssignedToECs, ...)",
                                            "disabled": true
                                        },
                                        {
                                            "key": "showTerminated",
                                            "description": "Allows to get terminated subscriptions. By default, terminated subscription are not returned.",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`, `ldap_admin`\n\n<p>This API can be used to list all subscriptions subscribed by a company. <br/> All companies have at least a subscription to the default (free) offer. <br/> <br/> <code>superadmin</code>, <code>business_admin</code> and <code>support</code> can list subscriptions of all companies existing in Rainbow. <br/> <code>business_admin</code> can list only demo subscriptions of all companies existing in Rainbow. <br/> <code>bp_admin</code> can only list subscriptions of End Customer companies for which their bp_admin's company is the BP company. <br/> <code>bp_finance</code> can only list subscriptions of End Customer companies for which their bp_finance's company is the BP company. <br/> <code>organization_admin</code> can only list subscriptions of companies under their organisation. <br/> <code>company_admin</code> can list subscriptions only for their company. <br/> <br/> If format is full, data regarding user assignment is added for each subscription:</p> <ul>     <li> If the company owning the subscription is a BP with <code>bpType</code>=<code>IR</code> and the     subscription has <code>businessModel</code>=<code>nb_users</code>, the following fields are computed and     added to the subscription data:     <ul>         <li><code>nbBPLicences</code>: the number of licences available for this subscription (equal to <code>maxNumberUsers</code>),</li>         <li><code>nbAssignedBPUsers</code>: the number of licences assigned to BP users for this subscription,</li>         <li><code>nbLicencesAssignedToECs</code>: 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)</li>         <li><code>nbLicencesUsed</code>: the number of licences used for this subscription (equal to <code>nbAssignedBPUsers</code> + <code>nbLicencesAssignedToECs</code>)</li>         <li><code>nbFreeLicences</code>: the number of licences available for this subscription (equal to <code>nbBPLicences</code> - <code>nbLicencesUsed</code>)</li>         <li><code>numberAssignedUsers</code>: the number of licences assigned for this subscription (equal to <code>nbLicencesUsed</code>).         Added for compatibility so that in all cases this field is set.</li>     </ul>     </li>     <li>Otherwise, the following field is computed and added to the subscription data:     <ul>         <li><code>numberAssignedUsers</code>: the number of licences assigned to company users for this subscription.</li>     </ul>     </li> </ul> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions?format=full"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "\n{\n    \"data\": [\n       {\n         \"id\": \"5808b655a55a36d354f75cbe\",\n         \"offerId\": \"58079ed2041fa586e92337cd\",\n         \"offerName\": \"Essential\",\n         \"sapReference\": \"3EY95001AA\",\n         \"offerReference\": \"RB-Essential\",\n         \"profileId\": \"580777f56fbd22a442d4fb57\",\n         \"profileName\": \"Essential\",\n         \"creationDate\": \"2016-10-18T15:15:38.351Z\",\n         \"status\": \"active\",\n         \"isDefault\": true,\n         \"isExclusive\": false,\n         \"numberAssignedUsers\": 32\n       },\n       {\n         \"id\": \"5808afeb4372eb19547e90cf\",\n         \"offerId\": \"58072f646237427a3687dc90\",\n         \"offerName\": \"Enterprise\",\n         \"offerDescription\": \"Rainbow Enterprise offer\",\n         \"offerTechnicalDescription\": \"Enterprise offer for BP VAD\",\n         \"sapReference\": \"3EY95003AA\",\n         \"offerReference\": \"RB-Enterprise\",\n         \"profileId\": \"57cd90ddc04fd92e232ae258\",\n         \"profileName\": \"Enterprise\",\n         \"isDefault\": false,\n         \"businessModel\": \"nb_users\",\n         \"isExclusive\": true,\n         \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n         \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n         \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n         \"creationDate\": \"2016-10-20T12:19:33.043Z\",\n         \"createdBy\": {\n             \"userId\": \"5891dd587be005b39a4ee7bf\",\n             \"loginEmail\": \"bp_fincance@bp-company.com\",\n             \"bpApplicantNumber\": \"The applicant number of the BP\" \n         },\n         \"status\": \"active\",\n         \"syncOngoing\": false,\n         \"bsSubscriptionId\": \"RB-201705005659\",\n         \"zuoraSubscriptionId\": \"2c92c0fb5ca5c5bc015ca6feafbc7995\",\n         \"maxNumberUsers\": 50,\n         \"numberAssignedUsers\": 3\n       },\n       {\n         \"id\": \"59396b2918f2e75c2bd3bb5b\",\n         \"offerId\": \"58ff3cdc5b9f3e48ad4fb906\",\n         \"offerName\": \"Conference\",\n         \"offerDescription\": \"Rainbow Conference offer\",\n         \"offerTechnicalDescription\": \"Conference offer for BP VAD\",\n         \"sapReference\": \"3EY95004AA\",\n         \"offerReference\": \"RB-Conference\",\n         \"profileId\": \"58ff3cdb5b9f3e48ad4fb903\",\n         \"profileName\": \"Conference\",\n         \"isDefault\": false,\n         \"businessModel\": \"usage\",\n         \"isExclusive\": false,\n         \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n         \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n         \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n         \"creationDate\": \"2017-06-08T15:20:09.000Z\",\n         \"createdBy\": {\n             \"userId\": \"5891dd587be005b39a4ee7bf\",\n             \"loginEmail\": \"bp_finance@bp-company.com\",\n             \"bpApplicantNumber\": \"The applicant number of the BP\" \n         },\n         \"status\": \"active\",\n         \"syncOngoing\": false,\n         \"provisioningNeeded\": [\n           {\n             \"pgiEnterpriseId\": \"testEnterpriseId\",\n             \"providerType\": \"PGI\",\n             \"provisioningOngoing\": false,\n             \"provisioningStartDate\": \"2017-06-08T15:20:16.000Z\"\n           }\n         ],\n         \"bsSubscriptionId\": \"RB-201706005824\",\n         \"zuoraSubscriptionId\": \"2c92c0fb5ca5c5d0015ca78105b93dcc\",\n         \"maxNumberUsers\": null,\n         \"numberAssignedUsers\": 9,\n         \"purchaseOrderNUmber\": \"my po\"\n       }\n    ]\n}"
                        },
                        {
                            "name": "Success-Response (format=full, BP IR):",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ],
                                    "query": [
                                        {
                                            "key": "format",
                                            "value": "small",
                                            "description": "Allows to retrieve more or less subscription details in response. <br/>- <codsmall</cod: id offerId profileId isDefault <br/>- <codmedium</cod: id offerId profileId isDefault maxNumberUsers status <br/>- <codfull</cod: all offer fields, including computed user assignment fields (numberAssignedUsers, nbAssignedBPUsers, nbLicencesAssignedToECs, ...)",
                                            "disabled": true
                                        },
                                        {
                                            "key": "showTerminated",
                                            "description": "Allows to get terminated subscriptions. By default, terminated subscription are not returned.",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`, `ldap_admin`\n\n<p>This API can be used to list all subscriptions subscribed by a company. <br/> All companies have at least a subscription to the default (free) offer. <br/> <br/> <code>superadmin</code>, <code>business_admin</code> and <code>support</code> can list subscriptions of all companies existing in Rainbow. <br/> <code>business_admin</code> can list only demo subscriptions of all companies existing in Rainbow. <br/> <code>bp_admin</code> can only list subscriptions of End Customer companies for which their bp_admin's company is the BP company. <br/> <code>bp_finance</code> can only list subscriptions of End Customer companies for which their bp_finance's company is the BP company. <br/> <code>organization_admin</code> can only list subscriptions of companies under their organisation. <br/> <code>company_admin</code> can list subscriptions only for their company. <br/> <br/> If format is full, data regarding user assignment is added for each subscription:</p> <ul>     <li> If the company owning the subscription is a BP with <code>bpType</code>=<code>IR</code> and the     subscription has <code>businessModel</code>=<code>nb_users</code>, the following fields are computed and     added to the subscription data:     <ul>         <li><code>nbBPLicences</code>: the number of licences available for this subscription (equal to <code>maxNumberUsers</code>),</li>         <li><code>nbAssignedBPUsers</code>: the number of licences assigned to BP users for this subscription,</li>         <li><code>nbLicencesAssignedToECs</code>: 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)</li>         <li><code>nbLicencesUsed</code>: the number of licences used for this subscription (equal to <code>nbAssignedBPUsers</code> + <code>nbLicencesAssignedToECs</code>)</li>         <li><code>nbFreeLicences</code>: the number of licences available for this subscription (equal to <code>nbBPLicences</code> - <code>nbLicencesUsed</code>)</li>         <li><code>numberAssignedUsers</code>: the number of licences assigned for this subscription (equal to <code>nbLicencesUsed</code>).         Added for compatibility so that in all cases this field is set.</li>     </ul>     </li>     <li>Otherwise, the following field is computed and added to the subscription data:     <ul>         <li><code>numberAssignedUsers</code>: the number of licences assigned to company users for this subscription.</li>     </ul>     </li> </ul> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions?format=full"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "\n{\n    \"data\": [\n       {\n         \"id\": \"5808b655a55a36d354f75cbe\",\n         \"offerId\": \"58079ed2041fa586e92337cd\",\n         \"offerName\": \"Essential\",\n         \"sapReference\": \"3EY95001AA\",\n         \"offerReference\": \"RB-Essential\",\n         \"profileId\": \"580777f56fbd22a442d4fb57\",\n         \"profileName\": \"Essential\",\n         \"creationDate\": \"2016-10-18T15:15:38.351Z\",\n         \"status\": \"active\",\n         \"isDefault\": true,\n         \"isExclusive\": false,\n         \"numberAssignedUsers\": 32\n       },\n       {\n         \"id\": \"5808afeb4372eb19547e90cf\",\n         \"offerId\": \"58072f646237427a3687dc90\",\n         \"offerName\": \"Enterprise\",\n         \"offerDescription\": \"Rainbow Enterprise offer\",\n         \"offerTechnicalDescription\": \"Enterprise offer for BP VAD\",\n         \"sapReference\": \"3EY95003AA\",\n         \"offerReference\": \"RB-Enterprise\",\n         \"profileId\": \"57cd90ddc04fd92e232ae258\",\n         \"profileName\": \"Enterprise\",\n         \"isDefault\": false,\n         \"businessModel\": \"nb_users\",\n         \"isExclusive\": true,\n         \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n         \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n         \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n         \"creationDate\": \"2016-10-20T12:19:33.043Z\",\n         \"createdBy\": {\n             \"userId\": \"5891dd587be005b39a4ee7bf\",\n             \"loginEmail\": \"bp_finance@bp-company.com\",\n             \"bpApplicantNumber\": \"The applicant number of the BP\" \n         },\n         \"status\": \"active\",\n         \"syncOngoing\": false,\n         \"bsSubscriptionId\": \"RB-201705005659\",\n         \"zuoraSubscriptionId\": \"2c92c0fb5ca5c5bc015ca6feafbc7995\",\n         \"maxNumberUsers\": 10,\n         \"bsSubscriptionId\": \"RB-201705005659\",\n         \"zuoraSubscriptionId\": \"2c92c0fb5ca5c5bc015ca6feafbc7995\",\n         \"bpBusinessType\":\"rainbow\",\n         \"groupName\":\"Enterprise\",\n         \"nbBPLicences\": 10,\n         \"nbAssignedBPUsers\": 1,\n         \"nbLicencesAssignedToECs\": 9,\n         \"nbLicencesUsed\": 10,\n         \"numberAssignedUsers\": 10,\n         \"nbFreeLicences\": 0\n       },\n       {\n         \"id\": \"59396b2918f2e75c2bd3bb5b\",\n         \"offerId\": \"58ff3cdc5b9f3e48ad4fb906\",\n         \"offerName\": \"Conference\",\n         \"offerDescription\": \"Rainbow Conference offer\",\n         \"offerTechnicalDescription\": \"Conference offer for BP VAD\",\n         \"sapReference\": \"3EY95004AA\",\n         \"offerReference\": \"RB-Conference\",\n         \"profileId\": \"58ff3cdb5b9f3e48ad4fb903\",\n         \"profileName\": \"Conference\",\n         \"isDefault\": false,\n         \"businessModel\": \"usage\",\n         \"isExclusive\": false,\n         \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n         \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n         \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n         \"creationDate\": \"2017-06-08T15:20:09.000Z\",\n         \"createdBy\": {\n             \"userId\": \"5891dd587be005b39a4ee7bf\",\n             \"loginEmail\": \"bp_finance@bp-company.com\",\n             \"bpApplicantNumber\": \"The applicant number of the BP\" \n         },\n         \"status\": \"active\",\n         \"syncOngoing\": false,\n         \"provisioningNeeded\": [\n           {\n             \"pgiEnterpriseId\": \"testEnterpriseId\",\n             \"providerType\": \"PGI\",\n             \"provisioningOngoing\": false,\n             \"provisioningStartDate\": \"2017-06-08T15:20:16.000Z\"\n           }\n         ],\n         \"bsSubscriptionId\": \"RB-201706005824\",\n         \"zuoraSubscriptionId\": \"2c92c0fb5ca5c5d0015ca78105b93dcc\",\n         \"bpBusinessType\":\"conference_payg\",\n         \"groupName\":\"Conference\",\n         \"maxNumberUsers\": null,\n         \"numberAssignedUsers\": 9\n       }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Get company subscriptions counters",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/counters",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                "counters"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`\n\n<p>This API can be used to list counters regarding all offers subscribed by a BP company and its customers / resellers. <br/> This API can only be used for BP companies (whatever the bpType). <br/> <br/> For each subscribed offer, this API returns:</p> <ul>     <li>the number of licences bought:</li>     <ul>         <li>myCompanyNbLicences: the number of licences bought by the BP company itself</li>         <li>myCustomersNbLicences: the number of licences bought by the BP company's EC companies</li>         <li>myResellersNbLicences: if the BP company is a VAD, the number of licences bought by all its         BP IR companies and all the EC companies of these BP IR companies.</li>     </ul>     <li>the number of licences assigned to users:</li>     <ul>         <li>myCompanyNumberAssignedUsers: the number of licences assigned to users of the BP company itself</li>         <li>myCustomersNumberAssignedUsers: the number of licences assigned to users of the BP company's EC companies</li>         <li>myResellersNumberAssignedUsers: if the BP company is a VAD, the number of users assigned to all of its         BP IR companies and all of the EC companies of these BP IR companies.</li>     </ul> </ul> <br/> <br/> Warning: for now, this API doesn't count the number of licences for prepaid offers for BP IR (myResellersNbLicences)"
                    },
                    "response": [
                        {
                            "name": "Success-Response (format=full):",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/counters",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        "counters"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`\n\n<p>This API can be used to list counters regarding all offers subscribed by a BP company and its customers / resellers. <br/> This API can only be used for BP companies (whatever the bpType). <br/> <br/> For each subscribed offer, this API returns:</p> <ul>     <li>the number of licences bought:</li>     <ul>         <li>myCompanyNbLicences: the number of licences bought by the BP company itself</li>         <li>myCustomersNbLicences: the number of licences bought by the BP company's EC companies</li>         <li>myResellersNbLicences: if the BP company is a VAD, the number of licences bought by all its         BP IR companies and all the EC companies of these BP IR companies.</li>     </ul>     <li>the number of licences assigned to users:</li>     <ul>         <li>myCompanyNumberAssignedUsers: the number of licences assigned to users of the BP company itself</li>         <li>myCustomersNumberAssignedUsers: the number of licences assigned to users of the BP company's EC companies</li>         <li>myResellersNumberAssignedUsers: if the BP company is a VAD, the number of users assigned to all of its         BP IR companies and all of the EC companies of these BP IR companies.</li>     </ul> </ul> <br/> <br/> Warning: for now, this API doesn't count the number of licences for prepaid offers for BP IR (myResellersNbLicences)"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n   \"data\": [\n       {\n           \"offerId\": \"58079ed2041fa586e92337cd\",\n           \"offerName\": \"Essential\",\n           \"offerReference\": \"RB-Essential\",\n           \"sapReference\": \"3EY95100AA\",\n           \"businessModel\": null,\n           \"isDefault\": true,\n           \"canBeSold\": false,\n           \"isDemo\": false,\n           \"isExclusive\": false,\n           \"isPrepaid\": null,\n           \"prepaidDuration\": null,\n           \"isBundle\": false,\n           \"hasConference\": false,\n           \"hasVoice\": false,\n           \"myCompanyNbLicences\": 0,\n           \"myCompanyNumberAssignedUsers\": 3,\n           \"myResellersNbLicences\": 0,\n           \"myResellersNumberAssignedUsers\": 6,\n           \"totalNbLicences\": 0,\n           \"totalNumberAssignedUsers\": 9\n       },\n       {\n           \"offerId\": \"58ff3cdc5b9f3e48ad4fb905\",\n           \"offerName\": \"Enterprise\",\n           \"offerReference\": \"RB-Enterprise\",\n           \"sapReference\": \"3EY95102AA\",\n           \"businessModel\": \"nb_users\",\n           \"isDefault\": false,\n           \"canBeSold\": true,\n           \"isDemo\": false,\n           \"isExclusive\": true,\n           \"isPrepaid\": false,\n           \"prepaidDuration\": null,\n           \"isBundle\": false,\n           \"hasConference\": false,\n           \"hasVoice\": false,\n           \"groupName\":\"Enterprise\",\n           \"myCompanyNbLicences\": 10,\n           \"myResellersNbLicences\": 82,\n           \"totalNbLicences\": 92,\n           \"totalNumberAssignedUsers\": 0\n       },\n       {\n           \"offerId\": \"58da6f083b66b9584c1d1ee0\",\n           \"offerName\": \"Business\",\n           \"offerReference\": \"RB-Business\",\n           \"sapReference\": \"3EY95002AA\",\n           \"businessModel\": \"nb_users\",\n           \"isDefault\": false,\n           \"canBeSold\": true,\n           \"isDemo\": false,\n           \"isExclusive\": true,\n           \"isPrepaid\": null,\n           \"prepaidDuration\": null,\n           \"isBundle\": false,\n           \"hasConference\": false,\n           \"hasVoice\": false,\n           \"groupName\":\"Business\",\n           \"myCompanyNbLicences\": 20,\n           \"myResellersNbLicences\": 86,\n           \"totalNbLicences\": 106,\n           \"totalNumberAssignedUsers\": 9\n       },\n       {\n           \"offerId\": \"599eb9fa7b8e74830998617e\",\n           \"offerName\": \"Enterprise Demo\",\n           \"offerReference\": \"RB-Enterprise\",\n           \"sapReference\": \"3EY95003AA\",\n           \"businessModel\": \"nb_users\",\n           \"isDefault\": false,\n           \"canBeSold\": false,\n           \"isDemo\": true,\n           \"isExclusive\": true,\n           \"isPrepaid\": false,\n           \"prepaidDuration\": null,\n           \"isBundle\": false,\n           \"hasConference\": false,\n           \"hasVoice\": false,\n           \"groupName\":\"Enterprise\",\n           \"myCompanyNbLicences\": 25,\n           \"myCompanyNumberAssignedUsers\": 1,\n           \"myResellersNbLicences\": 10,\n           \"totalNbLicences\": 35,\n           \"totalNumberAssignedUsers\": 1\n       },\n       {\n           \"offerId\": \"58ff3cdc5b9f3e48ad4fb906\",\n           \"offerName\": \"Conference\",\n           \"offerReference\": \"RB-Conference\",\n           \"sapReference\": \"3EY95004AA\",\n           \"businessModel\": \"usage\",\n           \"isDefault\": false,\n           \"canBeSold\": true,\n           \"isDemo\": false,\n           \"isExclusive\": false,\n           \"isPrepaid\": false,\n           \"isBundle\": false,\n           \"hasConference\": true,\n           \"hasVoice\": false,\n           \"myCompanyNumberAssignedUsers\": 1,\n           \"myResellersNumberAssignedUsers\": 3,\n           \"totalNbLicences\": 0,\n           \"totalNumberAssignedUsers\": 4\n       },\n       {\n           \"offerId\": \"59b7f58c3c43dba62752b489\",\n           \"offerName\": \"Early adopter\",\n           \"offerReference\": \"RB-Beta\",\n           \"sapReference\": \"3EY95001AA\",\n           \"businessModel\": \"nb_users\",\n           \"isDefault\": false,\n           \"canBeSold\": false,\n           \"isDemo\": false,\n           \"isExclusive\": false,\n           \"isPrepaid\": false,\n           \"isBundle\": false,\n           \"hasConference\": false,\n           \"hasVoice\": false,\n           \"myCompanyNbLicences\": 10,\n           \"myCompanyNumberAssignedUsers\": 1,\n           \"totalNbLicences\": 10,\n           \"totalNumberAssignedUsers\": 1\n       }\n   ]\n}"
                        }
                    ]
                },
                {
                    "name": "Get default company subscription",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/default",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                "default"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to get default subscription of a company (i.e. subscription to default Rainbow offer). <br/> <br/> <code>superadmin</code>, <code>business_admin</code> and <code>support</code> can get default subscription of all companies existing in Rainbow. <br/> <code>bp_admin</code> can only get default subscription of End Customer companies for which their bp_admin's company is the BP company. <br/> <code>bp_finance</code> can only get default subscription of End Customer companies for which their bp_finance's company is the BP company. <br/> <code>organization_admin</code> can only get default subscription of companies under their organisation. <br/> <code>company_admin</code> can get default subscription only for their company. <br/> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/default</p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/default",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        "default"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to get default subscription of a company (i.e. subscription to default Rainbow offer). <br/> <br/> <code>superadmin</code>, <code>business_admin</code> and <code>support</code> can get default subscription of all companies existing in Rainbow. <br/> <code>bp_admin</code> can only get default subscription of End Customer companies for which their bp_admin's company is the BP company. <br/> <code>bp_finance</code> can only get default subscription of End Customer companies for which their bp_finance's company is the BP company. <br/> <code>organization_admin</code> can only get default subscription of companies under their organisation. <br/> <code>company_admin</code> can get default subscription only for their company. <br/> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/default</p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": {\n     \"id\": \"5808b655a55a36d354f75cbe\",\n     \"offerId\": \"58079ed2041fa586e92337cd\",\n     \"offerName\": \"Essential\",\n     \"sapReference\": \"3EY95001AA\",\n     \"offerReference\": \"RB-Essential\",\n     \"profileId\": \"580777f56fbd22a442d4fb57\",\n     \"profileName\": \"Essential\",\n     \"isDefault\": true,\n     \"isExclusive\": false,\n     \"creationDate\": \"2016-10-18T15:15:38.351Z\",\n     \"status\": \"active\",\n     \"numberAssignedUsers\": 32\n  }\n}"
                        }
                    ]
                },
                {
                    "name": "List prepaid subscriptions expiring soon",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/prepaid",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                "prepaid"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                }
                            ],
                            "query": [
                                {
                                    "key": "days",
                                    "description": "If provided, API will return prepaid subscriptions expiring in the next given days. If not provided, default value is 45 days",
                                    "disabled": true
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_finance`, `company_admin`\n\n<p>This API can be used to list prepaid subscriptions ending soon <br/> <br/> <code>superadmin</code> and <code>support</code> can list prepaid subscriptions of any company(ies) existing in Rainbow. <br/> <code>bp_finance</code> can only list prepaid subscriptions of End Customer companies linked to their BP company. <br/> <code>company_admin</code> can only list prepaid subscriptions of his own End Customer company. <br/> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/prepaid</p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/prepaid",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        "prepaid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        }
                                    ],
                                    "query": [
                                        {
                                            "key": "days",
                                            "description": "If provided, API will return prepaid subscriptions expiring in the next given days. If not provided, default value is 45 days",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_finance`, `company_admin`\n\n<p>This API can be used to list prepaid subscriptions ending soon <br/> <br/> <code>superadmin</code> and <code>support</code> can list prepaid subscriptions of any company(ies) existing in Rainbow. <br/> <code>bp_finance</code> can only list prepaid subscriptions of End Customer companies linked to their BP company. <br/> <code>company_admin</code> can only list prepaid subscriptions of his own End Customer company. <br/> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/prepaid</p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": [\n      {\n          \"companyId\": \"5bf2b670e93dafdf3dd4c462\",\n          \"companyName\": \"BP_Bundle_Company\",\n          \"offerReference\": \"RB-Enterprise-Conf-1Y\",\n          \"offerName\": \"Enterprise Conference\",\n          \"autoRenew\": true,\n          \"expirationDate\": \"2019-12-01T00:00:00.000Z\"\n      },\n      {\n          \"companyId\": \"5bf2b729e93dafdf3dd4c468\",\n          \"companyName\": \"EC_Bundle_Company\",\n          \"offerReference\": \"RB-Enterprise-Conf-1Y\",\n          \"offerName\": \"Enterprise Conference\",\n          \"autoRenew\": true,\n          \"expirationDate\": \"2019-12-01T00:00:00.000Z\"\n      }\n   ]\n}"
                        }
                    ]
                },
                {
                    "name": "List users being assigned to a given subscription",
                    "request": {
                        "method": "GET",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId/users",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                ":subscriptionId",
                                "users"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                },
                                {
                                    "key": "subscriptionId",
                                    "description": "Company subscription unique identifier."
                                }
                            ],
                            "query": [
                                {
                                    "key": "limit",
                                    "value": "100",
                                    "description": "Allow to specify the number of users to retrieve.",
                                    "disabled": true
                                },
                                {
                                    "key": "offset",
                                    "description": "Allow to specify the position of first user to retrieve (first user if not specified). Warning: if offset &gt; total, no results are returned.",
                                    "disabled": true
                                },
                                {
                                    "key": "sortField",
                                    "value": "displayName",
                                    "description": "Sort user list based on the given field.",
                                    "disabled": true
                                },
                                {
                                    "key": "sortOrder",
                                    "value": "1",
                                    "description": "Specify order when sorting user list.",
                                    "disabled": true
                                },
                                {
                                    "key": "format",
                                    "value": "small",
                                    "description": "Allows to retrieve more or less user details in response. <u <l<codsmall</cod: id, loginEmail, firstName, lastName, displayName, companyId, companyName, isTerminated</l <l<codmedium</cod: id, loginEmail, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode</l <l<codfull</cod: all user fields</l </u",
                                    "disabled": true
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {},
                        "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to list users having a given subscription in their profile <br/> <br/> <code>superadmin</code> and <code>support</code> can get users attached to any company subscriptions existing in Rainbow. <br/> <code>bp_admin</code> can only retrieve users attached to subscriptions of End Customer companies linked to their BP company. <br/> <code>bp_finance</code> can only retrieve users attached to subscriptions of End Customer companies linked to their BP company. <br/> <code>organization_admin</code> can only retrieve users attached to subscriptions of companies under their organisation. <br/> <code>company_admin</code> can only retrieve users attached to subscriptions of their company. <br/> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/5808afeb4372eb19547e90cf/users</p>"
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId/users",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        ":subscriptionId",
                                        "users"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        },
                                        {
                                            "key": "subscriptionId",
                                            "description": "Company subscription unique identifier."
                                        }
                                    ],
                                    "query": [
                                        {
                                            "key": "limit",
                                            "value": "100",
                                            "description": "Allow to specify the number of users to retrieve.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "offset",
                                            "description": "Allow to specify the position of first user to retrieve (first user if not specified). Warning: if offset &gt; total, no results are returned.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "sortField",
                                            "value": "displayName",
                                            "description": "Sort user list based on the given field.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "sortOrder",
                                            "value": "1",
                                            "description": "Specify order when sorting user list.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "format",
                                            "value": "small",
                                            "description": "Allows to retrieve more or less user details in response. <u <l<codsmall</cod: id, loginEmail, firstName, lastName, displayName, companyId, companyName, isTerminated</l <l<codmedium</cod: id, loginEmail, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode</l <l<codfull</cod: all user fields</l </u",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {},
                                "description": "Required role(s): `business_admin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to list users having a given subscription in their profile <br/> <br/> <code>superadmin</code> and <code>support</code> can get users attached to any company subscriptions existing in Rainbow. <br/> <code>bp_admin</code> can only retrieve users attached to subscriptions of End Customer companies linked to their BP company. <br/> <code>bp_finance</code> can only retrieve users attached to subscriptions of End Customer companies linked to their BP company. <br/> <code>organization_admin</code> can only retrieve users attached to subscriptions of companies under their organisation. <br/> <code>company_admin</code> can only retrieve users attached to subscriptions of their company. <br/> <br/> Example: GET https://openrainbow.com/api/rainbow/subscription/v1.0/companies/569ce8c8f9336c471b98eda1/subscriptions/5808afeb4372eb19547e90cf/users</p>"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n  \"data\": [\n    {\n        \"id\": \"56c5c19f94141765119f896c\",\n        \"loginEmail\": \"user1@company.com\",\n        \"firstName\": \"Firstname\",\n        \"lastName\": \"Lastname\",\n        \"displayName\": \"Firstname Lastname\",\n        \"companyId\": \"569ce8c8f9336c471b98eda1\",\n        \"companyName\": \"My company\",\n        \"isTerminated\": false\n    },\n    {\n        \"id\": \"56c5cb38e8078d7512c43985\",\n        \"loginEmail\": \"user2@company.com\",\n        \"firstName\": \"Firstname\",\n        \"lastName\": \"Lastname\",\n        \"displayName\": \"Firstname Lastname\",\n        \"companyId\": \"569ce8c8f9336c471b98eda1\",\n        \"companyName\": \"My company\",\n        \"isTerminated\": false\n    }\n  ],\n  \"total\": 2,\n  \"limit\": 100,\n  \"offset\": 0\n}"
                        }
                    ]
                },
                {
                    "name": "Update a subscription",
                    "request": {
                        "method": "PUT",
                        "url": {
                            "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId",
                            "host": [
                                "{{SubscriptionPortalServer}}"
                            ],
                            "path": [
                                "api",
                                "rainbow",
                                "subscription",
                                "v1.0",
                                "companies",
                                ":companyId",
                                "subscriptions",
                                ":subscriptionId"
                            ],
                            "variable": [
                                {
                                    "key": "companyId",
                                    "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                },
                                {
                                    "key": "subscriptionId",
                                    "description": "Company subscription unique identifier."
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "accept",
                                "name": "accept",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            },
                            {
                                "key": "content-type",
                                "name": "content-type",
                                "value": "application/json",
                                "description": "application/json",
                                "type": "text",
                                "disabled": false
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"maxNumberUsers\": 100,\n    \"renewalTermOption\": \"initial\",\n    \"prepaidRenewalOption\": \"allocated\"\n}"
                        },
                        "description": "Required role(s): `business_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to update a given company subscription. <br/> <br/> Currently only <code>maxNumberUsers</code> can be updated, so update is restricted to subscriptions linked to offers having businessModel <code>nb_users</code>. <br/> Now also <code>autoRenew</code> can be updated using this API. In this case, update is limited to subscriptions to prepaid offers <br/> <br/> The subscription can only be updated if it is not synchronizing with Business Store and Zuora (i.e. <code>syncOngoing</code> must be equal to false). <br/> <br/> If BP company have <code>resell</code> businessModel, his bpApplicantNumber must exist in Business Store (i.e. API <a href=\"#api-companies-subscription_CheckApplicantNumber\">GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber}</a> must return true). <br/> Note: BP IR companies should not have a bpApplicantNumber, as they don't pay directly ALE (their BP VAD does). <br/> <br/> <code>business_admin</code> 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. <br/> <code>bp_finance</code> can only update subscriptions for End Customer companies for which the bp_finance's company is the BP company. <br/> <code>company_admin</code> 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). <br/> <code>bp_admin</code> or <code>bp_finance</code> can forbid administrators of his End Customer companies to:</p> <ul>     <li>update subscriptions (company flag <code>adminHasRightToUpdateSubscriptions</code>),</li>     <li>decrease <code>maxNumberUsers</code> of his subscriptions (company flag <code>adminAllowedUpdateSubscriptionsOps</code> set to <code>increase_only</code>),</li> </ul> <br/> <code>maxNumberUsers</code> of subscriptions to prepaid offers can be <b>increase</b> to any value. <br/> <code>maxNumberUsers</code> of subscriptions to prepaid offers can be <b>decreased</b> 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. <br/> <code>maxNumberUsers</code> of monthly subscriptions can be <b>increase</b> to any value. <br/> <code>maxNumberUsers</code> of monthly subscriptions can only be <b>decreased</b> 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 <a href=\"/admin/#api-users_profiles-admin_users_DeleteUserProfiles\">DELETE /api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}</a>. <br/> <br/> When the subscription is updated, 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: <pre><code class=\"language-html\">&lt;message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"           type=\"management\"           from=\"pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532\"           to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"           xmlns=\"jabber:client\"&gt;      &lt;companysubscription xmlns=\"jabber:iq:configuration\" subscriptionId=\"5808afeb4372eb19547e90cf\"          companyId=\"58bd63d5dc5ef5eb3fe154c0\" action=\"update\"&gt;          &lt;offerId&gt;58072f646237427a3687dc90&lt;/offerId&gt;          &lt;offerName&gt;Enterprise&lt;/offerName&gt;          &lt;profileId&gt;57cd90ddc04fd92e232ae258&lt;/profileId&gt;          &lt;profileName&gt;Enterprise&lt;/profileName&gt;          &lt;status&gt;active&lt;/status&gt;          &lt;syncOngoing&gt;true&lt;/syncOngoing&gt;          &lt;maxNumberUsers&gt;50&lt;/maxNumberUsers&gt;      &lt;/companysubscription&gt; &lt;/message&gt;</code></pre> <br/> <br/> The <code>syncOngoing</code> 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. <br/> Once the synchronization is done, all company_admin, bp_admin and bp_finance will receive the same XMPP message with the value <code>syncOngoing</code> equal to false."
                    },
                    "response": [
                        {
                            "name": "Success-Response:",
                            "originalRequest": {
                                "method": "PUT",
                                "url": {
                                    "raw": "{{SubscriptionPortalServer}}/api/rainbow/subscription/v1.0/companies/:companyId/subscriptions/:subscriptionId",
                                    "host": [
                                        "{{SubscriptionPortalServer}}"
                                    ],
                                    "path": [
                                        "api",
                                        "rainbow",
                                        "subscription",
                                        "v1.0",
                                        "companies",
                                        ":companyId",
                                        "subscriptions",
                                        ":subscriptionId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "companyId",
                                            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)"
                                        },
                                        {
                                            "key": "subscriptionId",
                                            "description": "Company subscription unique identifier."
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "accept",
                                        "name": "accept",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    },
                                    {
                                        "key": "content-type",
                                        "name": "content-type",
                                        "value": "application/json",
                                        "description": "application/json",
                                        "type": "text",
                                        "disabled": false
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"maxNumberUsers\": 100,\n    \"renewalTermOption\": \"initial\",\n    \"prepaidRenewalOption\": \"allocated\"\n}"
                                },
                                "description": "Required role(s): `business_admin`, `bp_finance`, `organization_admin`, `company_admin`\n\n<p>This API can be used to update a given company subscription. <br/> <br/> Currently only <code>maxNumberUsers</code> can be updated, so update is restricted to subscriptions linked to offers having businessModel <code>nb_users</code>. <br/> Now also <code>autoRenew</code> can be updated using this API. In this case, update is limited to subscriptions to prepaid offers <br/> <br/> The subscription can only be updated if it is not synchronizing with Business Store and Zuora (i.e. <code>syncOngoing</code> must be equal to false). <br/> <br/> If BP company have <code>resell</code> businessModel, his bpApplicantNumber must exist in Business Store (i.e. API <a href=\"#api-companies-subscription_CheckApplicantNumber\">GET /api/rainbow/subscription/v1.0/companies/check-applicant-number/{bpApplicantNumber}</a> must return true). <br/> Note: BP IR companies should not have a bpApplicantNumber, as they don't pay directly ALE (their BP VAD does). <br/> <br/> <code>business_admin</code> 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. <br/> <code>bp_finance</code> can only update subscriptions for End Customer companies for which the bp_finance's company is the BP company. <br/> <code>company_admin</code> 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). <br/> <code>bp_admin</code> or <code>bp_finance</code> can forbid administrators of his End Customer companies to:</p> <ul>     <li>update subscriptions (company flag <code>adminHasRightToUpdateSubscriptions</code>),</li>     <li>decrease <code>maxNumberUsers</code> of his subscriptions (company flag <code>adminAllowedUpdateSubscriptionsOps</code> set to <code>increase_only</code>),</li> </ul> <br/> <code>maxNumberUsers</code> of subscriptions to prepaid offers can be <b>increase</b> to any value. <br/> <code>maxNumberUsers</code> of subscriptions to prepaid offers can be <b>decreased</b> 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. <br/> <code>maxNumberUsers</code> of monthly subscriptions can be <b>increase</b> to any value. <br/> <code>maxNumberUsers</code> of monthly subscriptions can only be <b>decreased</b> 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 <a href=\"/admin/#api-users_profiles-admin_users_DeleteUserProfiles\">DELETE /api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}</a>. <br/> <br/> When the subscription is updated, 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: <pre><code class=\"language-html\">&lt;message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"           type=\"management\"           from=\"pcloud_subscription_1@openrainbow.com/172440802160413612281463752830017532\"           to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"           xmlns=\"jabber:client\"&gt;      &lt;companysubscription xmlns=\"jabber:iq:configuration\" subscriptionId=\"5808afeb4372eb19547e90cf\"          companyId=\"58bd63d5dc5ef5eb3fe154c0\" action=\"update\"&gt;          &lt;offerId&gt;58072f646237427a3687dc90&lt;/offerId&gt;          &lt;offerName&gt;Enterprise&lt;/offerName&gt;          &lt;profileId&gt;57cd90ddc04fd92e232ae258&lt;/profileId&gt;          &lt;profileName&gt;Enterprise&lt;/profileName&gt;          &lt;status&gt;active&lt;/status&gt;          &lt;syncOngoing&gt;true&lt;/syncOngoing&gt;          &lt;maxNumberUsers&gt;50&lt;/maxNumberUsers&gt;      &lt;/companysubscription&gt; &lt;/message&gt;</code></pre> <br/> <br/> The <code>syncOngoing</code> 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. <br/> Once the synchronization is done, all company_admin, bp_admin and bp_finance will receive the same XMPP message with the value <code>syncOngoing</code> equal to false."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [],
                            "body": "{\n    \"data\": {\n        \"id\": \"5808afeb4372eb19547e90cf\",\n        \"offerId\": \"58072f646237427a3687dc90\",\n        \"offerName\": \"Enterprise\",\n        \"offerDescription\": \"Rainbow Enterprise offer\",\n        \"offerTechnicalDescription\": \"Enterprise offer for BP VAD\",\n        \"sapReference\": \"3EY95003AA\",\n        \"offerReference\": \"RB-Enterprise\",\n        \"profileId\": \"57cd90ddc04fd92e232ae258\",\n        \"profileName\": \"Enterprise\",\n        \"isDefault\": false,\n        \"businessModel\": \"nb_users\",\n        \"isExclusive\": true,\n        \"zuoraOfferId\": \"2c92c0f95a6b227b015a84cd5d087031\",\n        \"zuoraProductRatePlanId\": \"2c92c0f95a6b227b015a84cd5d9d7043\",\n        \"zuoraProductRatePlanChargeId\": \"2c92c0f95a6b227b015a84cd5db67045\",\n        \"creationDate\": \"2017-03-28T12:37:37.959Z\",\n        \"createdBy\": {\n            \"userId\": \"5891dd587be005b39a4ee7bf\",\n            \"loginEmail\": \"bp_finance@bp-company.com\",\n            \"bpApplicantNumber\": \"The applicant number of the BP\"  \n        },\n        \"status\": \"active\",\n        \"syncOngoing\": true,\n        \"bsSubscriptionId\": \"RB-201705005659\",\n        \"zuoraSubscriptionId\": \"2c92c0fb5ca5c5bc015ca6feafbc7995\",\n        \"maxNumberUsers\": 50,\n        \"updatingMaxNumberUsers\": 100,\n        \"numberAssignedUsers\": 50,\n        \"bpBusinessType\": \"default\",\n        \"purchaseOrderNumber\": \"my po\"\n    }\n}"
                        }
                    ]
                }
            ]
        }
    ]
}