{
  "swagger": "2.0",
  "info": {
    "title": "Rainbow admin portal",
    "description": "# Rainbow administrator portal API guide\n\n## Preamble\n\n### Introduction\n\nThis guide describes list of API services that are provided by OT Rainbow management portal system. Services are used to manage OT Rainbow system entities\n\n### Protocol\n\nREST interface is used for sending/receiving OT rainbow API messages. HTTP requests GET, DELETE, POST, UPDATE are used. Standard HTTP responses are used to provide requested information or error status. There is no session notion in OT Rainbow system, so requests could be issued according stateless model, without transport conservation between them. Additional data could be provided in message body. JSON is used as a main format for data encoding in message body part. Each request is started with the following pattern /{module}/{version}/ where {module} is a portal module name to address and {version} is a version of used API, par example, “v1.0”.\n\n### Security considerations\n\nEach request should contain some credential information to authenticate itself. Standard HTTP authentication with basic/bearer modes is used. JSON Web Token mechanism is used to provide authentication information. JWT has a expire timeout that is controlled by OT Rainbow portal to prevent very long token usage. Also authentication with application token is used. The token must be provided in the request HTTP header, using a custom header: APIKey. At server side, token is verified, and if it doesn’t match, 403 Not Allowed response is sent. TLS is used as a transport protocol to support message exchanges between OT Rainbow portal and an application.\n\n",
    "version": "1.82.0",
    "x-logo": {
      "url": "https://hub.openrainbow.com/img/logohub.svg",
      "backgroundColor": "#ff4900"
    }
  },
  "paths": {
    "/api/rainbow/admin/v1.0/bots/{botId}": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Get a bot service data.",
        "description": "",
        "operationId": "admin_bots_GetBotId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "description": "Bot Service unique identifier (like 578bb08dc0d8c107725ef8c4)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_bots_GetBotIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "578bd3ad01583d8c09a9bfc9",
                  "latin_name": "emily jolie",
                  "name": "Emily Jolie",
                  "jid": "rainbowland.fr",
                  "createdByUserId": "573f189f774e0a428ee813a3",
                  "createdByLoginEmail": "superadmin@openrainbow.org"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Bot Service with id 5783d15233c9426b54daad41 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "put": {
        "tags": [
          "Bots"
        ],
        "summary": "Update a bot service.",
        "description": "",
        "operationId": "admin_bots_putBots",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "description": "Bot service unique identifier (like 578bb08dc0d8c107725ef8c4)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_bots_putBots"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_bots_putBotsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "578bd3ad01583d8c09a9bfc9",
                  "latin_name": "emily jolie",
                  "name": "Emily Jolie",
                  "jid": "rainbowland.fr",
                  "createdByUserId": "573f189f774e0a428ee813a3",
                  "createdByLoginEmail": "superadmin@openrainbow.org"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "param": "jid",
                "msg": "Invalid field jid. Expected domain name string matching the regexp: /^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\\.[a-zA-Z]{2,3})$/",
                "value": "rainbowl@and.fr",
                "errorDetailsCode": 400000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Bot service - name Emily Jolie with jid = wonderland.fr already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Bots"
        ],
        "summary": "Delete a bot service.",
        "description": "",
        "operationId": "admin_bots_deleteBots",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "botId",
            "in": "path",
            "description": "Bot service unique identifier (like 578bb08dc0d8c107725ef8c4)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_bots_deleteBotsSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Bot service 578bb08dc0d8c107725ef8c4 successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Bot Service with id 5783d15233c9426b54daad41 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/bots": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Get all bot services.",
        "description": "This API can be used to retrieve the list of bot services whatever the service owner.",
        "operationId": "admin_bots_GetBots",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less bot services details in response.   \n- `small`: id, name, jid   \n- `medium`: id, name, jid   \n- `full`: id, name, jid, createdByUserId, createdByLoginEmail",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of bot services to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first bot to retrieve (first bot if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort bots list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting bots list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_bots_GetBotsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "Alfred",
                    "jid": "mydomain.fr",
                    "id": "578bb08dc0d8c107725ef8c4"
                  },
                  {
                    "name": "Emily Jolie",
                    "jid": "rainbowland.fr",
                    "id": "578bd3ad01583d8c09a9bfc9"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "post": {
        "tags": [
          "Bots"
        ],
        "summary": "Create a bot service.",
        "description": "Rainbow superadmin can create/delete bot services. [todo - TBC]",
        "operationId": "admin_bots_postBots",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_bots_postBots"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_bots_postBotsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "578bd3ad01583d8c09a9bfc9",
                  "latin_name": "emily jolie",
                  "name": "Emily Jolie",
                  "jid": "rainbowland.fr",
                  "createdByUserId": "573f189f774e0a428ee813a3",
                  "createdByLoginEmail": "superadmin@openrainbow.org"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "param": "jid",
                "msg": "Invalid field jid. Expected domain name string matching the regexp: /^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\\.[a-zA-Z]{2,3})$/",
                "value": "rainbowl@and.fr",
                "errorDetailsCode": 400000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Bot service - name Emily Jolie with jid = wonderland.fr already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/clientsversions/{clientId}": {
      "get": {
        "tags": [
          "Clients Versions"
        ],
        "summary": "Get a clients versions data",
        "description": "Users with 'superadmin' role can retrieve all clients versions.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/clientsversions/569d0ef3ef7816921f7e94fa",
        "operationId": "GetClientsVersionsId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "App unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetClientsVersionsIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "web",
                  "id": "569ce8c8f9336c471b98eda1",
                  "version": "1.0.0"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "put": {
        "tags": [
          "Clients Versions"
        ],
        "summary": "Update a client version",
        "description": "Users with superadmin role can update any client version.  \n",
        "operationId": "PutClientsVersions",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "App unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutClientsVersions"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutClientsVersionsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "web",
                  "id": "569ce8c8f9336c471b98eda1",
                  "version": "1.0.0"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Clients Versions"
        ],
        "summary": "Delete a client version",
        "description": "",
        "operationId": "DeleteClientsVersions",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "App unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteClientsVersionsSuccess"
            },
            "examples": {
              "application/json": {
                "status": "client 569d0ef3ef7816921f7e94fa successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/clientsversions": {
      "get": {
        "tags": [
          "Clients Versions"
        ],
        "summary": "Get all clients versions",
        "description": "Users with 'superadmin' role can retrieve all clients versions.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/clientsversions?limit=100&offset=0&sortField=name&sortOrder=-1",
        "operationId": "GetClientsversions",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter sites list on field name.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of apps to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first app to retrieve (first app if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort app list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting app list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetClientsversionsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "web",
                    "id": "569ce8c8f9336c471b98eda1",
                    "version": "1.0.0"
                  },
                  {
                    "name": "sdk",
                    "id": "569ce938f9336c471b98eda2",
                    "version": "1.10.0"
                  }
                ],
                "total": 2,
                "limit": 100,
                "offset": 0
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "post": {
        "tags": [
          "Clients Versions"
        ],
        "summary": "Create a client version",
        "description": "",
        "operationId": "PostClientsVersions",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostClientsVersions"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostClientsVersionsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "web",
                  "id": "569ce8c8f9336c471b98eda1",
                  "version": "1.0.0"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/metrics": {
      "get": {
        "tags": [
          "Common"
        ],
        "summary": "Get performance metrics",
        "description": "Get portal performance metrics  \n  \nIt allows to show Node specific metrics like: \n\n* processCpuTotal\n* processStartTime\n* osMemoryHeap\n* processOpenFileDescriptors\n* processMaxFileDescriptors\n* eventLoopLag\n* processHandles\n* processRequests\n* heapSizeAndUsed\n* heapSpacesSizeAndUsed\n* version\n\nNode metrics probes are launched every 10 seconds.  \n  \nA first custom metric is available to probe portal Rest API performance (an histogram of response time)  \n  \nWhen 'content-type' header field is set to 'application/json', the result is in JSON format. For other cases the result is in text format.",
        "operationId": "GetMetrics",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain",
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json. Then the result is in JSON format. For other cases the result is in text format.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetMetricsSuccess"
            },
            "examples": {
              "text/plain": "HTTP/1.1 200 OK\n// text format\n// Node metrics\n# HELP process_cpu_user_seconds_total Total user CPU time spent in seconds.\n# TYPE process_cpu_user_seconds_total counter\nprocess_cpu_user_seconds_total 2.292 1501847794097\n\n// custom metrics\n# HELP process_cpu_system_seconds_total Total system CPU time spent in seconds.\n# TYPE process_cpu_system_seconds_total counter\nprocess_cpu_system_seconds_total 0.116 1501847794097\n..... etc\n\n# HELP http_request_duration_ms Duration of HTTP requests in ms\n# TYPE http_request_duration_ms histogram\nhttp_request_duration_ms_bucket{le=\"0.1\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"1\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"2\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"5\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"10\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"15\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"50\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"100\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"200\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"300\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"400\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"500\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 1\nhttp_request_duration_ms_bucket{le=\"1000\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3\nhttp_request_duration_ms_bucket{le=\"2000\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3\nhttp_request_duration_ms_bucket{le=\"5000\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3\nhttp_request_duration_ms_bucket{le=\"+Inf\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3\nhttp_request_duration_ms_sum{method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 1584\nhttp_request_duration_ms_count{method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3",
              "application/json": {
                "metrics": [
                  {
                    "help": "Total user CPU time spent in seconds.",
                    "name": "process_cpu_user_seconds_total",
                    "type": "counter",
                    "values": [
                      {
                        "value": 2.604,
                        "labels": {},
                        "timestamp": 1501847934116
                      }
                    ]
                  },
                  {
                    "name": "http_request_duration_ms",
                    "help": "Duration of HTTP requests in ms",
                    "type": "histogram",
                    "values": [
                      {
                        "labels": {
                          "le": 0.1,
                          "method": "GET",
                          "route": "/authentication/v1.0/login",
                          "code": 200
                        },
                        "value": 0,
                        "metricName": "http_request_duration_ms_bucket"
                      }
                    ]
                  }
                ]
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Common"
        ],
        "summary": "Clear performance metrics",
        "description": "Clear metrics",
        "operationId": "DeleteMetrics",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain",
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json. Then the result is in JSON format. For other cases the result is in text format.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteMetricsSuccess"
            },
            "examples": {
              "text/plain": "HTTP/1.1 200 OK\n// text format\nOK",
              "application/json": {
                "status": "OK"
              }
            }
          }
        }
      }
    },
    "/api/rainbow/admin/v1.0/about": {
      "get": {
        "tags": [
          "Common"
        ],
        "summary": "About admin portal",
        "description": "Get portal information (module name, version)",
        "operationId": "GetApiRainbowAdminV10About",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetApiRainbowAdminV10AboutSuccess"
            },
            "examples": {
              "application/json": {
                "version": "1.10.0",
                "description": "Rainbow Admin Portal"
              }
            }
          }
        }
      }
    },
    "/api/rainbow/pcg/v1.0/about": {
      "get": {
        "tags": [
          "Common"
        ],
        "summary": "About pcg portal",
        "description": "Get portal information (module name, version)",
        "operationId": "GetApiRainbowPcgV10About",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetApiRainbowPcgV10AboutSuccess"
            },
            "examples": {
              "application/json": {
                "version": "1.10.0",
                "description": "Rainbow Admin Portal"
              }
            }
          }
        }
      }
    },
    "/api/rainbow/ping": {
      "get": {
        "tags": [
          "Common"
        ],
        "summary": "Get admin portal status report",
        "description": "This API allows to check admin portal status.   \n  \nIf no XMPP connections are available and/or if no database connection is available, an error 503 Service Unavailable is returned.",
        "operationId": "GetApiRainbowPing",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetApiRainbowPingSuccess"
            },
            "examples": {
              "application/json": {
                "status": "OK"
              }
            }
          }
        }
      }
    },
    "/api/rainbow/logs/levels": {
      "put": {
        "tags": [
          "Common"
        ],
        "summary": "Change log level",
        "description": "Allow to change the log level of the portal. The requested log level is applied to the requested transports (console, file, syslog, ...)",
        "operationId": "PutApiRainbowLogsLevels",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutApiRainbowLogsLevels"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutApiRainbowLogsLevelsSuccess"
            },
            "examples": {
              "application/json": {
                "oldLoggerLevels": {
                  "console": "warn",
                  "syslog": "info"
                },
                "newLoggerLevels": {
                  "console": "debug",
                  "syslog": "debug"
                }
              }
            }
          }
        },
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get a company data",
        "description": "Users with 'superadmin', 'support' or 'business_admin' role can retrieve any company.   \n**Users with admin role (and not having superadmin nor support role) can only retrieve their own company and companies they manage** (case of organization_admin). They also have right to retrieve their BP company if they have one.   \n**Users with bp_admin of bp_finance role (and not having superadmin nor support role) can only retrieve their own company and companies they manage** (their EC companies). They also have right to retrieve their BP company if they have one. In the case of bp_admin or bp_finance of BP VAD companies, they can also retrieve EC companies being linked to their BP IR companies.   \n  \nIf user request his own company or a company he manages (superadmin, support, organisation admin), `numberUsers` field is returned with the number of Rainbow users being in this company.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/569d0ef3ef7816921f7e94fa",
        "operationId": "GetCompaniesId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less company details in response.   \n- `small`: id, name   \n- `medium`: id, name, status, adminEmail, companyContactId, country, website, slogan, description, size, economicActivityClassification, lastAvatarUpdateDate, lastBannerUpdateDate, avatarShape, visibility   \n- `full` for superadmin, support, business_admin, bp_admin and bp_finance: All fields, including (dataLocation)   \n- `full` for admin: All fields including BP field 'bpType' and dataLocation, but without fields (subscriptions, bsCompanyId, zuoraCompanyId, bpBusinessModel, bpApplicantNumber, bpCRDid, bpIsContractAccepted, bpContractAcceptationInfo, bpHasRightToSell, bpHasRightToConnect)",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetCompaniesIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "569ce8c8f9336c471b98eda1",
                  "creationDate": "2016-01-18T13:29:44.498Z",
                  "statusUpdatedDate": "2016-01-18T13:29:44.497Z",
                  "name": "AL-ENTERPRISE",
                  "country": "FRA",
                  "status": "active",
                  "visibility": "private",
                  "visibleBy": [
                    "56fabb217d8d3ffa3d0223f8",
                    "56d6f00441255dd54b5b61ae"
                  ],
                  "adminEmail": "admin@company.com",
                  "supportEmail": "support@company.com",
                  "userSelfRegisterEnabled": true,
                  "userSelfRegisterAllowedDomains": [
                    "@alcatel-lucent.com",
                    "@al-enterprise.com",
                    "@al-enterprise.fr",
                    "@al-enterprise.de"
                  ],
                  "slogan": "The slogan of my company",
                  "description": "A free string that describes my company",
                  "size": "1001-5000 employees",
                  "website": "http:\\/\\/enterprise.alcatel-lucent.com",
                  "organisationId": "57cd58edd341df5812bbcb71",
                  "customData": {
                    "key1": 123,
                    "key2": "a string",
                    "key3": true,
                    "key4": "an object"
                  },
                  "offerType": "premium",
                  "numberUsers": 3256,
                  "isBP": true,
                  "bpHasRightToSell": true,
                  "bpHasRightToConnect": true,
                  "dataLocation": {
                    "name": "Europe",
                    "location": "France",
                    "country": "FRA"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "business_admin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Update a company",
        "description": "Users with superadmin role can update any company. Users with admin role (and not having superadmin role) can only update their own company.   \n  \nDefault and Terminated companies can't be renamed, and their name can't be use to rename another company",
        "operationId": "PutCompanies",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutCompanies"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutCompaniesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57f3b02f551928af263d6f0a",
                  "creationDate": "2017-02-10T13:29:44.498Z",
                  "statusUpdatedDate": "2017-02-10T13:29:44.497Z",
                  "name": "A Business Partner",
                  "country": "FRA",
                  "status": "active",
                  "visibility": "public",
                  "visibleBy": [],
                  "adminEmail": "admin@bp.fr",
                  "supportEmail": "support@bp.fr",
                  "companyContactId": "5899d3dfb567f2e8104bfbe5",
                  "userSelfRegisterEnabled": false,
                  "userSelfRegisterAllowedDomains": [],
                  "description": "Description of the Business Partner",
                  "size": "51-200 employees",
                  "giphyEnabled": false,
                  "catalogId": "5979f63bae6056aadd1a8f17",
                  "isBP": true,
                  "bpType": "IR",
                  "bpBusinessModel": "resell",
                  "bpApplicantNumber": "The applicant number of my BP",
                  "bpCRDid": "The CRD id of my BP",
                  "bpHasRightToSell": true,
                  "bpHasRightToConnect": true,
                  "bpIsContractAccepted": true,
                  "bpContractAcceptationInfo": {
                    "acceptationDate": "2016-11-18T16:12:12.153Z",
                    "bpAdminId": "5703c52929778f618d5a4058",
                    "bpAdminLoginEmail": "admin@bp.fr"
                  },
                  "offerType": "premium",
                  "avatarShape": "square",
                  "customData": {
                    "key3": "Hello",
                    "key2": "vvvvv",
                    "key1": 123
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "It's not possible to set visibility 'organization' to company name 'My company'. (Detail: The visibility 'organization' can't be set when the company is not linked to an organisation)",
                "errorDetailsCode": 403212
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Companies"
        ],
        "summary": "Delete a company",
        "description": "This API allows administrators to delete a company.   \n  \nUsers with `superadmin` role can delete any company (except default and terminated companies).   \n  \nUsers with `bp_admin` or `bp_finance` role can only delete companies of their End Customers (i.e. all the companies having bpId equal to their companyId).   \n  \nUsers with `admin` role can delete companies they can manage. That is to say: \n\n* an `organization_admin` can delete companies he manages (i.e. companies having organisationId equal to his organisationId)\n* a `company_admin` can only delete his company\n\n  \nA company can be deleted only if : \n\n* it's not the default company nor the terminated company\n* in case of BP company, it's not linked to EC / BP IR companies which are not themselves terminated\n* it's not linked to site(s)\n* it has no subscription(s)\n* it's not already seen as terminated (status equal terminated)\n* there are no more users in this company (except for company_admin asking to delete his company if he is alone in it)\n\n  \nIf company has default subscriptions and/or subscriptions with status equal terminated, company won't be deleted but only disabled (status and name of company changed to terminated)   \nNote that following data linked to the company will be deleted too : \n\n* join company link(s)\n* join company invitation(s)\n* join company request(s)\n* avatar(s)\n* banner(s)\n\n",
        "operationId": "DeleteCompanies",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteCompaniesSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Company 5901d451faae4928ef13bb78 successfully disabled",
                "data": {
                  "latin_name": "ter_1495051516804_test - acme central team",
                  "name": "ter_1495051516804_test - ACME central team",
                  "bpHasRightToConnect": false,
                  "creationDate": "2017-04-27T11:21:53.003Z",
                  "statusUpdatedDate": "2017-05-17T20:05:16.947Z",
                  "subscriptions": [
                    {
                      "profileName": "Essential",
                      "profileId": "58ede0fd48ea010fe51810b8",
                      "offerName": "Essential",
                      "offerId": "58ede0fd48ea010fe51810b9",
                      "_id": "5901d451faae4928ef13bb79",
                      "creationDate": "2017-04-27T11:21:53.566Z",
                      "status": "active",
                      "isDefault": true
                    },
                    {
                      "profileName": "Business",
                      "profileId": "58fdb1c322315ea8d106fb2d",
                      "offerName": "Business",
                      "maxNumberUsers": 50,
                      "offerId": "58fdb1c622315ea8d106fb31",
                      "_id": "591581c4f018ee587daaa898",
                      "creationDate": "2017-05-12T09:35:00.926Z",
                      "status": "terminated",
                      "isDefault": false
                    }
                  ],
                  "settings": {
                    "iceServers": []
                  },
                  "joinCompanyLinks": [],
                  "visiblityRequests": [],
                  "userSelfRegisterAllowedDomains": [],
                  "userSelfRegisterEnabled": true,
                  "forceHandshake": false,
                  "visibleBy": [],
                  "visibility": "private",
                  "status": "terminated",
                  "isBP": false,
                  "organisationId": "590892c922315ea8d106fb39",
                  "offerType": "freemium",
                  "id": "5901d451faae4928ef13bb78"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get all companies",
        "description": "This API allows administrator to retrieve companies they can administrate.   \n  \nUsers with 'superadmin', 'support' or 'business_admin' role can retrieve all companies.   \n  \nUsers with admin role (and not having superadmin nor support role) can only retrieve their own company and companies they can manage, i.e.: \n\n* organisation admins can retrieve all companies being in their organisation,\n* bp admins or bp finance of BP DR or BP IR companies can retrieve their company and all of their EC companies (i.e. all companies for which their company is the BP),\n* bp admins or bp finance of BP VAD companies can retrieve their company, all of their BP IR and EC companies, and all the EC companies linked to their BP IR companies,\n* company admins and site admin can only retrieve their own company.\n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies?name=My com&format=small&limit=100&offset=0&sortField=name&sortOrder=-1\n",
        "operationId": "GetCompanies",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less company details in response.   \n- `small`: _id, name   \n- `medium`: id, name, status, adminEmail, companyContactId, country, website, slogan, description, size, economicActivityClassification, lastAvatarUpdateDate, lastBannerUpdateDate, avatarShape, visibility   \n- `full` for superadmin, support, business_admin, bp_admin and bp_finance: All fields   \n- `full` for admin: All fields except BP fields (bpType, bpBusinessModel, bpApplicantNumber, bpCRDid, bpHasRightToSell, bpHasRightToConnect, bpIsContractAccepted, bpContractAcceptationInfo)",
            "required": false,
            "type": "string"
          },
          {
            "name": "bpId",
            "in": "query",
            "description": "Allows to filter companies list on bpId field.   \nThis filter allow to get all the End Customer companies associated to a given Business Partner company.   \n  \nOnly users with role `superadmin`, `support`, `business_admin`, `bp_admin` or `bp_finance` can use this filter.   \nUsers with role `bp_admin` or `bp_finance` can use this filter on their own company.",
            "required": false,
            "type": "string"
          },
          {
            "name": "catalogId",
            "in": "query",
            "description": "Allows to filter companies list on catalogId field.   \nThis filter allow to get all the companies linked to a given catalogId.   \n  \nOnly users with role `superadmin`, `support` or `business_admin` can use this filter.",
            "required": false,
            "type": "string"
          },
          {
            "name": "offerId",
            "in": "query",
            "description": "Allows to filter companies list on companies having subscribed to the provided offerId.",
            "required": false,
            "type": "string"
          },
          {
            "name": "offerCanBeSold",
            "in": "query",
            "description": "Allows to filter companies list on companies having subscribed to offers with canBeSold=true.   \nThis filter can only be used with the value true (false is not relevant, as all companies have a subscription to Essential which has canBeSold=false, so all companies would match offerCanBeSold=false).",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "externalReference",
            "in": "query",
            "description": "Allows to filter companies list on companies based on externalReference field.   \nThe search is done on externalReference starting with the input characters, case sensitive (ex: ABC will match companies with externalReference ABC, ABCD, ABC12... ; but externalReference abc, AABC, 1ABC, ... will not match).   \n  \nOnly users with role `superadmin`, `support`, `business_admin`, `bp_admin` or `bp_finance` can use this filter.",
            "required": false,
            "type": "string"
          },
          {
            "name": "externalReference2",
            "in": "query",
            "description": "Allows to filter companies list on companies based on externalReference2 field.   \nThe search is done on externalReference2 starting with the input characters, case sensitive (ex: ABC will match companies with externalReference2 ABC, ABCD, ABC12... ; but externalReference2 abc, AABC, 1ABC, ... will not match).   \n  \nOnly users with role `superadmin`, `support`, `business_admin`, `bp_admin` or `bp_finance` can use this filter.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of companies to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first company to retrieve (first company if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort company list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting company list.",
            "required": false,
            "type": "number"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter companies list on the given keyword(s) on field name.   \n  \nThe filtering is case insensitive and on partial name match: all companies **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _comp_, companies with the following names are match the filter 'My company', 'Company', 'A comp 1', 'Comp of comps', ...",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Allows to filter companies list on the provided status(es)",
            "required": false,
            "type": "string"
          },
          {
            "name": "visibility",
            "in": "query",
            "description": "Allows to filter companies list on the provided visibility(ies)",
            "required": false,
            "type": "string"
          },
          {
            "name": "organisationId",
            "in": "query",
            "description": "Allows to filter companies list on the organisationIds provided in this option.   \n  \nThis filter can only be used if user has role(s) `superadmin`, `support`, `bp_admin` or `admin`",
            "required": false,
            "type": "string"
          },
          {
            "name": "isBP",
            "in": "query",
            "description": "Allows to filter companies list on isBP field: \n\n* true returns only Business Partner companies,\n* false return only companies which are not Business Partner.\n\n  \nThis filter can only be used if user has role(s) `superadmin`, `support`, `bp_admin` or `admin`.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "hasBP",
            "in": "query",
            "description": "Allows to filter companies list on companies being linked or not to a BP: \n\n* true returns only companies linked to a BP (BP IR companies are also returned),\n* false return only companies which are not linked to a BP.\n\n  \nThis filter can only be used if user has role(s) `superadmin`, `support` or `bp_admin`.   \nUsers with role `bp_admin` can only use this filter with value `false`.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "bpType",
            "in": "query",
            "description": "Allows to filter companies list on bpType field.   \nThis filter allow to get all the Business Partner companies from a given bpType.   \n  \nOnly users with role `superadmin`, `support` or `bp_admin` can use this filter.",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetCompaniesSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "ALE1",
                    "id": "569ce8c8f9336c471b98eda1"
                  },
                  {
                    "name": "ALE2",
                    "id": "569ce938f9336c471b98eda2"
                  }
                ],
                "total": 2,
                "limit": 100,
                "offset": 0
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "business_admin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Create a company",
        "description": "Only superadmin, BP admin, BP finance and organisation admin can create companies with this API.   \n  \nCompanies created by a `bp_admin` or a `bp_finance` (without organisation admin role) are automatically attached to his BP company (bpId set to BP company). They are created with the status `initializing`.   \nCompanies created by a `bp_admin` or a `bp_finance` having also organisation admin role can be either be created in their organisation (default) or under a BP they manage in their organization (if they provide a bpId). to his BP company (bpId set to BP company). They are created with the status `initializing`. \n\n* If BP company has `bpType` equal to `VAD`, the field `isBp` can be set to true or false: In that case, the created company will be a BP with bpType Indirect Reseller: \n  * If the field `isBp` is set to true, the company is created with isBP = true, bpType = 'IR', bpBusinessModel = 'resell' and bpHasRightToConnect = true (it will be a BP Indirect Reseller company linked to this BP VAD company, this BP IR company will be able to have his own EC companies attached to it)\n  * If the field `isBp` is set to false (or not defined), the company is created with bpId = BP companyId (it will be an End Customer company directly attached to this BP VAD company)\n  * The status of the company will be updated to `active` once the first invited bp_admin / bp_finance (invited using join company invitation with flag invitedToBeBpAdmin set to true) will join this company.\n* If BP company has `bpType` equal to `DR` or `IR`, the created company will be an End Customer company: \n  * The company is created with bpId = BP companyId\n  * The status of the company will be updated to `active` once the first invited company_admin (invited using join company invitation with flag invitedToBeCompanyAdmin set to true) will join this company.\n\n  \nCompanies created by a `Organisation admin` are automatically attached to his organisation.   \n  \n`Users` being in Default company can create their own company using API enduser/PostCompanies [POST /api/rainbow/enduser/v1.0/companies][0]  \n  \nWhen a company is created, a subscription to the Default offer is assigned to this company. All users of this company will be assigned to this default subscription when they are created or when they arrive in the company.   \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities. For us an entity is a company with the flag isCentrex=true.  \nA Company can't change the CENTREX status, when some sites are already created for it.\n\n[0]: /enduser/#api-companies-enduser_PostCompanies",
        "operationId": "PostCompanies",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostCompanies"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostCompaniesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57f3b02f551928af263d6f0a",
                  "creationDate": "2017-02-10T13:29:44.498Z",
                  "statusUpdatedDate": "2017-02-10T13:29:44.497Z",
                  "name": "A Business Partner",
                  "country": "FRA",
                  "status": "active",
                  "visibility": "public",
                  "visibleBy": [],
                  "adminEmail": "admin@bp.fr",
                  "supportEmail": "support@bp.fr",
                  "companyContactId": "5899d3dfb567f2e8104bfbe5",
                  "userSelfRegisterEnabled": false,
                  "userSelfRegisterAllowedDomains": [],
                  "description": "Description of the Business Partner",
                  "size": "51-200 employees",
                  "giphyEnabled": false,
                  "catalogId": "5979f63bae6056aadd1a8f17",
                  "isBP": true,
                  "bpType": "IR",
                  "bpBusinessModel": "resell",
                  "bpApplicantNumber": "The applicant number of my BP",
                  "bpCRDid": "The CRD id of my BP",
                  "bpHasRightToSell": true,
                  "bpHasRightToConnect": true,
                  "bpIsContractAccepted": true,
                  "bpContractAcceptationInfo": {
                    "acceptationDate": "2016-11-18T16:12:12.153Z",
                    "bpAdminId": "5703c52929778f618d5a4058",
                    "bpAdminLoginEmail": "admin@bp.fr"
                  },
                  "offerType": "premium",
                  "avatarShape": "square",
                  "customData": {
                    "key3": "Hello",
                    "key2": "vvvvv",
                    "key1": 123
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "param": "adminEmail",
                "msg": "Invalid admin email address. Expected field email being a string matching the regexp: /^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]\\{2,4\\})$/. This field is optional.",
                "value": false
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/administrators": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get company administrators",
        "description": "This API allows administrators to list users being administrator of a company.   \n  \nUsers with `superadmin`, `support` role can list administrators from any company.   \n  \nUsers with `bp_admin` or `bp_finance` role can only list administrators for companies being End Customers of their BP company (i.e. all the companies having bpId equal to their companyId).   \n  \nUsers with `admin` role can only list administrators belonging to companies they can manage. That is to say: \n\n* an organization_admin can get list administrators belonging to each companies he manages (i.e. companies having organisationId equal to his organisationId)\n* a company_admin gets list administrators being in his company\n* a site_admin gets nothing\n\n  \n  \nThis API can return more or less user information using format option in query string arguments (default is small).   \nThis API implement pagination, using limit and offset options in query string arguments (default is limit on 100 users). Result sorting can also be done using sort and order options (default is sort on displayName on ascending order).   \n  \nExamples: \n\n* basic: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5749aa51245015fe0d36e968/administrators\n* with format options: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5749aa51245015fe0d36e968/administrators?format=full\n* with pagination options: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5749aa51245015fe0d36e968/administrators?limit=10&offset=20&sortField=loginEmail&sortOrder=-1\n\n",
        "operationId": "GetCompaniesAdministrators",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of administrators is requested",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less user details in response.   \n- `small`: id, loginEmail, firstName, lastName, displayName, companyId, companyName, isTerminated   \n- `medium`: id, loginEmail, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode   \n- `full`: all user fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of users to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first user to retrieve (first user if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort user list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting user list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetCompaniesAdministratorsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "56c5c19f94141765119f896c",
                    "loginEmail": "user1@company.com",
                    "firstName": "Firstname",
                    "lastName": "Lastname",
                    "displayName": "Firstname Lastname",
                    "companyId": "569ce8c8f9336c471b98eda1",
                    "companyName": "My company",
                    "isTerminated": false
                  },
                  {
                    "id": "56c5cb38e8078d7512c43985",
                    "loginEmail": "user2@company.com",
                    "firstName": "Firstname",
                    "lastName": "Lastname",
                    "displayName": "Firstname Lastname",
                    "companyId": "569ce8c8f9336c471b98eda1",
                    "companyName": "My company",
                    "isTerminated": false
                  }
                ],
                "total": 2,
                "limit": 100,
                "offset": 0
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/service-description": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get company service description file",
        "description": "This API allows administrators to get service description pdf file uploaded by superadmin",
        "operationId": "GetCompaniesServiceDescription",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which service description file is requested",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetCompaniesServiceDescriptionSuccess"
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/app-customisation": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get company App Customisation",
        "description": "This API allows administrators to list the customisation elements of the UI for the company.   \n  \nRetrieves the application UI customisation elements (e.g. background, foreground, text or border colors) for the given company.   \nThe list of supported UI elements is the following (naming convention given from the desktop UI): \n\n* mainBackgroundColor: Background color on the side of the main pane.\n* secondBackgroundColor: Background color inside the main pane (Bubbles, meetings, Contacts...).\n* asideBackgroundColor: Background color of left pane (e.g. conversations).\n* headerBackgroundColor: Background color of top menu (The one grouping action buttons : Life, Bubbles...).\n* headerContrastedBackgroundColor: Background color of hover in top menu.\n* tabsMenuBackgroundColor: Background color of search bars and tabs.\n* footerBackgroundColor: Background color of footer bar.\n* contrastedBackgroundColor: Default color of hover in left pane.\n* activeBackgroundColor: Default color of selected item in left pane.\n* homeTopBackgroundColor: Default color of the top background in the home page.\n* homeBackgroundColor: Default color of the bottom background in the home page.\n* buttonBackgroundColor: Background color of square button.\n* mainTitlesColor: Default color of titles (Bubbles, Meetings...) and selected item in top menu.\n* contrastedTitlesColor: Default color of text in top menu.\n* contrastedTextColor: Default color of text in search bars.\n* contrastedHoverTextColor: Default hover color of text in top menu.\n* textColor: Default color of text in left menu.\n* textHoverColor: Default hover color of text in left menu.\n* textActiveColor: Default color of selected text in left menu.\n* buttonTextColor: Default color of text in square button.\n* badgeCounterColor: Background color of counters (e.g. missed calls).\n* contrastedIconColor: Default color of icon for groups contact.\n* shadowsColor: Default color of shadows in main pane.\n* asideBorderColor: Default color of border between conversation pane and main pane.\n* contrastedBordersColor: Default color of borders in top menu.\n\n",
        "operationId": "GetCompanyAppCustomisation",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of custom elements is requested.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Set company App Customisation",
        "description": "This API allows administrators to set or update the customisation elements of the UI for the company.   \n  \nThese elements (e.g. background, foreground, text or border colors) will then be available to the end user to customise graphical elements of the application's user interface.   \nSee supported element names in above GET request.   \n  \nThe whole object will replace the existing one, if found.   \nThe customisation object has some limitations: \n\n* Element name can't exceed 50 characters.\n* Element value can't exceed 50 characters.\n\n  \nExample: \n\n* PUT https://openrainbow.com/api/rainbow/admin/v1.0/companies/5749aa51245015fe0d36e968/app-customisation\n\n",
        "operationId": "SetCompanyCustomisation",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which update of customisation elements is requested.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/SetCompanyCustomisationSuccess"
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "public"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/app-feature-customisation": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get company App feature Customisation",
        "description": "This API allows administrators to list the features customisation elements for the company.   \n  \nRetrieves the application features customisation elements (e.g. conversation pane, menu pane, services) for the given company.   \nThe list of supported features elements is the following (naming convention given from the desktop): \n\n* featureConversationPane: Left pane containing conversations.\n* callContact: Button call a contact from conversations pane.\n* searchContact: Search bar in the conversations pane.\n* featureTopPane: Top pane containing the menu.\n* featureServices: Services available for the users.\n* meeting: Allow to create a meeting.\n* uploadFile: Allow user to upload a file.\n* shareFile: Allow user to share file with other user .\n* callHistory: Allow user to have a call history.\n* createBubble: Allow user to create bubble.\n\n",
        "operationId": "GetCompanyAppFeatureCustomisation",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of custom feature elements is requested.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Set company App feature Customisation",
        "description": "This API allows administrators to set or update the feature customisation elements for the company.   \n  \nThese elements (e.g. conversation pane, menu pane, services) will then be available to the end user to customise their rainbow application.   \nSee supported element names in above GET request.   \n  \nThe whole object will replace the existing one, if found.   \nThe customisation object has some limitations: \n\n* Element name can't exceed 50 characters.\n* Element value can't exceed 50 characters.\n\n  \nExample: \n\n* PUT https://openrainbow.com/api/rainbow/admin/v1.0/companies/5749aa51245015fe0d36e968/app-feature-customisation\n\n",
        "operationId": "SetCompanyFeatureCustomisation",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which update of customisation elements is requested.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/SetCompanyFeatureCustomisationSuccess"
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "public"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/default": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get default company data",
        "description": "This API allows to get the default Rainbow company.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/default",
        "operationId": "GetDefaultCompany",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less company details in response.   \n- `small`: _id, name   \n- `medium`: id, name, status, adminEmail, companyContactId, country, website, slogan, description, size, economicActivityClassification, lastAvatarUpdateDate, lastBannerUpdateDate, avatarShape   \n- `full` for superadmin and support: All fields   \n- `full` for admin: All fields except BP fields (bpType, bpBusinessModel, bpApplicantNumber, bpCRDid, bpHasRightToSell, bpHasRightToConnect, bpIsContractAccepted, bpContractAcceptationInfo)",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetDefaultCompanySuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57f3b02f551928af263d6f0a",
                  "creationDate": "2017-02-10T13:29:44.498Z",
                  "statusUpdatedDate": "2017-02-10T13:29:44.497Z",
                  "name": "A Business Partner",
                  "country": "FRA",
                  "status": "active",
                  "visibility": "public",
                  "visibleBy": [],
                  "adminEmail": "admin@bp.fr",
                  "supportEmail": "support@bp.fr",
                  "companyContactId": "5899d3dfb567f2e8104bfbe5",
                  "userSelfRegisterEnabled": false,
                  "userSelfRegisterAllowedDomains": [],
                  "description": "Description of the Business Partner",
                  "size": "51-200 employees",
                  "giphyEnabled": false,
                  "catalogId": "5979f63bae6056aadd1a8f17",
                  "isBP": true,
                  "bpType": "IR",
                  "bpBusinessModel": "resell",
                  "bpApplicantNumber": "The applicant number of my BP",
                  "bpCRDid": "The CRD id of my BP",
                  "bpHasRightToSell": true,
                  "bpHasRightToConnect": true,
                  "bpIsContractAccepted": true,
                  "bpContractAcceptationInfo": {
                    "acceptationDate": "2016-11-18T16:12:12.153Z",
                    "bpAdminId": "5703c52929778f618d5a4058",
                    "bpAdminLoginEmail": "admin@bp.fr"
                  },
                  "offerType": "premium",
                  "avatarShape": "square",
                  "customData": {
                    "key3": "Hello",
                    "key2": "vvvvv",
                    "key1": 123
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/settings/sso/{singleSignOnType}": {
      "put": {
        "tags": [
          "Companies Sso Settings"
        ],
        "summary": "Update SSO server configuration",
        "description": "This API allows to update SSO server configuration for a given company.   \n  \nUsers with `superadmin` role can update SSO server configuration of any company.   \n  \n`bp_admin` users can only update SSO server configuration for a company they manage (i.e. End Customer company for which bp_admin's company if the BP company).   \n  \n`organization_admin` users can only update SSO server configuration for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only update SSO server configuration of their own company.",
        "operationId": "PutCompanySSOSettings",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "singleSignOnType",
            "in": "path",
            "description": "authentication type (like SAML)",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutCompanySSOSettings"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Companies Sso Settings"
        ],
        "summary": "Delete an SSO server configuration",
        "description": "This API allows to delete an SSO server configuration for a given company.   \n  \nUsers with `superadmin` role can delete an SSO server configuration of any company.   \n  \n`bp_admin` users can only delete an SSO server configuration for a company they manage (i.e. End Customer company for which bp_admin's company if the BP company).   \n  \n`organization_admin` users can only delete an SSO server configuration for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only delete an SSO server configuration of their own company.",
        "operationId": "DeleteCompanySSOSettings",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "singleSignOnType",
            "in": "path",
            "description": "authentication type (like SAML)",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "content-type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/settings/sso": {
      "get": {
        "tags": [
          "Companies Sso Settings"
        ],
        "summary": "Get SSO server configuration",
        "description": "This API allows to get SSO server configuration for a given company.   \n  \nUsers with `superadmin` role can get SSO server configurationof any company.   \n  \n`bp_admin` users can only get SSO server configuration for a company they manage (i.e. End Customer company for which bp_admin's company if the BP company).   \n  \n`organization_admin` users can only get SSO server configuration for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only get SSO server configuration of their own company.",
        "operationId": "GetCompanySSOSettings",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetCompanySSOSettingsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "type": "SAML",
                    "loginUrl": "https://idp.company.com/login",
                    "logoutUrl": "https://idp.company.com/logout",
                    "certificates": [
                      "-----BEGIN CERTIFICATE-----\nMIIDBTCCAe2gAwIBAgIQ ... fO\nWLudp1M8/nn2\n-----END CERTIFICATE-----\n"
                    ],
                    "uidAttribute": "mail",
                    "enabled": false
                  }
                ]
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "post": {
        "tags": [
          "Companies Sso Settings"
        ],
        "summary": "Create SSO server configuration",
        "description": "This API allows to get SSO server configuration for a given company.   \n  \nUsers with `superadmin` role can get SSO server configuration of any company.   \n  \n`bp_admin` users can only get SSO server configuration for a company they manage (i.e. End Customer company for which bp_admin's company if the BP company).   \n  \n`organization_admin` users can only get SSO server configuration for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only get SSO server configuration of their own company.",
        "operationId": "PostCompanySSOSettings",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostCompanySSOSettings"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/avatar": {
      "post": {
        "tags": [
          "Companies Avatar"
        ],
        "summary": "Upload company's avatar",
        "description": "This API can be used to upload avatar image for a given companyId   \n  \nRules: \n\n* Avatar file has to be sent directly in http body (no JSon).\n* Only **jpeg, jpg and png** files are supported. Appropriate content-type has to be set (image/jpeg or image/png).\n* If company already has an avatar, the existing one is overwritten.\n* By default, avatar file size is limited to 4194304 bytes (4 MB) (this limit can be changed by integration team in admin portal config file).\n* When an avatar is uploaded, the field `lastAvatarUpdateDate` of the company is updated to the current date.\n\nOnly a superadmin is allowed to handle avatars for 'Default' and 'Terminated' companies.",
        "operationId": "admin_companies_postAvatar",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of administrators is requested",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_companies_postAvatarSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Avatar successfully set for company 56c5c19f94141765119f896c",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Avatar format not managed. Got file with type bmp, supported file types: jpeg,jpg,png",
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "examples": {
              "application/json": {
                "errorCode": 413,
                "errorMsg": "Request Entity Too Large",
                "errorDetails": "File too large. Max size allowed for this file is 4194304 bytes",
                "errorDetailsCode": 413000,
                "maxSize": 4194304
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Companies Avatar"
        ],
        "summary": "Delete company's avatar",
        "description": "This API can be used to delete avatar image for a given companyId.   \n  \nOnly a superadmin is allowed to handle avatars for 'Default' and 'Terminated' companies.",
        "operationId": "admin_companies_deleteAvatar",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of administrators is requested",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_companies_deleteAvatarSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Avatar successfully deleted for company 56c5c19f94141765119f896c",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "No avatar found for company 56c5c19f94141765119f896c",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/avatar/{companyId}": {
      "get": {
        "tags": [
          "Companies Avatar"
        ],
        "summary": "Get company's avatar",
        "description": "This API can be used to retrieve company's avatar (logo).   \nExample: GET https://openrainbow.com/api/avatar/56c5c19f94141765119f896c?size=128   \n  \nClients can request avatars in a given size by specifying size query string parameter.   \nAvatar file can be resized from 1px to its original resolution, with a maximum of 2048px: \n\n* If no size option is requested, avatar is returned by default with resolution of 80px.\n* Max requestable size is 2048. **If a higher resolution is requested, the default size is returned instead, i.e. 80px.**\n* Original avatars resolution can't be increased. If uploaded avatar size is 128 x 128 px, even is client request avatar with size 256, the original avatar file will be returned (128px).\n\n",
        "operationId": "admin_companies_getAvatar",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of administrators is requested",
            "required": true,
            "type": "string"
          },
          {
            "name": "size",
            "in": "query",
            "description": "Specify avatar size in pixels (square size x size).",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_companies_getAvatarSuccess"
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/banner": {
      "post": {
        "tags": [
          "Companies Banner"
        ],
        "summary": "Upload company's banner",
        "description": "This API can be used to upload banner image for a given companyId   \n  \nRules: \n\n* Banner file has to be sent directly in http body (no JSon).\n* Only **jpeg, jpg and png** files are supported. Appropriate content-type has to be set (image/jpeg or image/png).\n* If company already has a banner, the existing one is overwritten.\n* By default, banner file size is limited to 10485760 bytes (10 MB) (this limit can be changed by integration team in admin portal config file).\n* When a banner is uploaded, the field `lastBannerUpdateDate` of the company is updated to the current date.\n\nOnly a superadmin is allowed to handle banner for 'Default' and 'Terminated' companies.",
        "operationId": "admin_companies_postBanner",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of administrators is requested",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_companies_postBannerSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Banner successfully set for company 56c5c19f94141765119f896c",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Banner format not managed. Got file with type bmp, supported file types: jpeg,jpg,png",
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "examples": {
              "application/json": {
                "errorCode": 413,
                "errorMsg": "Request Entity Too Large",
                "errorDetails": "File too large. Max size allowed for this file is 10485760 bytes",
                "errorDetailsCode": 413000,
                "maxSize": 10485760
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Companies Banner"
        ],
        "summary": "Delete company's banner",
        "description": "This API can be used to delete avatar image for a given companyId.   \n  \nOnly a superadmin is allowed to handle avatars for 'Default' and 'Terminated' companies.",
        "operationId": "admin_companies_deleteBanner",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of administrators is requested",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_companies_deleteBannerSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Banner successfully deleted for company 56c5c19f94141765119f896c",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "No banner found for company 56c5c19f94141765119f896c",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/banner/{companyId}": {
      "get": {
        "tags": [
          "Companies Banner"
        ],
        "summary": "Get company's banner",
        "description": "This API can be used to retrieve company's banner in addition to the logo retrieved via /api/avatar/{companyId}.   \nExample: GET https://openrainbow.com/api/banner/56c5c19f94141765119f896c?size=128   \n  \nClients can request banners in a given size by specifying size query string parameter.   \nBanner file can be resized from 1px to its original resolution: \n\n* If no size option is requested, banner is returned by default with resolution of 80px.\n* Max requestable size is 2048. **If a higher resolution is requested, the default size is returned instead, i.e. 80px.**\n* Original banner resolution can't be increased. If uploaded banner size is 128 x 128 px, even is client request banner with size 256, the original avatar file will be returned (128px).\n\n",
        "operationId": "admin_companies_getBanner",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company for which list of administrators is requested",
            "required": true,
            "type": "string"
          },
          {
            "name": "size",
            "in": "query",
            "description": "Specify avatar size in pixels (square size x size).",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_companies_getBannerSuccess"
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/custom-data": {
      "put": {
        "tags": [
          "Companies Custom Data"
        ],
        "summary": "Manage custom data",
        "description": "This API is still working, but customData management can now be done directly\nat company creation (using API [POST /api/rainbow/admin/v1.0/companies](#api-companies-PostCompanies)\nor with a company update (using API [PUT /api/rainbow/admin/v1.0/companies/:companyId](#api-companies-PutCompanies).",
        "operationId": "PutCompaniesCustomData",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutCompaniesCustomData"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutCompaniesCustomDataSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "569ce8c8f9336c471b98eda1",
                  "customData": {
                    "key1": 123,
                    "key2": "a string",
                    "key3": true,
                    "key4": "an object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "param": "customData",
                "msg": "Invalid field customData. Expected an object with value length at most 512 char(s)"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/settings/iceservers/{iceServerId}": {
      "put": {
        "tags": [
          "Companies Settings Webrtc"
        ],
        "summary": "Update an ICE server",
        "description": "This API allows to update an existing ICE server configuration for a given company.   \n  \nUsers with `superadmin` role can update ICE servers of any company.   \n  \n`bp_admin` users can only update ICE servers for a company they manage (i.e. End Customer company for which bp_admin's company if the BP company).   \n  \n`organization_admin` users can only update ICE servers for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only update ICE servers of their own company.",
        "operationId": "PutCompanyIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "iceServerId",
            "in": "path",
            "description": "ICE server unique identifier (like 5734a186070f38215854b61f)",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutCompanyIceServers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutCompanyIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5734a186070f38215854b61f",
                  "urls": "turn:turn.1.google.com:19302",
                  "username": "alice",
                  "credential": "undeuxtroisjevaisaubois",
                  "adminUrl": "https://10.10.99.100:8080",
                  "adminLogin": "adminCoturnLogin1",
                  "adminPassword": "adminCoturnPwd1",
                  "dc": "SBG"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "urls",
                    "msg": "Field urls is mandatory."
                  },
                  {
                    "param": "urls",
                    "msg": "Field urls length must be between 1 and 255 characters."
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "ICE server with id 57347ea14a0327064fcb93fd does not exist, not able to update it.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "ICE server with Url = turn:turn.1.google.com:19302 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Companies Settings Webrtc"
        ],
        "summary": "Delete an ICE server",
        "description": "This API allows to delete an existing ICE server configuration for a given company.   \n  \nUsers with `superadmin` role can delete ICE servers of any company.   \n  \n`bp_admin` users can only delete ICE servers for a company they manage (i.e. End Customer company for which bp_admin's company if the BP company).   \n  \n`organization_admin` users can only delete ICE servers for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only delete ICE servers of their own company.",
        "operationId": "DeleteCompanyIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "iceServerId",
            "in": "path",
            "description": "ICE server unique identifier (like 5734a186070f38215854b61f)",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "content-type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteCompanyIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "status": "ICE server 5734a186070f38215854b61f successfully deleted",
                "data": []
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "ICE server with id 57347ea14a0327064fcb93fd does not exist, not able to delete it.",
                "errorDetailsCode": 404002
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/settings/iceservers": {
      "get": {
        "tags": [
          "Companies Settings Webrtc"
        ],
        "summary": "Get ICE servers",
        "description": "This API allows to get ICE servers configuration for a given company.   \n  \nUsers with `superadmin` role can get ICE servers of any company.   \n  \n`bp_admin` users can only get ICE servers for a company they manage (i.e. End Customer company for which bp_admin's company if the BP company).   \n  \n`organization_admin` users can only get ICE servers for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only get ICE servers of their own company.",
        "operationId": "GetCompanyIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GetCompanyIceServers"
            }
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetCompanyIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5734a186070f38215854b61f",
                  "urls": "turn:turn.1.google.com:19302",
                  "username": "alice",
                  "credential": "undeuxtroisjevaisaubois",
                  "adminUrl": "https://10.10.99.100:8080",
                  "adminLogin": "adminCoturnLogin1",
                  "adminPassword": "adminCoturnPwd1",
                  "dc": "SBG"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "urls",
                    "msg": "Field urls is mandatory."
                  },
                  {
                    "param": "urls",
                    "msg": "Field urls length must be between 1 and 255 characters."
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "ICE server with Url = turn:turn.1.google.com:19302 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "post": {
        "tags": [
          "Companies Settings Webrtc"
        ],
        "summary": "Create an ICE server",
        "description": "This API allows to create an ICE server configuration for a given company.   \n  \nUsers with `superadmin` role can create ICE servers of any company.   \n  \n`bp_admin` users can only create ICE servers for a company they manage (i.e. End Customer company for which bp_admin's company if the BP company).   \n  \n`organization_admin` users can only create ICE servers for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only create ICE servers of their own company.",
        "operationId": "PostCompanyIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostCompanyIceServers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostCompanyIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5734a186070f38215854b61f",
                  "urls": "turn:turn.1.google.com:19302",
                  "username": "alice",
                  "credential": "undeuxtroisjevaisaubois",
                  "adminUrl": "https://10.10.99.100:8080",
                  "adminLogin": "adminCoturnLogin1",
                  "adminPassword": "adminCoturnPwd1",
                  "dc": "SBG"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "urls",
                    "msg": "Field urls is mandatory."
                  },
                  {
                    "param": "urls",
                    "msg": "Field urls length must be between 1 and 255 characters."
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "ICE server with Url = turn:turn.1.google.com:19302 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/settings/conferences": {
      "get": {
        "tags": [
          "Companies Settings For Pstn Conferences"
        ],
        "summary": "Get PSTN Conferences settings",
        "description": "This API allows to get Conferences settings for a given company.   \n  \nUsers with `superadmin` role can get Conferences settings of any company.   \n  \n`bp_admin` and `bp_finance` users can only get Conferences settings for a company they manage.   \n  \n`organization_admin` users can only get Conferences settings for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only get Conferences settings of their own company.",
        "operationId": "GetCompanyConferenceSettings",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetCompanyConferenceSettingsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "confDialOutDisabled": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "put": {
        "tags": [
          "Companies Settings For Pstn Conferences"
        ],
        "summary": "Update conferences settings for a given company",
        "description": "This API allows to update conferences settings for a given company.   \n  \nUsers with `superadmin` role can update conferences settings of any company.   \n  \n`bp_admin` and `bp_finance` users can only update conferences settings for a company they manage   \n  \n`organization_admin` users can only update conferences settings for a company they manage (i.e. company linked to organization_admin's organization).   \n  \n`company_admin` users can only update conferences settings of their own company.",
        "operationId": "PutCompanyConferenceSettings",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutCompanyConferenceSettings"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutCompanyConferenceSettingsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "confDialOutDisabled": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "confDialOutDisabled",
                    "msg": "Field confDialOutDisabled is mandatory."
                  },
                  {
                    "param": "confDialOutDisabled",
                    "msg": "Invalid field confDialOutDisabled. Expected a boolean."
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/sites": {
      "get": {
        "tags": [
          "Companies Sites"
        ],
        "summary": "Get all sites linked with this company",
        "description": "This API allows administrator to retrieve sites linked to a given company   \n  \n`superadmin` and `support` get sites linked to all companies existing in Rainbow.   \n`bp_admin` or `bp_finance` only get sites linked to End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` only get sites linked to companies under their organization.   \n`company_admin` only get sites linked to their company.   \n`site_admin` is not allowed to use this API.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5749aa51245015fe0d36e968/sites?format=full",
        "operationId": "GetCompanySites",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less site details in response.   \n- `small`: _id, name   \n- `medium`: _id, name, status, companyId   \n- `full`: all site fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter sites list on field name.   \n  \nThe filtering is case insensitive and on partial name match: all sites **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _sit_, sites with the following names are match the filter 'My site', 'Site', 'A site 1', 'Site of company', 'Sit1', 'Sit2', ...",
            "required": false,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "Allows to filter sites list on the companyIds provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of companies to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first site to retrieve (first site if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort site list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting site list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetCompanySitesSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "ALE1",
                    "id": "569ce8c8f9336c471b98eda1"
                  },
                  {
                    "name": "ALE2",
                    "id": "569ce938f9336c471b98eda2"
                  }
                ],
                "total": 2,
                "limit": 100,
                "offset": 0
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate Organisation 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/visible-by/{otherCompanyId}": {
      "post": {
        "tags": [
          "Companies Visibility"
        ],
        "summary": "Add visibility to a given company",
        "description": "This API can be used by `superadmin`, `organization_admin`, `bp_admin` and `bp_finance` users to make company A visible by company B:   \nPOST https://openrainbow.com/api/rainbow/admin/v1.0/companies/{company_id_A}/visible-by/{company_id_B}   \n  \n`bp_admin` and `bp_finance` users can only add visibility from a company they manage to a company they manage (i.e. management of End Customers companies for which bp_admin/bp_finance's company if the BP company).   \n  \n`organization_admin` users can only add visibility from a company they manage to a company they manage (i.e. management of the visibility between companies of his organization).   \n  \nUsing this API, the visibility is given **uni-directionally**. This means that if POST /api/rainbow/admin/v1.0/companies/{company_id_B}/visible-by/{company_id_A} is not called, company B will be able to see company A but company B won't be able to see company A.   \n  \nVisibility means that: \n\n* `users` and `admins` from company B will be able to see company A using [GET /api/rainbow/enduser/v1.0/companies][0] and [GET /api/rainbow/enduser/v1.0/companies/{companyId}][1]\n* `users` and `admins` from company B will be able to see users of company A using [GET /api/rainbow/enduser/v1.0/users][2], [GET /api/rainbow/enduser/v1.0/users/:userId][3] and [GET /api/rainbow/enduser/v1.0/search][4]\nand [POST /api/rainbow/enduser/v1.0/search][5]\n\n[0]: /enduser/#api-companies-enduser_GetCompanies\n[1]: /enduser/#api-companies-enduser_GetCompaniesId\n[2]: /enduser/#api-users-enduser_GetUsers\n[3]: /enduser/#api-users-enduser_GetUsersId\n[4]: /enduser/#api-search-enduser_Search_by_GET\n[5]: /enduser/#api-search-enduser_Search_by_POST",
        "operationId": "PostCompaniesVisibility",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "otherCompanyId",
            "in": "path",
            "description": "Company unique identifier to which the visibility will be given (like 56d6f00441255dd54b5b61ae)",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostCompaniesVisibilitySuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57f3b02f551928af263d6f0a",
                  "creationDate": "2017-02-10T13:29:44.498Z",
                  "statusUpdatedDate": "2017-02-10T13:29:44.497Z",
                  "name": "A Business Partner",
                  "country": "FRA",
                  "status": "active",
                  "visibility": "public",
                  "visibleBy": [],
                  "adminEmail": "admin@bp.fr",
                  "supportEmail": "support@bp.fr",
                  "companyContactId": "5899d3dfb567f2e8104bfbe5",
                  "userSelfRegisterEnabled": false,
                  "userSelfRegisterAllowedDomains": [],
                  "description": "Description of the Business Partner",
                  "size": "51-200 employees",
                  "giphyEnabled": false,
                  "catalogId": "5979f63bae6056aadd1a8f17",
                  "isBP": true,
                  "bpType": "IR",
                  "bpBusinessModel": "resell",
                  "bpApplicantNumber": "The applicant number of my BP",
                  "bpCRDid": "The CRD id of my BP",
                  "bpHasRightToSell": true,
                  "bpHasRightToConnect": true,
                  "bpIsContractAccepted": true,
                  "bpContractAcceptationInfo": {
                    "acceptationDate": "2016-11-18T16:12:12.153Z",
                    "bpAdminId": "5703c52929778f618d5a4058",
                    "bpAdminLoginEmail": "admin@bp.fr"
                  },
                  "offerType": "premium",
                  "avatarShape": "square",
                  "customData": {
                    "key3": "Hello",
                    "key2": "vvvvv",
                    "key1": 123
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Companies Visibility"
        ],
        "summary": "Remove visibility to a given company",
        "description": "This API can be used by `superadmin`, `organization_admin`, `bp_admin` and `bp_finance` users to delete visibility between company A and company B (uni-directionally):   \nDELETE https://openrainbow.com/api/rainbow/admin/v1.0/companies/{company_id_A}/visible-by/{company_id_B}   \n  \n`bp_admin` and `bp_finance` users can only remove visibility from a company they manage with a company they manage (i.e. management of End Customers companies for which bp_admin/bp_finance's company if the BP company).   \n  \n`organization_admin` users can only remove visibility from a company they manage with a company they manage (i.e. management of the visibility between companies of his organization).   \n  \nUsing this API, the visibility is removed **uni-directionally**. This means that if company A and company B could see each other, if DELETE /api/rainbow/admin/v1.0/companies/{company_id_B}/visible-by/{company_id_A} is called, company B will no longer be able to see company A, but company A will still be able to see company B.",
        "operationId": "DeleteCompaniesVisibility",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "otherCompanyId",
            "in": "path",
            "description": "Company unique identifier to which the visibility will be given (like 56d6f00441255dd54b5b61ae)",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteCompaniesVisibilitySuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57f3b02f551928af263d6f0a",
                  "creationDate": "2017-02-10T13:29:44.498Z",
                  "statusUpdatedDate": "2017-02-10T13:29:44.497Z",
                  "name": "A Business Partner",
                  "country": "FRA",
                  "status": "active",
                  "visibility": "public",
                  "visibleBy": [],
                  "adminEmail": "admin@bp.fr",
                  "supportEmail": "support@bp.fr",
                  "companyContactId": "5899d3dfb567f2e8104bfbe5",
                  "userSelfRegisterEnabled": false,
                  "userSelfRegisterAllowedDomains": [],
                  "description": "Description of the Business Partner",
                  "size": "51-200 employees",
                  "giphyEnabled": false,
                  "catalogId": "5979f63bae6056aadd1a8f17",
                  "isBP": true,
                  "bpType": "IR",
                  "bpBusinessModel": "resell",
                  "bpApplicantNumber": "The applicant number of my BP",
                  "bpCRDid": "The CRD id of my BP",
                  "bpHasRightToSell": true,
                  "bpHasRightToConnect": true,
                  "bpIsContractAccepted": true,
                  "bpContractAcceptationInfo": {
                    "acceptationDate": "2016-11-18T16:12:12.153Z",
                    "bpAdminId": "5703c52929778f618d5a4058",
                    "bpAdminLoginEmail": "admin@bp.fr"
                  },
                  "offerType": "premium",
                  "avatarShape": "square",
                  "customData": {
                    "key3": "Hello",
                    "key2": "vvvvv",
                    "key1": 123
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/visibility/requests/{visibilityRequestId}": {
      "get": {
        "tags": [
          "Companies Visibility"
        ],
        "summary": "Get a pending visibility request",
        "description": "This API can be used by company `admin` users to retrieve a given visibility request he has received from admin of another companies (sent using API [POST /api/rainbow/admin/v1.0/notifications/emails/request-company-visibility][0]).\n\n[0]: #api-admin_notifications_emails-admin_RequestCompanyVisibility",
        "operationId": "GetPendingCompanyVisibilityReqById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "visibilityRequestId",
            "in": "path",
            "description": "VisibilityRequest unique identifier (ex: 5762bd90650506b1a7229f63). Correspond to the id sent in the url query parameters of the email received by the company administrator using API [POST /api/rainbow/admin/v1.0/notifications/emails/request-company-visibility][0]\n\n[0]: #api-admin_notifications_emails-admin_RequestCompanyVisibility",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetPendingCompanyVisibilityReqByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5762c310df37a584a80e5d99",
                  "forCompanyId": "5703c5253fd7caa18c147e91",
                  "invitingAdminId": "5762be37650506b1a7229f64",
                  "invitingAdminEmail": "admin@othercompany.com",
                  "invitedAdminId": "56c5c19f94141765119f896c",
                  "invitedAdminEmail": "admin@mycompany.com",
                  "invitingDate": "2016-06-16T17:18:55.541Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Companies Visibility"
        ],
        "summary": "Delete a pending visibility request",
        "description": "This API can be used by company `admin` users to delete a given visibility request he has received from admin of another companies (sent using API [POST /api/rainbow/admin/v1.0/notifications/emails/request-company-visibility][0]).\n\n[0]: #api-admin_notifications_emails-admin_RequestCompanyVisibility",
        "operationId": "DeletePendingCompanyVisibilityReqById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "visibilityRequestId",
            "in": "path",
            "description": "VisibilityRequest unique identifier (ex: 5762bd90650506b1a7229f63). Correspond to the id sent in the url query parameters of the email received by the company administrator using API [POST /api/rainbow/admin/v1.0/notifications/emails/request-company-visibility][0]\n\n[0]: #api-admin_notifications_emails-admin_RequestCompanyVisibility",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeletePendingCompanyVisibilityReqByIdSuccess"
            },
            "examples": {
              "application/json": {
                "status": "visibilityRequest 5762c310df37a584a80e5d99 successfully deleted",
                "data": {
                  "id": "5762c310df37a584a80e5d99",
                  "forCompanyId": "5703c5253fd7caa18c147e91",
                  "invitingAdminId": "5762be37650506b1a7229f64",
                  "invitingAdminEmail": "admin@othercompany.com",
                  "invitedAdminId": "56c5c19f94141765119f896c",
                  "invitedAdminEmail": "admin@mycompany.com",
                  "invitingDate": "2016-06-16T17:18:55.541Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/visibility/requests": {
      "get": {
        "tags": [
          "Companies Visibility"
        ],
        "summary": "Get pending visibility requests",
        "description": "This API can be used by company `admin` users to list visibility request he has received from admin of another companies (sent using API [POST /api/rainbow/admin/v1.0/notifications/emails/request-company-visibility][0]).\n\n[0]: #api-admin_notifications_emails-admin_RequestCompanyVisibility",
        "operationId": "GetPendingCompanyVisibilityReq",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetPendingCompanyVisibilityReqSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "5762c310df37a584a80e5d99",
                    "forCompanyId": "5703c5253fd7caa18c147e91",
                    "invitingAdminId": "5762be37650506b1a7229f64",
                    "invitingAdminEmail": "admin@othercompany.com",
                    "invitedAdminEmail": "admin@mycompany.com",
                    "invitedAdminId": "56c5c19f94141765119f896c",
                    "invitingDate": "2016-06-13T11:12:54.541Z"
                  },
                  {
                    "id": "574ff8f9301b38ca2990fe62",
                    "forCompanyId": "574ff5153448af6c2940f908",
                    "invitingAdminId": "5762be37650506b1a7229f64",
                    "invitingAdminEmail": "admin@othercompany.com",
                    "invitedAdminEmail": "admin@mycompany.com",
                    "invitedAdminId": "574ff57f3448af6c2940f90a",
                    "invitingDate": "2016-06-16T17:18:55.541Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/visibility/requests/{visibilityRequestId}/accept": {
      "post": {
        "tags": [
          "Companies Visibility"
        ],
        "summary": "Accept a visibility request",
        "description": "This API can be used by company `admin` users to accept a visibility request sent by the admin of another company (sent using API [POST /api/rainbow/admin/v1.0/notifications/emails/request-company-visibility][0]).   \n  \nUsing this API, the visibility is given **bi-directionally**.   \n  \nVisibility means that: \n\n* `users` and `admins` from one of these companies will be able to see the other company using [GET /api/rainbow/enduser/v1.0/companies][1] and [GET /api/rainbow/enduser/v1.0/companies/{companyId}][2]\n* `users` and `admins` from one of these companies will be able to see users of the other company using [GET /api/rainbow/enduser/v1.0/users][3], [GET /api/rainbow/enduser/v1.0/users/{userId}][4] and [GET /api/rainbow/enduser/v1.0/search][5]\nand [POST /api/rainbow/enduser/v1.0/search][6]\n\n[0]: #api-admin_notifications_emails-admin_RequestCompanyVisibility\n[1]: /enduser/#api-companies-enduser_GetCompanies\n[2]: /enduser/#api-companies-enduser_GetCompaniesId\n[3]: /enduser/#api-users-enduser_GetUsers\n[4]: /enduser/#api-users-enduser_GetUsersId\n[5]: /enduser/#api-search-enduser_Search_by_GET\n[6]: /enduser/#api-search-enduser_Search_by_POST",
        "operationId": "PostAcceptCompanyVisibilityReq",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "visibilityRequestId",
            "in": "path",
            "description": "VisibilityRequest unique identifier (ex: 5762bd90650506b1a7229f63). Correspond to the id sent in the url query parameters of the email received by the company administrator using API [POST /api/rainbow/admin/v1.0/notifications/emails/request-company-visibility][0]\n\n[0]: #api-admin_notifications_emails-admin_RequestCompanyVisibility",
            "required": true,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostAcceptCompanyVisibilityReqSuccess"
            },
            "examples": {
              "application/json": {
                "status": "visibilityRequest 56c5c19f94141765119f896c successfully accepted",
                "data": {
                  "id": "5762c310df37a584a80e5d99",
                  "forCompanyId": "5703c5253fd7caa18c147e91",
                  "invitingAdminId": "5762be37650506b1a7229f64",
                  "invitingAdminEmail": "admin@othercompany.com",
                  "invitedAdminId": "56c5c19f94141765119f896c",
                  "invitedAdminEmail": "admin@mycompany.com",
                  "invitingDate": "2016-06-16T17:18:55.541Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/filebackendstorages/{backendId}": {
      "get": {
        "tags": [
          "Filebackendstorages"
        ],
        "summary": "Get a file backend data",
        "description": "",
        "operationId": "admin_filebackendstorages_GetBackendId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "backendId",
            "in": "path",
            "description": "File backend unique identifier (like 578bb08dc0d8c107725ef8c4)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_filebackendstorages_GetBackendIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "endPoint": "http://swift.opentouch.cloud:5000/v3",
                  "tenantId": "admin",
                  "tenantName": "admin",
                  "userName": "swift",
                  "password": "MyPassword",
                  "regionName": "FR-HC1",
                  "rootStorageURL": "http://swift.opentouch.cloud:8080/v1/AUTH_ed67810be59f40ac832d260e36e2cd91",
                  "hostName": "swift.opentouch.cloud",
                  "id": "5b5b445dc9df71afb4525ead"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "File Backend Storage with id 5b5b445dc9df71afb4525eab does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "put": {
        "tags": [
          "Filebackendstorages"
        ],
        "summary": "Update a backend",
        "description": "",
        "operationId": "admin_filebackendstorages_putBots",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "backendId",
            "in": "path",
            "description": "File backend unique identifier (like 578bb08dc0d8c107725ef8c4)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_filebackendstorages_putBots"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_filebackendstorages_putBotsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "endPoint": "http://swift.opentouch.cloud:5000/v3",
                  "tenantId": "admin",
                  "tenantName": "admin",
                  "userName": "swift",
                  "password": "MyPassword",
                  "regionName": "FR-HC1",
                  "rootStorageURL": "http://swift.opentouch.cloud:8080/v1/AUTH_ed67810be59f40ac832d260e36e2cd91",
                  "hostName": "swift.opentouch.cloud",
                  "id": "5b5b445dc9df71afb4525ead"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "No File Backend Storage data provided for update. Expected optional fields: endPoint, tenantId, tenantName, userName, password, regionName, hostName, rootStorageURL",
                "errorDetailsCode": 400100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "File Backend Storage with id 5b5b445dc9df71afb4525eab does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Backend - endPoint: http://swift.opentouch.cloud:5000/v3 with hostName: swift.opentouch.cloud already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Filebackendstorages"
        ],
        "summary": "Delete a backend.",
        "description": "",
        "operationId": "admin_filebackendstorages_deleteBackends",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "backendId",
            "in": "path",
            "description": "File backend unique identifier (like 578bb08dc0d8c107725ef8c4)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_filebackendstorages_deleteBackendsSuccess"
            },
            "examples": {
              "application/json": {
                "status": "File Backend Storage 578bb08dc0d8c107725ef8c4 successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "File Backend Storage with id 5b5b445dc9df71afb4525eab does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/filebackendstorages": {
      "get": {
        "tags": [
          "Filebackendstorages"
        ],
        "summary": "Get all filebackendstorages",
        "description": "This API can be used to retrieve the list of file backend storage .",
        "operationId": "admin_filebackendstorages_GetBackends",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less file backend storage config details in response.   \n- `small`: id, hostName, regionName   \n- `medium`: id, hostName, regionName, endPoint   \n- `full`: id, hostName, regionName, endPoint, tenantId, tenantName, userName, password, rootStorageURL",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of file backend storage to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first file backend storage to retrieve (first file backend if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort file backend storage list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting backend storage list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_filebackendstorages_GetBackendsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "regionName": "BHS1",
                    "hostName": "storage.bhs1.cloud.ovh.net",
                    "id": "58861e7c9fb184a07634fc20"
                  },
                  {
                    "regionName": "FR-HC1",
                    "hostName": "swift.opentouch.cloud",
                    "id": "5b5b445dc9df71afb4525ead"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "post": {
        "tags": [
          "Filebackendstorages"
        ],
        "summary": "Create a backend",
        "description": "Rainbow File sharing leans on Openstack/Swift backends to store documents so called Objects. A Swift backend must be configured first. So that a superadmin can report the configuration using the filebackendstorages API. To give an overview of the parameters awaited, here is a short description. For more details, refer to [https://docs.openstack.org/swift/latest/index.html][0] The Swift Object Storage is defined by an endPoint. (ex: **http://swift.rainbow.rdna:5000/v3**) The Swift Object Storage system organizes data in a hierarchy, as follows: \n\n* **Account:** Represents the top-level of the hierarchy. The goal of 'filebackendstorages' api is to manage a Swift account. The account defines a namespace for containers as a container might have the same name in two different accounts.\n* **Container:** Defines a namespace for objects. An object with the same name in two different containers represents two different objects.\n* **Object:** Stores data content, such as documents, images, and so on.\n\nThe rootStorageURL indicates the beginning of the path to access to a resource. This path lead to the account. (ex: **http://swift.rainbow.rdna:8080/v1/AUTH_a67b0e12592941488a5f53189c61022d**) The resource path has the pattern **{rootStorageUrl}/{container}/{object}** For example, if the endpoint for a Swift Object Storage is **objects.mycloud.com**, the returned URL is https://objects.mycloud.com/v1/12345678912345. The endPoint domain name is replicated in the field 'hostName'. This value has to be used inside the zone.json file managed by Rainbow operation team.\n\n[0]: https://docs.openstack.org/swift/latest/index.html",
        "operationId": "admin_filebackendstorages_postBackends",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_filebackendstorages_postBackends"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_filebackendstorages_postBackendsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "endPoint": "http://swift.opentouch.cloud:5000/v3",
                  "tenantId": "admin",
                  "tenantName": "admin",
                  "userName": "swift",
                  "password": "MyPassword",
                  "regionName": "FR-HC1",
                  "rootStorageURL": "http://swift.opentouch.cloud:8080/v1/AUTH_ed67810be59f40ac832d260e36e2cd91",
                  "hostName": "swift.opentouch.cloud",
                  "id": "5b5b445dc9df71afb4525ead"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "No File Backend Storage data provided for update. Expected optional fields: endPoint, tenantId, tenantName, userName, password, regionName, hostName, rootStorageURL",
                "errorDetailsCode": 400100
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Backend - endPoint: http://swift.opentouch.cloud:5000/v3 with hostName: swift.opentouch.cloud already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/links/{joinCompanyLinkId}": {
      "get": {
        "tags": [
          "Join Companies Links"
        ],
        "summary": "Get a join company link",
        "description": "This API can be used by company `admin` users to get a join company link by id   \n  \nJoin company links allow users to send a join company request to company admins (using API [POST /api/rainbow/enduser/v1.0/users/:userId/request-join-company][0]).   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/links/5819ed7c9547b313509237d6\n\n[0]: /enduser/#api-join_company-enduser_RequestJoinCompany",
        "operationId": "GetJoinCompaniesLinksById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "joinCompanyLinkId",
            "in": "path",
            "description": "Join company link unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetJoinCompaniesLinksByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "581b60cb0de6524c86be4b42",
                  "creationDate": "2016-11-03T16:07:39.766Z",
                  "createdByAdminId": "5819e1fa290fd7584fb4bb73",
                  "createdByAdminLoginEmail": "admin@company.fr",
                  "maxNumberUsers": 50,
                  "expirationDate": "2017-11-02T13:08:29.495Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "JoinCompanyLink with id 5819ed7c9547b313509237d6 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Join Companies Links"
        ],
        "summary": "Delete a join company link",
        "description": "This API can be used by company `admin` users to delete a join company link by id   \n  \nExample: DELETE https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/links/5819ed7c9547b313509237d6",
        "operationId": "DeleteJoinCompaniesLinksById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "joinCompanyLinkId",
            "in": "path",
            "description": "Join company link unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteJoinCompaniesLinksByIdSuccess"
            },
            "examples": {
              "application/json": {
                "status": "JoinCompanyLink 57b44e9c0c32e0b425252f9e successfully deleted",
                "data": {
                  "id": "581b60cb0de6524c86be4b42",
                  "creationDate": "2016-11-03T16:07:39.766Z",
                  "createdByAdminId": "5819e1fa290fd7584fb4bb73",
                  "createdByAdminLoginEmail": "admin@company.fr",
                  "maxNumberUsers": 50,
                  "expirationDate": "2017-11-02T13:08:29.495Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "JoinCompanyLink with id 5819ed7c9547b313509237d6 does not exist, not able to delete it.",
                "errorDetailsCode": 404002
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/links": {
      "get": {
        "tags": [
          "Join Companies Links"
        ],
        "summary": "Get all join company links",
        "description": "This API can be used by company `admin` users to list existing join company links for his company.   \n  \nJoin company links allow users to send a join company request to company admins (using API [POST /api/rainbow/enduser/v1.0/users/{userId}/request-join-company][0]).   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/links\n\n[0]: /enduser/#api-join_company-enduser_RequestJoinCompany",
        "operationId": "GetJoinCompaniesLinks",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetJoinCompaniesLinksSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "581b60cb0de6524c86be4b42",
                    "creationDate": "2016-11-03T16:07:39.766Z",
                    "createdByAdminLoginEmail": "admin@company.fr",
                    "createdByAdminId": "5819e1fa290fd7584fb4bb73",
                    "maxNumberUsers": 50,
                    "expirationDate": "2017-11-02T13:08:29.495Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "post": {
        "tags": [
          "Join Companies Links"
        ],
        "summary": "Create a join company link",
        "description": "This API can be used by company `admin` users to create a join company link for his company.   \n  \nJoin company links allow users to send a join company request to company admins (using API [POST /api/rainbow/enduser/v1.0/users/:userId/request-join-company][0]).   \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/links\n\n[0]: /enduser/#api-join_company-enduser_RequestJoinCompany",
        "operationId": "PostJoinCompaniesLinks",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostJoinCompaniesLinks"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostJoinCompaniesLinksSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "581b60cb0de6524c86be4b42",
                  "creationDate": "2016-11-03T16:07:39.766Z",
                  "createdByAdminId": "5819e1fa290fd7584fb4bb73",
                  "createdByAdminLoginEmail": "admin@company.fr",
                  "maxNumberUsers": 50,
                  "expirationDate": "2017-11-02T13:08:29.495Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 5703d0d49ccf39843c7ef897 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/invitations": {
      "get": {
        "tags": [
          "Join Company Invitations"
        ],
        "summary": "Get all join company invitations",
        "description": "This API can be used by company `admin` users to list invitations he sent to Rainbow users so that they join his company.   \n  \nJoin company invitations allow users to join the related company using: \n\n* API [POST /api/rainbow/enduser/v1.0/users/self-register][0] if invited email does not exist in Rainbow,\n* API [POST /api/rainbow/enduser/v1.0/users/:userId/join-companies/invitations/:invitationId/accept][1] if invited email matched an existing Rainbow user's loginEmail.\n\n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/invitations?status=pending   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/invitations?status=accepted&status=auto-accepted\n\n[0]: /enduser/#api-users-enduser_SelfRegisterUsers\n[1]: /enduser/#api-join_company_invitations-enduser_PostAcceptJoinCompanyInvitation",
        "operationId": "GetJoinCompanyInvitations",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "List all join company invitations having the provided status(es)",
            "required": false,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less invitation details in response.   \n- `small`: id, companyId, invitedUserId, invitedUserLoginEmail, invitingAdminId, status   \n- `medium`: id, companyId, companyName, invitedUserId, invitedUserLoginEmail, invitingAdminId, invitingAdminLoginEmail, status, lastNotificationDate, invitingDate, acceptationDate, declinationDate   \n- `full`: all join company invitation fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of invitations to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first invitation to retrieve (first invitation if not specified, i.e. offset=0). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort invitation list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting invitation list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetJoinCompanyInvitationsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "57cd5922d341df5812bbcb72",
                    "companyId": "5703d0d49ccf39843c7ef897",
                    "companyName": "Alcatel-Lucent Enterprise",
                    "invitedUserId": "573b46a305a4c22a19b216ce",
                    "invitedUserEmail": "invited.user@company.com",
                    "invitingAdminId": "5819e1fa290fd7584fb4bb73",
                    "invitingAdminLoginEmail": "admin@al-enterprise.fr",
                    "invitationDate": "2016-09-28T16:31:36.881Z",
                    "lastNotificationDate": "2016-09-28T16:31:36.879Z",
                    "requestedNotificationLanguage": "fr-FR",
                    "status": "pending"
                  },
                  {
                    "id": "57cd5922d341df5812bbcb73",
                    "companyId": "5703d0d49ccf39843c7ef897",
                    "companyName": "Alcatel-Lucent Enterprise",
                    "invitedUserId": "573b46a305a4c22a19b2160a",
                    "invitedUserEmail": "invited.otheruser@company.com",
                    "invitingAdminId": "5819e1fa290fd7584fb4bb73",
                    "invitingAdminLoginEmail": "admin@al-enterprise.fr",
                    "invitationDate": "2016-09-28T16:31:36.881Z",
                    "lastNotificationDate": "2016-09-28T16:31:36.879Z",
                    "requestedNotificationLanguage": "fr-FR",
                    "status": "pending"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "post": {
        "tags": [
          "Join Company Invitations"
        ],
        "summary": "Create a join company invitation",
        "description": "This API can be used by admin (`superadmin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`)   \nThis API can be used by admin (`superadmin`, `bp_admin`, `bp_finance`, `organization_admin`, `company_admin`) users to create a join company invitation to a Rainbow user for a given company.   \n  \n> `superadmin` can invite users to join all Rainbow companies   \n>   \n> `bp_admin` and `bp_finance` can only invite users to join their own company or End Customer companies for which their company is the BP company.   \n> `organization_admin` can only invite users to join companies being under their organisation.   \n> `company_admin` can only invite users to join their company.   \n  \n### Users can be invited:   \n#### by `email`   \n* by `email`: \n  * if no user is found with the provided email as loginEmail: \n    * an invitation to create his account in Rainbow and join the company is sent to the provided email address.\n    * User will be able to create his account using API [POST /api/rainbow/enduser/v1.0/users/self-register][0].\n    * InvitationId from the email link should be provided as joinCompanyInvitationId parameter of this API.   \nIn that case, the join company invitation will be accepted and the user is created in the inviting company.\n    * If joinCompanyInvitationId is not provided, if the user registers with the same loginEmail than the join company invitation email, the join company invitation is auto-accepted and the user is created directly in the inviting company.\n    * If previous join company invitation has already been sent for another company to this email, the previous one is deleted and is replaced by a new join company invitation for the provided companyId.   \nIn this case, admins of the other company are notified with the following XMPP message:   \n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyinvite action=\"delete\" id='582048dfe2e68a79f4979624' \n     status='pending' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  * if the loginEmail of a Rainbow user matches the provided email: \n    * user can only be invited if he is in the default company (otherwise an error is thrown)\n    * an invitation to join admin's company is sent by email and with an XMPP message:\n  \n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyinvite action=\"create\" id='57cd5922d341df5812bbcb72' \n     status='pending' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \n    * It is possible for an existing Rainbow user to be invited by several admins of different companies.\n    * Invited user is able to list join company invitations he received using API [GET /api/rainbow/enduser/v1.0/users/:userId/join-companies/invitations][1]\n    * Invited user is able to accept a join company invitation using API [POST /api/rainbow/enduser/v1.0/users/:userId/join-companies/invitations/:invitationId/accept][2]\n    * Invited user is able to decline a join company invitation using API [POST /api/rainbow/enduser/v1.0/users/:userId/join-companies/invitations/:invitationId/decline][3]\n* by Rainbow user id (`invitedUserId`): \n  * if no user is found with the provided invitedUserId, an error 404 is returned\n  * otherwise, an invitation to join admin's company is sent by email and with an XMPP message.   \nSame documentation than existing user invited by email apply (see above).\n\n  \nFor every use cases detailed above, all company administrators of the provided companyId are notified about the join company request creation with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyinvite action=\"create\" id='57cd5922d341df5812bbcb72'\n     status='pending' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/invitations\n\n[0]: /enduser/#api-users-enduser_SelfRegisterUsers\n[1]: #api-join_company_invitations-enduser_GetJoinCompanyInvitations\n[2]: #api-join_company_invitations-enduser_PostAcceptJoinCompanyInvitation\n[3]: #api-join_company_invitations-enduser_PostDeclineJoinCompanyInvitation",
        "operationId": "admin_PostJoinCompanyInvite",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PostJoinCompanyInvite"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostJoinCompanyInviteSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd5922d341df5812bbcb72",
                  "companyId": "5703d0d49ccf39843c7ef897",
                  "companyName": "Alcatel-Lucent Enterprise",
                  "invitedUserId": "573b46a305a4c22a19b216ce",
                  "invitedUserEmail": "invited.user@company.com",
                  "invitingAdminId": "5819e1fa290fd7584fb4bb73",
                  "invitingAdminLoginEmail": "admin@al-enterprise.fr",
                  "invitationDate": "2016-09-28T16:31:36.881Z",
                  "lastNotificationDate": "2016-09-28T16:31:36.879Z",
                  "requestedNotificationLanguage": "fr-FR",
                  "status": "pending"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Only one of email or invitedUserId parameters must be provided",
                "errorDetailsCode": 400451
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 5703d0d49ccf39843c7ef897 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/invitations/{invitationId}": {
      "get": {
        "tags": [
          "Join Company Invitations"
        ],
        "summary": "Get a join company invitation",
        "description": "This API can be used by company `admin` users to get a join company invitation he sent to a Rainbow user so that he join his company.   \n  \nJoin company invitations allow users to join the related company using: \n\n* API [POST /api/rainbow/enduser/v1.0/users/self-register][0] if invited email does not exist in Rainbow,\n* API [POST /api/rainbow/enduser/v1.0/users/:userId/join-companies/invitations/:invitationId/accept][1] if invited email matched an existing Rainbow user's loginEmail.\n\n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/invitations/5819ed7c9547b313509237d6\n\n[0]: /enduser/#api-users-enduser_SelfRegisterUsers\n[1]: /enduser/#api-join_company_invitations-enduser_PostAcceptJoinCompanyInvitation",
        "operationId": "GetJoinCompanyInviteById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Join company invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetJoinCompanyInviteByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd5922d341df5812bbcb72",
                  "companyId": "5703d0d49ccf39843c7ef897",
                  "companyName": "Alcatel-Lucent Enterprise",
                  "invitedUserId": "573b46a305a4c22a19b216ce",
                  "invitedUserEmail": "invited.user@company.com",
                  "invitingAdminId": "5819e1fa290fd7584fb4bb73",
                  "invitingAdminLoginEmail": "admin@al-enterprise.fr",
                  "invitationDate": "2016-09-28T16:31:36.881Z",
                  "lastNotificationDate": "2016-09-28T16:31:36.879Z",
                  "requestedNotificationLanguage": "fr-FR",
                  "status": "pending"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "JoinCompanyInvite with id 5819ed7c9547b313509237d6 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/invitations/{invitationId}/cancel": {
      "post": {
        "tags": [
          "Join Company Invitations"
        ],
        "summary": "Cancel a join company invitation",
        "description": "This API can be used by company `admin` users to cancel a join company invitation already sent for his company to a given user / email.   \n  \nInvitation must be pending, declined or failed (otherwise error 409 is returned).   \n  \nOnce invitation has been canceled, user won't be able to accept or decline it anymore.   \n  \nAll company admins are notified with an XMPP message that the invitation has been canceled: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyinvite action=\"update\" id='57cd5922d341df5812bbcb72'\n     status='canceled' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nUser (if he exist) is notified with an XMPP message that the invitation has been canceled: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyinvite action=\"update\" id='57cd5922d341df5812bbcb72'\n     status='canceled' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/invitations/5819ed7c9547b313509237d6/cancel",
        "operationId": "PutCancelJoinCompanyInviteById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Join company invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutCancelJoinCompanyInviteById"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutCancelJoinCompanyInviteByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd5922d341df5812bbcb72",
                  "companyId": "5703d0d49ccf39843c7ef897",
                  "companyName": "Alcatel-Lucent Enterprise",
                  "invitedUserId": "573b46a305a4c22a19b216ce",
                  "invitedUserEmail": "invited.user@company.com",
                  "invitingAdminId": "5819e1fa290fd7584fb4bb73",
                  "invitingAdminLoginEmail": "admin@al-enterprise.fr",
                  "invitationDate": "2016-09-28T16:31:36.881Z",
                  "lastNotificationDate": "2016-09-28T16:31:36.879Z",
                  "requestedNotificationLanguage": "fr-FR",
                  "status": "pending"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "JoinCompanyInvite with id 5819ed7c9547b313509237d6 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Join company invitation 57cd5922d341df5812bbcb72 is no longer pending, not able to cancel it",
                "errorDetailsCode": 409607
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/invitations/{invitationId}/failed": {
      "post": {
        "tags": [
          "Join Company Invitations"
        ],
        "summary": "Tag as failed a join company invitation",
        "description": "This API can be used by a `superadmin` to tag an invitation sent by companies `admin` as 'failed'.   \nThis API can only be used by a superadmin   \nOnly invitations with the status 'pending' can be tagged.   \n  \nInviting admin is notified with an XMPP message that the invitation has been failed.   \nThe XMPP message is the following: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyinvite id='57cd5922d341df5812bbcb72' action=\"update\"\n     type='sent' status='failed' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n",
        "operationId": "PutFailedJoinCompanyInviteById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Join company invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutFailedJoinCompanyInviteByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd5922d341df5812bbcb72",
                  "companyId": "5703d0d49ccf39843c7ef897",
                  "companyName": "Alcatel-Lucent Enterprise",
                  "invitedUserId": "573b46a305a4c22a19b216ce",
                  "invitedUserEmail": "invited.user@company.com",
                  "invitingAdminId": "5819e1fa290fd7584fb4bb73",
                  "invitingAdminLoginEmail": "admin@al-enterprise.fr",
                  "invitationDate": "2016-09-28T16:31:36.881Z",
                  "lastNotificationDate": "2016-09-28T16:31:36.879Z",
                  "requestedNotificationLanguage": "fr-FR",
                  "status": "failed"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "JoinCompanyInvite with id 5819ed7c9547b313509237d6 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Join company invitation 57cd5922d341df5812bbcb72 is no longer pending, not able to tag it failed",
                "errorDetailsCode": 409608
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/invitations/{invitationId}/re-send": {
      "post": {
        "tags": [
          "Join Company Invitations"
        ],
        "summary": "Re-send a join company invitation",
        "description": "This API can be used by company `admin` users to re-send a join company invitation already sent for his company to a given user / email.   \n  \nIf invitation is canceled or declined or failed, it is set back to pending and then re-sent.   \nIf invitation is accepted or auto-accepted, error 409 is returned.   \n  \nInvited user receives a new email notification.   \nAll company admins are notified with an XMPP message that the invitation has been re-sent: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyinvite action=\"re-send\" id='57cd5922d341df5812bbcb72'\n     status='pending' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nUser (if he exist) is notified with an XMPP message that the invitation has been re-sent: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyinvite action=\"re-send\" id='57cd5922d341df5812bbcb72'\n     status='pending' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/invitations/5819ed7c9547b313509237d6/re-send",
        "operationId": "ResendJoinCompanyInviteById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Join company invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ResendJoinCompanyInviteById"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/ResendJoinCompanyInviteByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd5922d341df5812bbcb72",
                  "companyId": "5703d0d49ccf39843c7ef897",
                  "companyName": "Alcatel-Lucent Enterprise",
                  "invitedUserId": "573b46a305a4c22a19b216ce",
                  "invitedUserEmail": "invited.user@company.com",
                  "invitingAdminId": "5819e1fa290fd7584fb4bb73",
                  "invitingAdminLoginEmail": "admin@al-enterprise.fr",
                  "invitationDate": "2016-09-28T16:31:36.881Z",
                  "lastNotificationDate": "2016-09-28T16:31:36.879Z",
                  "requestedNotificationLanguage": "fr-FR",
                  "status": "pending"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 5703d0d49ccf39843c7ef897 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Join company invitation 57cd5922d341df5812bbcb72 is no longer pending, not able to re-send invitation",
                "errorDetailsCode": 409604
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/requests/{joinCompanyRequestId}": {
      "get": {
        "tags": [
          "Join Company Requests"
        ],
        "summary": "Get a join company request",
        "description": "This API can be used by company `admin` users to get a join company request by id (must have been received by his company) (sent using API [POST /api/rainbow/enduser/v1.0/users/:userId/request-join-company][0]).   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/requests/5819ed7c9547b313509237d6\n\n[0]: /enduser/#api-join_company-enduser_RequestJoinCompany",
        "operationId": "GetJoinCompanyRequestById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "joinCompanyRequestId",
            "in": "path",
            "description": "Join company request unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetJoinCompanyRequestByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5819ed7c9547b313509237d6",
                  "requestingUserId": "5819e52ccf95fa196aa3f38a",
                  "requestingUserLoginEmail": "userindefaultcompany@default.fr",
                  "requestedCompanyId": "5703d0d49ccf39843c7ef897",
                  "requestedCompanyName": "Alcatel-Lucent Enterprise",
                  "requestedToCompanyAdmin": {
                    "companyAdminId": "5819e1fa290fd7584fb4bb73",
                    "companyAdminLoginEmail": "admin@al-enterprise.fr"
                  },
                  "status": "pending",
                  "requestedNotificationLanguage": "fr-FR",
                  "lastNotificationDate": "2016-11-02T13:43:24.338Z",
                  "requestingDate": "2016-11-02T13:43:24.339Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "JoinCompanyRequest with id 5819ed7c9547b313509237d6 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/requests": {
      "get": {
        "tags": [
          "Join Company Requests"
        ],
        "summary": "Get all join company requests",
        "description": "This API can be used by company `admin` users to list join company requests received for his company by Rainbow users who want to join his company (sent using API [POST /api/rainbow/enduser/v1.0/users/:userId/request-join-company][0]).   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/requests?status=pending\n\n[0]: /enduser/#api-join_company-enduser_RequestJoinCompany",
        "operationId": "GetJoinCompanyRequests",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less requests details in response.   \n- `small`: id, requestingUserId, requestedCompanyId, status   \n- `medium`: id, requestingUserId, requestingUserLoginEmail, requestedCompanyId, requestedCompanyName, status, requestingDate   \n- `full`: all request fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of requests to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first request to retrieve (first request if not specified, i.e. offset=0). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort requests list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting requests list.",
            "required": false,
            "type": "number"
          },
          {
            "name": "status",
            "in": "query",
            "description": "List all join company requests having the provided status(es)",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetJoinCompanyRequestsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "requestingUserId": "5819e52ccf95fa196aa3f38a",
                    "requestedCompanyId": "5703d0d49ccf39843c7ef897",
                    "status": "pending",
                    "id": "581b462962a8047f81f84889"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 1
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/requests/{joinCompanyRequestId}/accept": {
      "post": {
        "tags": [
          "Join Company Requests"
        ],
        "summary": "Accept a join company request",
        "description": "This API can be used by company `admin` users to accept a join company request received for his company (sent using API [POST /api/rainbow/enduser/v1.0/users/:userId/request-join-company][0]).   \n  \nTo accept the join company request, the user must still be in default company (may evolve in the future)   \n  \nOnce accepted, requesting user will be moved from Default company to company admin's company.   \nThe user profile will be associated to the company subscription of the default offer (Essential).   \n  \nUser's XMPP vCard is also updated.   \nLike after a user profile update, a presence stanza is sent to user's resources and users being in user's roster. This allow clients to be notified that company of this user has been updated: \n\n    \n```html\n<presence from='3ae059e2a91c40d9bdd7df0eedc911ca@openrainbow.com'>\n    <x xmlns='vcard-temp:x:update'>\n        <data/>\n    </x>\n    <actor xmlns='jabber:iq:configuration'/x>\n</presence>\n```\n  \n  \nWhen an admin accept a join company request, he and all company admins of this company are notified that the request has been accepted with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6'\n     status='accepted' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nRequesting user is notified that his request has been accepted with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6' \n     status='accepted' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nNote that if the requesting user has also been invited by an admin to join this company (join company invitation), the invitation is auto-accepted.   \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/requests/5819ed7c9547b313509237d6/accept\n\n[0]: /enduser/#api-join_company-enduser_RequestJoinCompany",
        "operationId": "PostAcceptJoinCompanyReq",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "joinCompanyRequestId",
            "in": "path",
            "description": "Join company request unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostAcceptJoinCompanyReqSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5819ed7c9547b313509237d6",
                  "requestingUserId": "5819e52ccf95fa196aa3f38a",
                  "requestingUserLoginEmail": "userindefaultcompany@default.fr",
                  "requestedCompanyId": "5703d0d49ccf39843c7ef897",
                  "requestedCompanyName": "Alcatel-Lucent Enterprise",
                  "requestedToCompanyAdmin": {
                    "companyAdminId": "5819e1fa290fd7584fb4bb73",
                    "companyAdminLoginEmail": "admin@al-enterprise.fr"
                  },
                  "status": "accepted",
                  "acceptationInfo": {
                    "acceptationDate": "2016-11-03T09:13:45.153Z",
                    "acceptedByAdminId": "5819e1fa290fd7584fb4bb73",
                    "acceptedByAdminLoginEmail": "admin@al-enterprise.fr"
                  },
                  "requestedNotificationLanguage": "fr-FR",
                  "lastNotificationDate": "2016-11-02T13:43:24.338Z",
                  "requestingDate": "2016-11-02T13:43:24.339Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "JoinCompanyRequest with id 5819ed7c9547b313509237d6 does not exist, not able to update it.",
                "errorDetailsCode": 404001
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Join company request 5819ed7c9547b313509237d6 is no longer pending, not able to accept it",
                "errorDetailsCode": 409655
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/join-companies/requests/{joinCompanyRequestId}/decline": {
      "post": {
        "tags": [
          "Join Company Requests"
        ],
        "summary": "Decline a join company request",
        "description": "This API can be used by company `admin` users to decline a join company request received for his company (sent using API [POST /api/rainbow/enduser/v1.0/users/:userId/request-join-company][0]).   \n  \nWhen an admin decline a join company request, requesting user is notified that his request has been declined with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6'\n     status='declined' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nWhen an admin decline a join company request, he and all company admins of this company are notified that the request has been declined with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6'\n     status='declined' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/join-companies/requests/5819ed7c9547b313509237d6/decline\n\n[0]: /enduser/#api-join_company-enduser_RequestJoinCompany",
        "operationId": "PostDeclineJoinCompanyReq",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "joinCompanyRequestId",
            "in": "path",
            "description": "Join company request unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostDeclineJoinCompanyReqSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5819ed7c9547b313509237d6",
                  "requestingUserId": "5819e52ccf95fa196aa3f38a",
                  "requestingUserLoginEmail": "userindefaultcompany@default.fr",
                  "requestedCompanyId": "5703d0d49ccf39843c7ef897",
                  "requestedCompanyName": "Alcatel-Lucent Enterprise",
                  "requestedToCompanyAdmin": {
                    "companyAdminId": "5819e1fa290fd7584fb4bb73",
                    "companyAdminLoginEmail": "admin@al-enterprise.fr"
                  },
                  "status": "declined",
                  "declinationInfo": {
                    "declinationDate": "2016-11-03T09:13:45.153Z",
                    "declinedByAdminId": "5819e1fa290fd7584fb4bb73",
                    "declinedByAdminLoginEmail": "admin@al-enterprise.fr"
                  },
                  "requestedNotificationLanguage": "fr-FR",
                  "lastNotificationDate": "2016-11-02T13:43:24.338Z",
                  "requestingDate": "2016-11-02T13:43:24.339Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "JoinCompanyRequest with id 5819ed7c9547b313509237d6 does not exist, not able to update it.",
                "errorDetailsCode": 404001
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Join company request 5819ed7c9547b313509237d6 is no longer pending, not able to decline it",
                "errorDetailsCode": 409656
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/invitations": {
      "get": {
        "tags": [
          "Link Ec To Bp Invitations"
        ],
        "summary": "Get all invitations",
        "description": "This API can be used by `admin` users to list invitations they sent/received to link End customer company to BP company.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/invitations?status=pending   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/invitations?status=accepted&status=auto-accepted",
        "operationId": "GetLinkECToBPInvitations",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "List all invitations having the provided status(es)",
            "required": false,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less invitation details in response. 'small': '_id invitingCompanyId invitedCompanyId invitingAdminId status', 'medium': '_id invitingCompanyId invitingCompanyName invitedCompanyId invitedCompanyName invitingAdminId invitingAdminLoginEmail status lastNotificationDate invitationDate acceptationDate declinationDate', // All fields 'full': all fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of invitations to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first invitation to retrieve (first invitation if not specified, i.e. offset=0). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort invitation list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting invitation list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetLinkECToBPInvitationsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "invitingCompanyId": "592482db34053b35ada8c9fd",
                    "invitingCompanyName": "BP company",
                    "invitedCompanyId": "592d3eae53bc273c14aaf7c2",
                    "invitedCompanyName": "End customer company",
                    "invitingAdminId": "58ede12b44b22d0c86ffb4fd",
                    "invitingAdminLoginEmail": "superadmin@openrainbow.org",
                    "status": "pending",
                    "requestedNotificationLanguage": "en",
                    "lastNotificationDate": "2017-05-30T09:43:30.668Z",
                    "invitationDate": "2017-05-30T09:43:30.668Z",
                    "id": "592d3ec253bc273c14aaf7c4"
                  },
                  {
                    "invitingCompanyId": "592482db34053b35ada8c9fd",
                    "invitingCompanyName": "BP company",
                    "invitedCompanyId": "592c0c171e02cb30313b67d2",
                    "invitedCompanyName": "test link bp",
                    "invitingAdminId": "58ede12b44b22d0c86ffb4fd",
                    "invitingAdminLoginEmail": "superadmin@openrainbow.org",
                    "cancelationDate": "2017-05-29T15:53:18.504Z",
                    "status": "canceled",
                    "requestedNotificationLanguage": "en",
                    "lastNotificationDate": "2017-05-29T15:39:20.198Z",
                    "invitationDate": "2017-05-29T13:50:31.000Z",
                    "id": "592c272734d71234a49c8479"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "post": {
        "tags": [
          "Link Ec To Bp Invitations"
        ],
        "summary": "Create an invitation to link EC to BP",
        "description": "This API can be used by admin (`superadmin`, `bp_admin`) to create an invitation to link an End customer company to a BP company.   \n  \nAll company administrators of the provided end customer and BP companyId are notified about the created invitation with an email notification (only end customer company admins) and with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobpinvite action=\"create\" id='57cd5922d341df5812bbcb72'\n     status='pending' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/invitations",
        "operationId": "admin_PostLinkEcToBpInvite",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PostLinkEcToBpInvite"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostLinkEcToBpInviteSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Link End Customer to BP invitation successfully created, admins and user have been notified",
                "data": {
                  "invitingCompanyId": "592482db34053b35ada8c9fd",
                  "invitingCompanyName": "BP company",
                  "invitedCompanyId": "592c0c171e02cb30313b67d2",
                  "invitedCompanyName": "test link bp",
                  "invitedToBeBpIr": false,
                  "invitingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "invitingAdminLoginEmail": "superadmin@openrainbow.org",
                  "status": "pending",
                  "requestedNotificationLanguage": "en",
                  "lastNotificationDate": "2017-05-29T13:50:31.000Z",
                  "invitationDate": "2017-05-29T13:50:31.000Z",
                  "id": "592c272734d71234a49c8479"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "BP company and end customer company couldn't have the same id",
                "errorDetailsCode": 400552
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 5703d0d49ccf39843c7ef897 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/invitations/{invitationId}": {
      "get": {
        "tags": [
          "Link Ec To Bp Invitations"
        ],
        "summary": "Get an invitation",
        "description": "This API can be used by `admin` users to get an invitation he sent/received to link an end customer company to a BP.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/invitations/5819ed7c9547b313509237d6",
        "operationId": "GetLinkECToBPInviteById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Link End customer to BP invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetLinkECToBPInviteByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "invitingCompanyId": "592482db34053b35ada8c9fd",
                  "invitingCompanyName": "BP company",
                  "invitedCompanyId": "5924833034053b35ada8c9ff",
                  "invitedCompanyName": "EC company",
                  "invitingAdminId": "592f2e64d293877563a498b5",
                  "invitingAdminLoginEmail": "comp_admin4@test.com",
                  "status": "pending",
                  "requestedNotificationLanguage": "fr",
                  "lastNotificationDate": "2017-06-01T14:16:31.908Z",
                  "invitationDate": "2017-06-01T14:16:31.908Z",
                  "id": "593021bf656a7f761a5a4159"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invitation 592c272734d71234a49c8479 isn't for the invited company 592c0c171e02cb30313b67d2",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "End customer Invite with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/invitations/{invitationId}/cancel": {
      "post": {
        "tags": [
          "Link Ec To Bp Invitations"
        ],
        "summary": "Cancel an invitation",
        "description": "This API can be used by BP admins to cancel an invitation already sent to link an EC company to their BP company.   \n  \nInvitation must be pending, declined or failed (otherwise error 409 is returned).   \n  \nThe `companyId` provided in URL should be the BP companyId. Otherwise, cancel request will be rejected with a 400 Bad Request error.   \n  \nOnce invitation has been canceled, it will not be possible to accept or decline it anymore.   \n  \nAll company admins are notified with an XMPP message that the invitation has been canceled: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobpinvite action=\"update\" id='57cd5922d341df5812bbcb72'\n     status='canceled' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/invitations/5819ed7c9547b313509237d6/cancel",
        "operationId": "PutCancelLinkEcToBpInviteById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Link End customer to BP invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutCancelLinkEcToBpInviteByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "invitingCompanyId": "592dcdd853bc273c14aaf7c5",
                  "invitingCompanyName": "End customer company 2",
                  "invitedCompanyId": "5924833034053b35ada8c9ff",
                  "invitedCompanyName": "EC company",
                  "invitingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "invitingAdminLoginEmail": "superadmin@openrainbow.org",
                  "cancelationDate": "2017-05-31T15:41:43.656Z",
                  "status": "canceled",
                  "requestedNotificationLanguage": "en",
                  "lastNotificationDate": "2017-05-31T15:23:16.893Z",
                  "invitationDate": "2017-05-30T20:57:17.839Z",
                  "id": "592ddcad2bd4b85485c6aeac"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invitation 592c272734d71234a49c8479 isn't for the invited company 592c0c171e02cb30313b67d2",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "End customer Invite with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Invitation 592ddcad2bd4b85485c6aeac is no longer pending (status is : accepted), not able to cancel invitation",
                "errorDetailsCode": 409607
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/invitations/{invitationId}/re-send": {
      "post": {
        "tags": [
          "Link Ec To Bp Invitations"
        ],
        "summary": "Re-send an invitation",
        "description": "This API can be used by BP admins to re-send an invitation already sent to link an EC company to their BP company.   \n  \nIf invitation is canceled or declined or failed, it is set back to pending and then re-sent.   \nIf invitation is accepted or auto-accepted, error 409 is returned.   \n  \nThe `companyId` provided in URL should be the BP companyId. Otherwise, re-send request will be rejected with a 400 Bad Request error.   \n  \nInvited company administrators receive a new email notification.   \nAll company admins are notified with an XMPP message that the invitation has been re-sent: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobpinvite action=\"re-send\" id='57cd5922d341df5812bbcb72'\n     status='pending' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/invitations/5819ed7c9547b313509237d6/re-send",
        "operationId": "ResendLinkEcToBpInviteById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Link End customer to BP invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ResendLinkEcToBpInviteById"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/ResendLinkEcToBpInviteByIdSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Link end customer to BP invitation 592ddcad2bd4b85485c6aeac successfully re-sent",
                "data": {
                  "invitingCompanyId": "592dcdd853bc273c14aaf7c5",
                  "invitingCompanyName": "BP company 2",
                  "invitedCompanyId": "5924833034053b35ada8c9ff",
                  "invitedCompanyName": "EC company",
                  "invitingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "invitingAdminLoginEmail": "superadmin@openrainbow.org",
                  "status": "pending",
                  "requestedNotificationLanguage": "en",
                  "lastNotificationDate": "2017-05-31T15:23:16.893Z",
                  "invitationDate": "2017-05-30T20:57:17.839Z",
                  "id": "592ddcad2bd4b85485c6aeac"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invitation 592c272734d71234a49c8479 isn't for the invited company 592c0c171e02cb30313b67d2",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "End customer Invite with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Invitation 592ddcad2bd4b85485c6aeac is no longer pending (status is : accepted), not able to re-send invitation",
                "errorDetailsCode": 409604
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/invitations/{invitationId}/accept": {
      "post": {
        "tags": [
          "Link Ec To Bp Invitations"
        ],
        "summary": "Accept an invitation",
        "description": "This API allows to accept an invitation received by company admins of end customer company (or by bp_admin of BP IR company) (invitation sent by bp_admin using API [POST /api/rainbow/admin/v1.0/companies/:companyId/bp-link/invitations][0]).   \n  \nInvitation must be in status pending or failed. Otherwise accept request will be rejected with a 409 Conflict error   \n  \nThe `companyId` provided in URL should be the End Customer companyId. Otherwise, accept request will be rejected with a 400 Bad Request error.   \n  \nOnce accepted, invited company's `bpId` is updated with the id of the BP company.   \nIf company was invited to be BP IR (invitedToBeBpIr=true), invited company's `isBP` and `bpType` are updated to true and `IR`.   \nAlso, if company was invited to be BP IR, if admin that accepts invitation is only `company_admin` of the invited company, he will be promoted to `bp_admin` and `bp_finance` of this company.   \n  \nWhen a end customer company admin accepts an invitation, EC company administrators and BP company administrators are notified with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobpinvite action=\"update\" id='582048dfe2e68a79f4979624' \n     status='accepted' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/573b46a305a4c22a19b216ce/bp-link/invitations/5819ed7c9547b313509237d6/accept \n\n[0]: #api-link_EC_to_BP_invitations-admin_PostLinkEcToBpInvite",
        "operationId": "admin_PostAcceptLinkEcToBpInvitation",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Link End customer to BP invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostAcceptLinkEcToBpInvitationSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "invitingCompanyId": "592dcdd853bc273c14aaf7c5",
                  "invitingCompanyName": "End customer company 2",
                  "invitedCompanyId": "5924833034053b35ada8c9ff",
                  "invitedCompanyName": "EC company",
                  "invitingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "invitingAdminLoginEmail": "superadmin@openrainbow.org",
                  "acceptationDate": "2017-05-31T14:50:01.733Z",
                  "status": "accepted",
                  "requestedNotificationLanguage": "en",
                  "lastNotificationDate": "2017-05-30T20:57:17.839Z",
                  "invitationDate": "2017-05-30T20:57:17.839Z",
                  "id": "592ddcad2bd4b85485c6aeac"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invitation 592c272734d71234a49c8479 isn't for the invited company 592c0c171e02cb30313b67d2",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "End customer Invite with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Invitation 592ddcad2bd4b85485c6aeac is no longer pending (status is : accepted), not able to accept invitation",
                "errorDetailsCode": 409605
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/invitations/{invitationId}/decline": {
      "post": {
        "tags": [
          "Link Ec To Bp Invitations"
        ],
        "summary": "Decline an invitation",
        "description": "This API allows to decline an invitation received by company administrators of end customer company (or by bp_admin of BP IR company) (invitation sent by bp_admin using API [POST /api/rainbow/admin/v1.0/companies/:companyId/bp-link/invitations][0]).   \n  \nInvitation must be in status pending or failed. Otherwise decline request will be rejected with a 409 Conflict error   \n  \nThe `companyId` provided in URL should be the End Customer companyId. Otherwise, decline request will be rejected with a 400 Bad Request error.   \n  \nWhen a end customer company admin declines an invitation, EC company administrators and BP company administrators are notified with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobpinvite action=\"update\" id='582048dfe2e68a79f4979624' \n     status='declined' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/573b46a305a4c22a19b216ce/bp-link/invitations/5819ed7c9547b313509237d6/decline \n\n[0]: #api-link_EC_to_BP_invitations-admin_PostLinkEcToBpInvite",
        "operationId": "admin_PostDeclineLinkEcToBpInvitation",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Link End customer to BP invitation unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostDeclineLinkEcToBpInvitationSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "invitingCompanyId": "592dcdd853bc273c14aaf7c5",
                  "invitingCompanyName": "End customer company 2",
                  "invitedCompanyId": "5924833034053b35ada8c9ff",
                  "invitedCompanyName": "EC company",
                  "invitingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "invitingAdminLoginEmail": "superadmin@openrainbow.org",
                  "declinationDate": "2017-05-31T15:09:31.068Z",
                  "status": "declined",
                  "requestedNotificationLanguage": "en",
                  "lastNotificationDate": "2017-05-30T20:57:17.839Z",
                  "invitationDate": "2017-05-30T20:57:17.839Z",
                  "id": "592ddcad2bd4b85485c6aeac"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invitation 592c272734d71234a49c8479 isn't for the invited company 592c0c171e02cb30313b67d2",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "End customer Invite with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Invitation 592ddcad2bd4b85485c6aeac is no longer pending (status is : declined), not able to decline invitation",
                "errorDetailsCode": 409606
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/requests/{requestId}": {
      "get": {
        "tags": [
          "Link Ec To Bp Requests"
        ],
        "summary": "Get a request",
        "description": "This API can be used by `admin` users to get a request he sent/received to link an end customer company to a BP. Example: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/requests/5819ed7c9547b313509237d6",
        "operationId": "GetLinkECToBPRequestById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "requestId",
            "in": "path",
            "description": "Link End customer to BP request unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetLinkECToBPRequestByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "requestingCompanyId": "593abff58b7871031e9f1f11",
                  "requestingCompanyName": "EC company",
                  "requestedCompanyId": "593ab61d2818477c1061c37c",
                  "requestedCompanyName": "BP VAD",
                  "requestedToBeBpIr": false,
                  "requestingAdminId": "593e7a38316c1123d7625586",
                  "requestingAdminLoginEmail": "comp_admin_ir@test.com",
                  "status": "pending",
                  "requestedNotificationLanguage": "fr",
                  "lastNotificationDate": "2017-06-12T12:38:12.859Z",
                  "requestDate": "2017-06-12T12:38:12.860Z",
                  "id": "593e8b34316c1123d762558a"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Request 593aac0c2818477c1061c37b isn't for the company 593ab61d2818477c1061c37c",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Request with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/requests": {
      "get": {
        "tags": [
          "Link Ec To Bp Requests"
        ],
        "summary": "Get all requests",
        "description": "This API can be used by `admin` users to list requests they sent/received to link End customer company to BP company. Example: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/requests?status=pending Example: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/requests?status=accepted&status=auto-accepted",
        "operationId": "GetLinkECToBPRequests",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "List all Requests having the provided status(es)",
            "required": false,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less request details in response. 'small': '_id requestingCompanyId requestedCompanyId requestingAdminId status', 'medium': '_id requestingCompanyId requestingCompanyName requestedCompanyId requestedCompanyName requestingAdminId requestingAdminLoginEmail status lastNotificationDate requestDate acceptationDate declinationDate', // All fields 'full': all fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of requests to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first request to retrieve (first request if not specified, i.e. offset=0). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort request list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting request list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetLinkECToBPRequestsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "requestingCompanyId": "593abff58b7871031e9f1f11",
                    "requestingCompanyName": "EC company",
                    "requestedCompanyId": "593ab61d2818477c1061c37c",
                    "requestedCompanyName": "BP VAD",
                    "requestedToBeBpIr": false,
                    "requestingAdminId": "593e7a38316c1123d7625586",
                    "requestingAdminLoginEmail": "comp_admin_ir@test.com",
                    "status": "pending",
                    "requestedNotificationLanguage": "fr",
                    "lastNotificationDate": "2017-06-12T12:38:12.859Z",
                    "requestDate": "2017-06-12T12:38:12.860Z",
                    "id": "593e8b34316c1123d762558a"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 1
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      },
      "post": {
        "tags": [
          "Link Ec To Bp Requests"
        ],
        "summary": "Create a request to link EC to BP",
        "description": "This API can be used by admin (`superadmin`, `bp_admin`, `organization_admin`, `company_admin`) to create a request to link an End customer company to a BP company. All company administrators of the provided end customer and BP companyId are notified about the created request with an email notification (only BP company admins) and with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobprequest action=\"create\" id='57cd5922d341df5812bbcb72'\n     status='pending' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/requests",
        "operationId": "admin_PostLinkEcToBpRequest",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PostLinkEcToBpRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostLinkEcToBpRequestSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Link End Customer to BP request successfully created, admins have been notified",
                "data": {
                  "requestingCompanyId": "592d3eae53bc273c14aaf7c2",
                  "requestingCompanyName": "End customer company",
                  "requestedCompanyId": "592482db34053b35ada8c9fd",
                  "requestedCompanyName": "BP company",
                  "requestedToBeBpIr": false,
                  "requestingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "requestingAdminLoginEmail": "superadmin@openrainbow.org",
                  "status": "pending",
                  "requestedNotificationLanguage": "fr",
                  "lastNotificationDate": "2017-06-09T14:09:16.639Z",
                  "requestDate": "2017-06-09T14:09:16.640Z",
                  "id": "593aac0c2818477c1061c37b"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "BP company and end customer company couldn't have the same id",
                "errorDetailsCode": 400552
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 5703d0d49ccf39843c7ef897 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/requests/{requestId}/cancel": {
      "post": {
        "tags": [
          "Link Ec To Bp Requests"
        ],
        "summary": "Cancel a request",
        "description": "This API can be used by admin (`superadmin`, `bp_admin`, `organization_admin`, `company_admin`) to cancel a request already sent to link his company to BP company. Request must be pending, declined or failed (otherwise error 409 is returned). The `companyId` provided in URL should be the requesting companyId. Otherwise, cancel request will be rejected with a 400 Bad Request error. Once request has been canceled, it will not be possible to accept or decline it anymore. All admins are notified with an XMPP message that the request has been canceled: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobprequest action=\"update\" id='57cd5922d341df5812bbcb72'\n     status='canceled' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/requests/5819ed7c9547b313509237d6/cancel",
        "operationId": "PostCancelLinkEcToBpRequestById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "requestId",
            "in": "path",
            "description": "Link End customer to BP request unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostCancelLinkEcToBpRequestByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "requestingCompanyId": "593abff58b7871031e9f1f11",
                  "requestingCompanyName": "EC company",
                  "requestedCompanyId": "593ab61d2818477c1061c37c",
                  "requestedCompanyName": "BP VAD",
                  "requestingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "requestingAdminLoginEmail": "superadmin@openrainbow.org",
                  "requestedToBeBpIr": false,
                  "cancelationDate": "2017-06-28T13:47:24.092Z",
                  "status": "canceled",
                  "requestedNotificationLanguage": "en",
                  "lastNotificationDate": "2017-06-28T13:19:33.521Z",
                  "requestDate": "2017-06-27T15:37:01.657Z",
                  "id": "59527b9d5d017349906ca937"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Request 593aac0c2818477c1061c37b isn't for the company 593ab61d2818477c1061c37c",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Request with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Request 592ddcad2bd4b85485c6aeac is no longer pending (status is : accepted), not able to cancel request",
                "errorDetailsCode": 409607
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/requests/{requestId}/re-send": {
      "post": {
        "tags": [
          "Link Ec To Bp Requests"
        ],
        "summary": "Re-send a request",
        "description": "This API can be used by admin (`superadmin`, `bp_admin`, `organization_admin`, `company_admin`) to re-send a request already sent to link his company to BP company. If request is canceled, declined or failed, it is set back to pending and then re-sent. If request is accepted or auto-accepted, error 409 is returned. The `companyId` provided in URL should be the requesting companyId (e.g. end customer company). Otherwise, re-send request will be rejected with a 400 Bad Request error. Request company (BP company) administrators receive a new email notification. All admins are notified with an XMPP message that the request has been re-sent: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobprequest action=\"re-send\" id='57cd5922d341df5812bbcb72' \n     status='pending' type='sent' xmlns='jabber:iq:configuration'/>\n</message>\n```\nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/5703d0d49ccf39843c7ef897/bp-link/requests/5819ed7c9547b313509237d6/re-send",
        "operationId": "ResendLinkEcToBpRequestById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "requestId",
            "in": "path",
            "description": "Link End customer to BP request unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ResendLinkEcToBpRequestById"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/ResendLinkEcToBpRequestByIdSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Link end customer to BP request 59527b9d5d017349906ca937 successfully re-sent",
                "data": {
                  "requestingCompanyId": "593abff58b7871031e9f1f11",
                  "requestingCompanyName": "EC company",
                  "requestedCompanyId": "593ab61d2818477c1061c37c",
                  "requestedCompanyName": "BP VAD",
                  "requestingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "requestingAdminLoginEmail": "superadmin@openrainbow.org",
                  "requestedToBeBpIr": false,
                  "status": "pending",
                  "requestedNotificationLanguage": "en",
                  "lastNotificationDate": "2017-06-28T13:19:33.521Z",
                  "requestDate": "2017-06-27T15:37:01.657Z",
                  "id": "59527b9d5d017349906ca937"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Request 593aac0c2818477c1061c37b isn't for the company 593ab61d2818477c1061c37c",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Request with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Request 592ddcad2bd4b85485c6aeac is no longer pending (status is : accepted), not able to re-send request",
                "errorDetailsCode": 409604
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/requests/{requestId}/accept": {
      "post": {
        "tags": [
          "Link Ec To Bp Requests"
        ],
        "summary": "Accept a request",
        "description": "This API allows to accept a request received by bp admins of a BP company (request sent by bp_admin or company_admin using API [POST /api/rainbow/admin/v1.0/companies/{companyId}/bp-link/requests][0]). Request must be in status pending. Otherwise accept request will be rejected with a 409 Conflict error The `companyId` provided in URL should be the BP companyId. Otherwise, accept request will be rejected with a 400 Bad Request error. Once accepted, requesting company's `bpId` is updated with the id of the BP company. If company requested to be BP IR (requestedToBeBpIr=true), requesting company's `isBP` and `bpType` are updated to true and `IR`. If request was done to be BP IR by an admin only `company_admin`, this admin will be promoted to `bp_admin` and `bp_finance` of the requesting company. When a bp_admin accepts a request, EC company administrators and BP company administrators are notified with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobprequest action=\"update\" id='582048dfe2e68a79f4979624' \n     status='accepted' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/573b46a305a4c22a19b216ce/bp-link/requests/5819ed7c9547b313509237d6/accept\n\n[0]: /admin/#api-link_EC_to_BP_requests-admin_PostLinkEcToBpRequest",
        "operationId": "admin_PostAcceptLinkEcToBpRequest",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "requestId",
            "in": "path",
            "description": "Link End customer to BP request unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostAcceptLinkEcToBpRequestSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "requestingCompanyId": "59535d6c22357e4baafd75eb",
                  "requestingCompanyName": "test request ec company",
                  "requestedCompanyId": "593ab61d2818477c1061c37c",
                  "requestedCompanyName": "BP VAD",
                  "requestingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "requestingAdminLoginEmail": "superadmin@openrainbow.org",
                  "requestedToBeBpIr": false,
                  "acceptationDate": "2017-06-28T07:45:08.088Z",
                  "status": "accepted",
                  "requestedNotificationLanguage": "fr",
                  "lastNotificationDate": "2017-06-28T07:44:19.857Z",
                  "requestDate": "2017-06-28T07:44:19.858Z",
                  "id": "59535e5322357e4baafd75f0"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Request 593aac0c2818477c1061c37b isn't for the company 593ab61d2818477c1061c37c",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Request with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Request 59535e5322357e4baafd75f0 is no longer pending (status is : accepted), not able to accept request",
                "errorDetailsCode": 409605
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/companies/{companyId}/bp-link/requests/{requestId}/decline": {
      "post": {
        "tags": [
          "Link Ec To Bp Requests"
        ],
        "summary": "Decline a request",
        "description": "This API allows to decline a request received by bp admins of a BP company (request sent by bp_admin or company_admin using API [POST /api/rainbow/admin/v1.0/companies/{companyId}/bp-link/requests][0]). Request must be in status pending or failed. Otherwise decline request will be rejected with a 409 Conflict error The `companyId` provided in URL should be the BP companyId. Otherwise, decline request will be rejected with a 400 Bad Request error. When a bp_admin declines a request, EC company administrators and BP company administrators are notified with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <linkectobprequest action=\"update\" id='582048dfe2e68a79f4979624' \n     status='declined' type='received' xmlns='jabber:iq:configuration'/>\n</message>\n```\nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/companies/573b46a305a4c22a19b216ce/bp-link/requests/5819ed7c9547b313509237d6/decline\n\n[0]: /admin/#api-link_EC_to_BP_requests-admin_PostLinkEcToBpRequest",
        "operationId": "admin_PostDeclineLinkEcToBpRequest",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "requestId",
            "in": "path",
            "description": "Link End customer to BP request unique identifier (like 5819ed7c9547b313509237d6)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostDeclineLinkEcToBpRequestSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "requestingCompanyId": "593abff58b7871031e9f1f11",
                  "requestingCompanyName": "EC company",
                  "requestedCompanyId": "593ab61d2818477c1061c37c",
                  "requestedCompanyName": "BP VAD",
                  "requestingAdminId": "58ede12b44b22d0c86ffb4fd",
                  "requestingAdminLoginEmail": "superadmin@openrainbow.org",
                  "requestedToBeBpIr": false,
                  "declinationDate": "2017-06-28T12:26:20.875Z",
                  "status": "declined",
                  "requestedNotificationLanguage": "en",
                  "lastNotificationDate": "2017-06-27T15:37:01.657Z",
                  "requestDate": "2017-06-27T15:37:01.657Z",
                  "id": "59527b9d5d017349906ca937"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Request 593aac0c2818477c1061c37b isn't for the company 593ab61d2818477c1061c37c",
                "errorDetailsCode": 400553
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Request with id 592d3ec253bc273c14caf7c4 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Request 59535e5322357e4baafd75f0 is no longer pending (status is : accepted), not able to decline request",
                "errorDetailsCode": 409606
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/notifications/im": {
      "post": {
        "tags": [
          "Notifications Im"
        ],
        "summary": "Send an IM to a Rainbow user",
        "description": "This API allows superadmin to send an instant message (IM) from a Rainbow user (who can be himself) to another Rainbow user.",
        "operationId": "NotificationsIM",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/NotificationsIM"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/NotificationsIMSuccess"
            },
            "examples": {
              "application/json": {
                "status": "IM successfully sent",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "User with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/notifications/im/bot": {
      "post": {
        "tags": [
          "Notifications Im"
        ],
        "summary": "Send an IM to a Rainbow user from a bot",
        "description": "This API allows superadmin to send an instant message (IM) from a Rainbow bot to another Rainbow user.",
        "operationId": "NotificationsIMBot",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/NotificationsIMBot"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/NotificationsIMBotSuccess"
            },
            "examples": {
              "application/json": {
                "status": "IM successfully sent",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "User with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/notifications/emails/request-company-visibility": {
      "post": {
        "tags": [
          "Notifications Emails"
        ],
        "summary": "Send a company visibility request",
        "description": "This API allows a Rainbow company administrator to send an email to another company administrator to ask for visibility between the 2 companies.   \n  \nTo accept the visibility request, the administrator of the other company have to use API [POST /api/rainbow/admin/v1.0/companies/{companyId}/accept-visibility-requests][0].   \nCompanies will be able to see each other only once the other company administrator validate the visibility request.\n\n[0]: #api-admin_companies_visibility-PostAcceptCompanyVisibilityReq",
        "operationId": "admin_RequestCompanyVisibility",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_RequestCompanyVisibility"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_RequestCompanyVisibilitySuccess"
            },
            "examples": {
              "application/json": {
                "status": "Notification by email sent.",
                "data": {
                  "email": "bob@othercompany.com"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "email",
                    "msg": "Field email is mandatory."
                  },
                  {
                    "param": "email",
                    "msg": "Field email length must be between 3 and 255 characters."
                  },
                  {
                    "param": "email",
                    "msg": "Invalid field email. Expected an email string matching the regexp: /^[a-zA-ZÀ-ÿ0-9_\\+-]+(\\.[a-zA-ZÀ-ÿ0-9_\\+-]+)*@[a-zA-ZÀ-ÿ0-9-]+(\\.[a-zA-ZÀ-ÿ0-9-]+)*\\.([a-zA-Z]{2,63})$/",
                    "value": "bobothercompany.com"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "No user found with email userdoesnotexist@company.com, not able to send company visibility request email",
                "errorDetailsCode": 404110
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "A visibility request has already been sent by admin@mycompany.com to bob@othercompany.com",
                "errorDetailsCode": 409701
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/logs/operations": {
      "get": {
        "tags": [
          "Operations Logs"
        ],
        "summary": "Get operation logs",
        "description": "This API can be used to list operation logs.   \n  \nWhen operations are done by an admin on subscription or profile (for now), an operation log is stored with the details regarding the operation.   \nEach operation log details:   \n- which resource has been updated (type and unique identifier),   \n- who performed the operation (userId, loginEmail, companyId, companyName),   \n- when the operation has been performed (operationDate),   \n- what is the type of operation (operationType: create/update/delete),   \n- how were the data before the operation (previousData),   \n- how are the data after the operation (newData).   \nA context regarding the resource for which the operation has been performed is also stored (resourceContext). At least the companyId is stored, allowing to filter on the companies for which the operation has been carried out.   \n  \nThe operation logs can be filtered based on several fields. By default, operation logs are sorted by descending operationDate (from the youngest to the oldest).   \nExamples:   \n- All operations for all the company manageable by the logged in administrator (format small): GET https://openrainbow.com/api/rainbow/admin/v1.0/logs/operations   \n- All operations done on subscription resource for all the company manageable by the logged in administrator (format full): GET https://openrainbow.com/api/rainbow/admin/v1.0/logs/operations?format=full&resourceType=subscription   \n- All operations done on subscription resource from 2017-10-01 for all the company manageable by the logged in administrator (format full): GET https://openrainbow.com/api/rainbow/admin/v1.0/logs/operations?format=full&resourceType=subscription&fromDate=2017-10-01   \n- All operations done on subscription resource between 2017-10-15 12:00:00 and 2017-10-15 12:30:00 for all the company manageable by the logged in administrator (format full): GET https://openrainbow.com/api/rainbow/admin/v1.0/logs/operations?format=full&resourceType=subscription&fromDate=2017-10-15 12:00:00toDate=2017-10-15 12:30:00   \n- All operations done on subscription resource for company 59bbbda83c43dba62752b48e from 2017-10-01 (format full): GET https://openrainbow.com/api/rainbow/admin/v1.0/logs/operations?format=full&resourceType=subscription&fromDate=2017-10-01&resourceContextCompanyId=59bbbda83c43dba62752b48e",
        "operationId": "GetOperationLog",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less operation log details in response.   \n- `small`: id operationDate operationType resourceType resourceId   \n- `medium`: id operationDate operationType resourceType resourceId doneBy resourceContext   \n- `full`: all log fields (id operationDate operationType operationMessage resourceType resourceId doneBy resourceContext previousData newData)",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of operation logs to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first operation log to retrieve (first operation log if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort operation logs list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting operation log list.",
            "required": false,
            "type": "number"
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Allows to filter operation logs from provided date (ISO 8601 format).",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "Allows to filter operation logs until provided date (ISO 8601 format).",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "resourceContextCompanyId",
            "in": "query",
            "description": "Allows to filter operation logs on field resourceContext.companyId.   \nThis allows to retrieve logs for a given company on which the operation has been performed (by default, if this filter is not provided, all the logs regarding all companies the administrator has right to manage are returned).   \nOnly companies manageable by the administrator can be provided in the filter. If a company not manageable by the admin is provided, this one is excluded from the filter (i.e. no logs regarding this company will be returned, as the administrator has no rights to manage this company).",
            "required": false,
            "type": "string"
          },
          {
            "name": "resourceContextCompanyName",
            "in": "query",
            "description": "Allows to filter operation logs on field resourceContext.companyName.   \n  \nThis allows to search logs based on target company name. The filtering is case insensitive and on partial name match: all companies **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _comp_, companies with the following names are match the filter 'My company', 'Company', 'A comp 1', 'Comp of comps', ...   \nFilter applies on companies manageable by the administrator.",
            "required": false,
            "type": "string"
          },
          {
            "name": "resourceContextUserId",
            "in": "query",
            "description": "Allows to filter operation logs on field resourceContext.userId.   \nThis allows to retrieve logs for a given user on which the operation has been performed.   \nFor now, only usable for resourceType=`profile`.",
            "required": false,
            "type": "string"
          },
          {
            "name": "doneByCompanyId",
            "in": "query",
            "description": "Allows to filter operation logs on field doneBy.companyId.   \nThis allows to retrieve logs of operations performed by administrators of a given company.",
            "required": false,
            "type": "string"
          },
          {
            "name": "operationType",
            "in": "query",
            "description": "Allows to filter operation logs on field operationType.   \nThis allows to retrieve logs for the requested operation type.",
            "required": false,
            "type": "string"
          },
          {
            "name": "resourceType",
            "in": "query",
            "description": "Allows to filter operation logs on field resourceType.   \nThis allows to retrieve logs for the requested resource type.",
            "required": false,
            "type": "string"
          },
          {
            "name": "resourceId",
            "in": "query",
            "description": "Allows to filter operation logs on field resourceId.   \nThis allows to retrieve logs for operations performed on the requested resource.   \nNote: as profiles does not have an id, resourceId of operation logs with resourceType=profile is the userId of the user owning the profile.",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetOperationLogSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "operationType": "update",
                    "doneBy": {
                      "userId": "59bbbd5e3c43dba62752b48d",
                      "loginEmail": "bpadmin@vad1.fr",
                      "displayName": "John Doe",
                      "companyId": "59bbbc253c43dba62752b48b",
                      "companyName": "VAD 1"
                    },
                    "resourceType": "subscription",
                    "resourceId": "59cce8fd31eaae4e296b98ed",
                    "resourceContext": {
                      "companyId": "59bbbda83c43dba62752b48e",
                      "companyName": "IR 1"
                    },
                    "previousData": {
                      "id": "59cce8fd31eaae4e296b98ed",
                      "offerDescription": "Rainbow Enterprise offer",
                      "isExclusive": true,
                      "zuoraSubscriptionId": "2c92c0fa5f47da3c015f59267e8006ff",
                      "zuoraChargeId": "C-00003521",
                      "canBeSold": true,
                      "isDefault": false,
                      "status": "active",
                      "provisioningNeeded": [],
                      "creationDate": "2017-09-28T12:20:13.319Z",
                      "offerId": "58ff3cdc5b9f3e48ad4fb905",
                      "syncOngoing": false,
                      "createdBy": {
                        "userId": "59bbbd5e3c43dba62752b48d",
                        "loginEmail": "bpadmin@vad1.fr",
                        "bpApplicantNumber": "HAGSH87176"
                      },
                      "maxNumberUsers": 20,
                      "bsSubscriptionId": "RB-201709006387",
                      "offerName": "Enterprise",
                      "profileId": "58ff3cda5b9f3e48ad4fb902",
                      "businessModel": "nb_users",
                      "zuoraOfferId": "2c92c0f85b1ab29a015b3ad63fbd7323",
                      "zuoraProductRatePlanId": "2c92c0f85b1ab29a015b3ad63fcf7325",
                      "zuoraProductRatePlanChargeId": "2c92c0f85b1ab29a015b3ad63fe67327",
                      "sapReference": "3EY95102AA",
                      "offerReference": "RB-Enterprise",
                      "profileName": "Enterprise"
                    },
                    "newData": {
                      "id": "59cce8fd31eaae4e296b98ed",
                      "canBeSold": true,
                      "isExclusive": true,
                      "isDefault": false,
                      "status": "active",
                      "provisioningNeeded": [],
                      "creationDate": "2017-09-28T12:20:13.319Z",
                      "isPrepaid": false,
                      "offerDescription": "Rainbow Enterprise offer",
                      "zuoraSubscriptionId": "2c92c0fa5f47da3c015f59267e8006ff",
                      "zuoraChargeId": "C-00003521",
                      "offerId": "58ff3cdc5b9f3e48ad4fb905",
                      "syncOngoing": true,
                      "createdBy": {
                        "userId": "59bbbd5e3c43dba62752b48d",
                        "loginEmail": "bpadmin@vad1.fr",
                        "bpApplicantNumber": "HAGSH87176"
                      },
                      "maxNumberUsers": 10,
                      "bsSubscriptionId": "RB-201709006387",
                      "offerName": "Enterprise",
                      "profileId": "58ff3cda5b9f3e48ad4fb902",
                      "businessModel": "nb_users",
                      "zuoraOfferId": "2c92c0f85b1ab29a015b3ad63fbd7323",
                      "zuoraProductRatePlanId": "2c92c0f85b1ab29a015b3ad63fcf7325",
                      "zuoraProductRatePlanChargeId": "2c92c0f85b1ab29a015b3ad63fe67327",
                      "sapReference": "3EY95102AA",
                      "offerReference": "RB-Enterprise",
                      "profileName": "Enterprise"
                    },
                    "operationDate": "2017-10-27T07:40:07.337Z",
                    "id": "59f2e2d73fff71194d8675ee"
                  },
                  {
                    "operationType": "delete",
                    "doneBy": {
                      "userId": "572756967bfbca0d0e09a6b4",
                      "loginEmail": "superadmin@openrainbow.com",
                      "displayName": "Super Admin",
                      "companyId": "5703d0d49ccf39843c7ef897",
                      "companyName": "Internal"
                    },
                    "resourceType": "subscription",
                    "resourceId": "59e9df97bd49d740a557ded0",
                    "resourceContext": {
                      "companyId": "59bbc1af3c43dba62752b496"
                    },
                    "previousData": {
                      "id": "59e9df97bd49d740a557ded0",
                      "offerDescription": "Rainbow Business offer",
                      "canBeSold": false,
                      "isExclusive": true,
                      "isDefault": false,
                      "status": "active",
                      "provisioningNeeded": [],
                      "creationDate": "2017-10-20T11:35:51.814Z",
                      "isPrepaid": false,
                      "offerId": "599eba1f7b8e74830998617f",
                      "syncOngoing": false,
                      "createdBy": {
                        "userId": "572756967bfbca0d0e09a6b4",
                        "loginEmail": "superadmin@openrainbow.com"
                      },
                      "maxNumberUsers": 10,
                      "offerName": "Business Demo",
                      "profileId": "58da6ef53b66b9584c1d1edf",
                      "businessModel": "nb_users",
                      "offerReference": "RB-Business",
                      "profileName": "Business"
                    },
                    "operationDate": "2017-10-26T15:47:43.709Z",
                    "id": "59f2039f3fff71194d8675ed"
                  },
                  {
                    "operationType": "create",
                    "doneBy": {
                      "userId": "59bbbd5e3c43dba62752b48d",
                      "loginEmail": "bpadmin@vad1.fr",
                      "displayName": "John Doe",
                      "companyId": "59bbbc253c43dba62752b48b",
                      "companyName": "VAD 1"
                    },
                    "resourceType": "subscription",
                    "resourceId": "59f1f4e117d5d8061d4f131a",
                    "resourceContext": {
                      "companyId": "59bbbed63c43dba62752b492",
                      "companyName": "IR1 under VAD1"
                    },
                    "newData": {
                      "id": "59f1f4e117d5d8061d4f131a",
                      "canBeSold": true,
                      "isExclusive": true,
                      "isDefault": false,
                      "status": "creating",
                      "provisioningNeeded": [],
                      "creationDate": "2017-10-26T14:44:49.539Z",
                      "isPrepaid": true,
                      "offerId": "59e8e083ca44fd228b850f39",
                      "syncOngoing": true,
                      "createdBy": {
                        "userId": "59bbbd5e3c43dba62752b48d",
                        "loginEmail": "bpadmin@vad1.fr",
                        "bpApplicantNumber": "HAGSH87176"
                      },
                      "maxNumberUsers": 40,
                      "bsSubscriptionId": "RB-201710006576",
                      "offerName": "Business 1Year",
                      "profileId": "58da6ef53b66b9584c1d1edf",
                      "offerDescription": "Rainbow Business 1 User 1 Year",
                      "businessModel": "nb_users",
                      "zuoraOfferId": "2c92c0f95b1abf84015b3acdf1ae0c32",
                      "zuoraProductRatePlanId": "2c92c0f95b1abf84015b3acdf1c50c34",
                      "zuoraProductRatePlanChargeId": "2c92c0f95b1abf84015b3acdf1dd0c36",
                      "sapReference": "3EY95101AB",
                      "offerReference": "RB-Business-1Y",
                      "expirationDate": "2018-11-01T00:00:00.000Z",
                      "profileName": "Business"
                    },
                    "operationDate": "2017-10-26T14:44:49.859Z",
                    "id": "59f1f4e117d5d8061d4f131b"
                  },
                  {
                    "operationType": "update",
                    "doneBy": {
                      "userId": "59bbbd5e3c43dba62752b48d",
                      "loginEmail": "bpadmin@vad1.fr",
                      "displayName": "John Doe",
                      "companyId": "59bbbc253c43dba62752b48b",
                      "companyName": "VAD 1"
                    },
                    "resourceType": "subscription",
                    "resourceId": "59cce8fd31eaae4e296b98ed",
                    "resourceContext": {
                      "companyId": "59bbbda83c43dba62752b48e",
                      "companyName": "IR 1"
                    },
                    "previousData": {
                      "id": "59cce8fd31eaae4e296b98ed",
                      "offerDescription": "Rainbow Enterprise offer",
                      "isExclusive": true,
                      "zuoraSubscriptionId": "2c92c0fb5f47f21c015f59163c290d87",
                      "zuoraChargeId": "C-00003521",
                      "canBeSold": true,
                      "isDefault": false,
                      "status": "active",
                      "provisioningNeeded": [],
                      "creationDate": "2017-09-28T12:20:13.319Z",
                      "offerId": "58ff3cdc5b9f3e48ad4fb905",
                      "syncOngoing": false,
                      "createdBy": {
                        "userId": "59bbbd5e3c43dba62752b48d",
                        "loginEmail": "bpadmin@vad1.fr",
                        "bpApplicantNumber": "HAGSH87176"
                      },
                      "maxNumberUsers": 25,
                      "bsSubscriptionId": "RB-201709006387",
                      "offerName": "Enterprise",
                      "profileId": "58ff3cda5b9f3e48ad4fb902",
                      "businessModel": "nb_users",
                      "zuoraOfferId": "2c92c0f85b1ab29a015b3ad63fbd7323",
                      "zuoraProductRatePlanId": "2c92c0f85b1ab29a015b3ad63fcf7325",
                      "zuoraProductRatePlanChargeId": "2c92c0f85b1ab29a015b3ad63fe67327",
                      "sapReference": "3EY95102AA",
                      "offerReference": "RB-Enterprise",
                      "profileName": "Enterprise"
                    },
                    "newData": {
                      "maxNumberUsers": 30,
                      "syncOngoing": true
                    },
                    "operationDate": "2017-10-26T14:31:52.346Z",
                    "id": "59f1f1d855561105fce7ffbb"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 4
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/organisations/{organisationId}": {
      "get": {
        "tags": [
          "Organisations"
        ],
        "summary": "Get an organisation data",
        "description": "Users with 'superadmin', 'business_admin', 'support' or 'admin' role can retrieve any company.  \n**Users with admin role (and not having superadmin, business_admin nor support role) can only retrieve organisations he has to manage..**  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/organisations/57486e5d807a594145e510d6",
        "operationId": "GetOrganisationsId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "description": "Organisation unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetOrganisationsIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57486e5d807a594145e510d6",
                  "creationDate": "2016-05-27T15:57:17.998Z",
                  "name": "ALE international",
                  "visibility": "private"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "CompanyId 56b89d26f7ab94c69ad41584 is the companyId of the default company that cannot be linked with any organisation",
                "errorDetailsCode": 400502
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate Organisation 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Organisation with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "business_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Organisations"
        ],
        "summary": "Update an organisation",
        "description": "",
        "operationId": "PutOrganisations",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "description": "Organisation unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutOrganisations"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutOrganisationsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57486e5d807a594145e510d6",
                  "creationDate": "2016-05-27T15:57:17.998Z",
                  "name": "ALE international",
                  "visibility": "private"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "param": "visibility",
                "msg": "Invalid Organisation visibility. Expected field visibility being a string and having one of the following values: private, public"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate Organisation 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Organisation with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Organisations"
        ],
        "summary": "Delete an organisation",
        "description": "",
        "operationId": "DeleteOrganisations",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "description": "Organisation unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteOrganisationsSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Organisation 57486e5d807a594145e510d6 successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "CompanyId 56b89d26f7ab94c69ad41584 is the companyId of the default company that cannot be linked with any organisation",
                "errorDetailsCode": 400502
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Organisation with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/organisations": {
      "get": {
        "tags": [
          "Organisations"
        ],
        "summary": "Get all organisations",
        "description": "Users with 'superadmin', 'support', 'business_admin' or 'admin' role can retrieve all organisations. Users with admin role (and not having superadmin, business_admin nor support role) can only retrieve organisations he has to manage.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/organisations?format=small&limit=100&offset=0&sortField=name&sortOrder=-1",
        "operationId": "GetOrganisations",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less organisation details in response.   \n- `small`: _id, name   \n- `medium`: _id, name   \n- `full`: all company fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of companies to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first company to retrieve (first company if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort organisation list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting company list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetOrganisationsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "ALE international",
                    "id": "57486e5d807a594145e510d6"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 1
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "business_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "post": {
        "tags": [
          "Organisations"
        ],
        "summary": "Create an organisation",
        "description": "For the 'Enterprise (E1)' offer, the premium offer, the Multi-Layer organization is defined. It describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS.   \nThe organization is the highest level of the customer structure. It can federate several companies.   \nAn administrator of an organization has the view of all companies below it.   \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/organisations (body \"name\":\"Organization name\")",
        "operationId": "PostOrganisations",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostOrganisations"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostOrganisationsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57486e5d807a594145e510d6",
                  "creationDate": "2016-05-27T15:57:17.998Z",
                  "name": "ALE international",
                  "visibility": "private"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "param": "visibility",
                "msg": "Invalid Organisation visibility. Expected field visibility being a string and having one of the following values: private, public"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/organisations/{organisationId}/companies/{companyId}": {
      "delete": {
        "tags": [
          "Organisations Companies"
        ],
        "summary": "Unlink the company to an organization",
        "description": "",
        "operationId": "DeleteOrganisationCompanies",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company unique identifier (like 5749ab92245015fe0d36e96a)",
            "required": true,
            "type": "string"
          },
          {
            "name": "organisationId",
            "in": "path",
            "description": "Organisation unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteOrganisationCompaniesSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Company 5749ab92245015fe0d36e96a successfully deleted from the organisation",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "CompanyId 56b89d26f7ab94c69ad41584 is the companyId of the default company that cannot be linked with any organisation",
                "errorDetailsCode": 400502
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not Found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Organisation with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/organisations/{organisationId}/companies": {
      "get": {
        "tags": [
          "Organisations Companies"
        ],
        "summary": "Get all companies linked with this organization",
        "description": "For the 'Enterprise (E1)' offer, the premium offer, the Multi-Layer organization is defined.   \nIt describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS.   \nThis api gets all companies linked with an organization.   \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/organisations/57486e5d807a594145e510d6/companies",
        "operationId": "GetOrganisationCompanies",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "description": "Organisation unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less company details in response.   \n- `small`: _id, name   \n- `medium`: _id, name, status   \n- `full`: all company fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of companies to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first company to retrieve (first company if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort company list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting company list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetOrganisationCompaniesSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "ALE_CENTRAL_TEAM",
                    "id": "5749ab92245015fe0d36e96a"
                  },
                  {
                    "name": "ALE_FR",
                    "id": "5749aa51245015fe0d36e968"
                  },
                  {
                    "name": "ALE_SP",
                    "id": "5749aa7e245015fe0d36e969"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 3
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "CompanyId 56b89d26f7ab94c69ad41584 is the companyId of the default company that cannot be linked with any organisation",
                "errorDetailsCode": 400502
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not Found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Organisation with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "business_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "post": {
        "tags": [
          "Organisations Companies"
        ],
        "summary": "Link a company to an organization",
        "description": "For the 'Enterprise (E1)' offer, the premium offer, the Multi-Layer organization is defined.   \nIt describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS.   \nThis api links a company with the given organization. Company's users are automatically attached to this organisation.   \nA company must belong to only one organisation or kept single.   \nWhen an organization is deleted, the company is automatically unlinked.   \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/organisations/57515338c5d7b862456d60a0/companies (body \"companyId\":\"5749ab92245015fe0d36e96a\")",
        "operationId": "PostOrganisationCompanies",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "description": "Organisation unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostOrganisationCompanies"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostOrganisationCompaniesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "ALE_SP",
                  "latin_name": "ale_sp",
                  "creationDate": "2016-05-28T14:26:06.886Z",
                  "statusUpdatedDate": "2016-06-07T08:55:26.708Z",
                  "settings": {
                    "iceServers": []
                  },
                  "forceHandshake": false,
                  "visibleBy": [],
                  "visibility": "private",
                  "status": "active",
                  "organisationId": "57515338c5d7b862456d60a0",
                  "offerType": "freemium",
                  "id": "5749aa7e245015fe0d36e969"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "companyId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Company with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/pcg/v1.0/pbxs/{pbxId}": {
      "get": {
        "tags": [
          "Pcg Pbxs"
        ],
        "summary": "Get a pbx data",
        "description": "This API allows to retrieve a specific pbx (system) using pbxId field.   \nIt is dedicated to PCG component.   \n  \n_Note:_ id field returned in response corresponds to portal's internal mongoDB id, while pbxId is the id handled by PCG.   \n  \nWhen the pbx (system) is updated from admin API, PCG is notified on its corresponding JID pbxpcg with the following XMPP message: \n\n    \n```html\n<message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n          from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n          to=\"pbxpcg_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com\"\n          xmlns=\"jabber:client\">\n     <config xmlns=\"urn:xmpp:pbxagent:config:1\">\n         <pbx action=\"update\"/>\n     </config>\n</message>\n```\n  \n  \nWhen the pbx (system) is deleted from admin API, PCG is notified with the following XMPP IQ.   \nPCG **must acknowledge this IQ** so that admin delete effectively the system: once IQ is acknowledged by PCG, the system is deleted from mongoDB, jid_pbxagent and jid_pbxpcg XMPP accounts are deleted from XMPP, and all phoneNumbers objects linked to this system are deleted (therefore PCG don't have to call delete for all deleted system's phoneNumbers). \n\n    \n```html\n<iq id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n          from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n          to=\"pbxpcg_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com/pbxpcg\"\n          xmlns=\"jabber:client\">\n     <config xmlns=\"urn:xmpp:pbxagent:config:1\">\n         <pbx action=\"delete\">\n     </config>\n</iq>\n```\n  \n",
        "operationId": "GetPbxId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "pbxId",
            "in": "path",
            "description": "Pbx unique identifier known by PCG",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetPbxIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "pbxId": "pbxagent_aace13f751734a6596ac6cdd567c4898",
                  "jid_pbxagent": "pbxagent_aace13f751734a6596ac6cdd567c4898@openrainbow.com",
                  "jid_pbxagent_password": "061947863a3147b5b9b28c3b5712ed83",
                  "jid_pbxpcg": "pbxpcg_fad0ec2eb92045868a32a189f31bbe90@openrainbow.com",
                  "jid_pbxpcg_password": "2001b0f5dc5245e1aa07e444d3524a76",
                  "version": "",
                  "serverPingTimeout": 120,
                  "pbxMainBundlePrefix": [
                    "0"
                  ],
                  "usePbxMainBundlePrefix": true,
                  "pbxNumberingTranslator": [],
                  "pbxNationalPrefix": "0",
                  "pbxInternationalPrefix": "00",
                  "country": "FR",
                  "statusUpdatedDate": "2016-08-10T12:57:19.298Z",
                  "creationDate": "2016-08-10T12:57:19.298Z",
                  "status": "created",
                  "siteId": [
                    "57585233d3c3e3e5095250ba"
                  ],
                  "searchResultOrder": [
                    "RAINBOW",
                    "LDAP",
                    "PBX"
                  ],
                  "type": "oxe",
                  "id": "57ab24af27fe23cc40fef473",
                  "pbxGroup": [
                    {
                      "systemId": "57ab24af27fe23cc40fef473",
                      "pbxId": "pbxagent_aace13f751734a6596ac6cdd567c4898"
                    },
                    {
                      "systemId": "57e518890d0794392aa7daed",
                      "pbxId": "pbxagent_9f8cbe9d67e4445f960378cfa17cc60c"
                    },
                    {
                      "systemId": "57e528e90a908a0e370ffb79",
                      "pbxId": "pbxagent_a78c84c15eee42b389d392febf6b0599"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Pbx with id pbxWithThisIdNotFound does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "pcg"
          }
        ]
      }
    },
    "/api/rainbow/pcg/v1.0/pbxs": {
      "get": {
        "tags": [
          "Pcg Pbxs"
        ],
        "summary": "Get all pbxs",
        "description": "This API allows to list all pbxs (systems).   \nIt is dedicated to PCG component.   \n  \n_Note:_ id field returned in response corresponds to portal's internal mongoDB id, while pbxId is the id handled by PCG.",
        "operationId": "GetPbxs",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less pbxs details in response.   \n- `small`: id pbxId version creationDate   \n- `medium`: id name pbxId serialNumber version status creationDate   \n- `full`: all pbxs fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort pbxs list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of systems to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first system to retrieve (first site if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting pbx list.",
            "required": false,
            "type": "number"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter systems list on field name.   \n  \nThe filtering is case insensitive and on partial name match: all systems **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _oxe1_, systems with the following names are match the filter 'OXE1', 'Oxe1', 'My oxe1', 'oxe12', 'My OXE12', ...",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Allows to filter systems list on the provided type(s)",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Allows to filter systems list on the provided status(es)",
            "required": false,
            "type": "string"
          },
          {
            "name": "siteId",
            "in": "query",
            "description": "Allows to filter systems list on the siteIds provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "Allows to filter systems list on the siteIds linked to companyIds provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "bpId",
            "in": "query",
            "description": "Allows to filter systems list on the bpIds provided in this option.   \nOnly `superadmin`, `support` and `bp_admin` users can use bpId filter.   \n`bp_admin` users can only use bpId filter with bpId they manage (their own BP company or companies being in their BP organisation).",
            "required": false,
            "type": "string"
          },
          {
            "name": "isShared",
            "in": "query",
            "description": "Allows to filter systems list by the status isShared.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "isCentrex",
            "in": "query",
            "description": "Allows to filter systems list by the status isCentrex.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "isSharedOrCentrex",
            "in": "query",
            "description": "Allows to filter systems list having the requested flag isShared **or** isCentrex. \n\n* If isSharedOrCentrex=true, only systems having isShared=true or isCentrex=true are returned.\n* If isSharedOrCentrex=false, only systems having isShared=false and isCentrex=false are returned.\n\n",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "fromCreationDate",
            "in": "query",
            "description": "Allows to filter systems list from provided date (ISO 8601 format).",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "toCreationDate",
            "in": "query",
            "description": "Allows to filter systems list until provided date (ISO 8601 format).",
            "required": false,
            "type": "string",
            "format": "date-time"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetPbxsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "5b0fb5136c36f4d42effc022",
                    "pbxId": "PBXdf74-d323-fc4e-4849-abaf-aad6-c986-7a46",
                    "version": "3.1.3",
                    "creationDate": "2018-05-31T08:40:51.097Z"
                  },
                  {
                    "id": "575beb22ccb329a11a1cef6c",
                    "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                    "version": "1.9.1",
                    "creationDate": "2018-06-19T16:14:44.944Z"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "pcg"
          }
        ]
      }
    },
    "/api/rainbow/pcg/v1.0/pbxs/{pbxId}/phone-numbers/short-number/{shortNumber}": {
      "get": {
        "tags": [
          "Pcg Pbxs Phone Numbers"
        ],
        "summary": "Get a pbx phone number",
        "description": "This API allows to retrieve a specific phoneNumber associated to a given pbx (system) using short number value.   \nIt is dedicated to PCG component.   \n  \n_Note:_`systemId` field returned in response corresponds to portal's internal mongoDB id, while `pbxId` is the id handled by PCG.   \n  \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers/short-number/1001",
        "operationId": "GetPcgPbxPhoneNbShortNb",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "pbxId",
            "in": "path",
            "description": "Pbx unique identifier (known by PCG, and corresponding to a system known by admin portal, ex: pbxagent_315e5b2dbf8746fd93660df375933c23)",
            "required": true,
            "type": "string"
          },
          {
            "name": "shortNumber",
            "in": "path",
            "description": "Phone number's short number",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetPcgPbxPhoneNbShortNbSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5790fd2256b61a4d865839fe",
                  "shortNumber": "1001",
                  "internalNumber": "20001",
                  "voiceMailNumber": "9999",
                  "number": "0300001001",
                  "numberE164": "+33300001001",
                  "pbxUserId": "1",
                  "country": "FR",
                  "type": "work",
                  "deviceType": "landline",
                  "isFromSystem": true,
                  "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                  "systemId": "575beb22ccb329a11a1cef6c",
                  "isMonitored": false,
                  "firstName": "firstName",
                  "lastName": "lastName",
                  "deviceName": "4038"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "phoneNumber with pbxId pbxagent_315e5b2dbf8746fd93660df375933c23 and shortNumber 1001 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "pcg"
          }
        ]
      },
      "put": {
        "tags": [
          "Pcg Pbxs Phone Numbers"
        ],
        "summary": "Update a pbx phone number",
        "description": "This API allows to update a phone number for a given pbx (system) using short number value.   \nIt is dedicated to PCG component.   \n_Notes:_* `pbxId` is the id handled by PCG, while `systemId` field (returned in response) corresponds to portal's internal mongoDB id of related system document (auto-filled by server during phone number creation).\n* `pbxId` and `systemId` can't be modified.\n\n  \n  \nExample: PUT https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers/short-number/1001",
        "operationId": "PutPcgPbxPhoneNbShortNb",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "pbxId",
            "in": "path",
            "description": "Pbx unique identifier (known by PCG, and corresponding to a system known by admin portal, ex: pbxagent_315e5b2dbf8746fd93660df375933c23)",
            "required": true,
            "type": "string"
          },
          {
            "name": "shortNumber",
            "in": "path",
            "description": "Phone number's short number",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutPcgPbxPhoneNbShortNb"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutPcgPbxPhoneNbShortNbSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5790fd2256b61a4d865839fe",
                  "shortNumber": "1001",
                  "internalNumber": "20001",
                  "voiceMailNumber": "9999",
                  "number": "0300001001",
                  "numberE164": "+33300001001",
                  "pbxUserId": "1",
                  "country": "FR",
                  "type": "work",
                  "deviceType": "landline",
                  "isFromSystem": true,
                  "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                  "systemId": "575beb22ccb329a11a1cef6c",
                  "isMonitored": false,
                  "firstName": "firstName",
                  "lastName": "lastName",
                  "deviceName": "4038"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "phoneNumber with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Pbx pbxagent_315e5b2dbf8746fd93660df375933c23 already has a phoneNumber with shortNumber 1001",
                "errorDetailsCode": 409551
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "pcg"
          }
        ]
      },
      "delete": {
        "tags": [
          "Pcg Pbxs Phone Numbers"
        ],
        "summary": "Delete a pbx phone number",
        "description": "This API allows to delete a phone number for a given pbx (system) using short number value.   \nIt is dedicated to PCG component.   \n  \nIf the deleted phoneNumber was assigned to a Rainbow user (`userId` field), the phoneNumber is automatically de-associated to this user.   \n  \nExample: DELETE https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers/short-number/1001",
        "operationId": "DeletePcgPbxPhoneNbShortNb",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "pbxId",
            "in": "path",
            "description": "Pbx unique identifier (known by PCG, and corresponding to a system known by admin portal, ex: pbxagent_315e5b2dbf8746fd93660df375933c23)",
            "required": true,
            "type": "string"
          },
          {
            "name": "shortNumber",
            "in": "path",
            "description": "Phone number's short number",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeletePcgPbxPhoneNbShortNbSuccess"
            },
            "examples": {
              "application/json": {
                "status": "phoneNumber 5790fd2256b61a4d865839fe successfully deleted",
                "data": {
                  "id": "5790fd2256b61a4d865839fe",
                  "shortNumber": "1001",
                  "number": "0300001001",
                  "numberE164": "+33300001001",
                  "pbxUserId": "1",
                  "country": "FR",
                  "type": "work",
                  "deviceType": "landline",
                  "isFromSystem": true,
                  "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                  "systemId": "575beb22ccb329a11a1cef6c",
                  "isMonitored": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "phoneNumber with pbxId pbxagent_315e5b2dbf8746fd93660df375933c23 and shortNumber 1001 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "pcg"
          }
        ]
      }
    },
    "/api/rainbow/pcg/v1.0/pbxs/{pbxId}/phone-numbers": {
      "get": {
        "tags": [
          "Pcg Pbxs Phone Numbers"
        ],
        "summary": "Get all pbx phone numbers",
        "description": "This API allows to list all phoneNumbers associated to a given pbx (system).   \nIt is dedicated to PCG component.   \n  \n_Notes:_* `systemId` field returned in response corresponds to portal's internal mongoDB id, while `pbxId` is the id handled by PCG.\n* This API is not paginated: all phoneNumbers from the requested pbx are returned.\n* phoneNumbers list can be filtered on the following fields:\n\n  * `shortNumber`: allow to retrieve only phoneNumbers starting by the provided value.   \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**shortNumber=123**\n  * `internalNumber`: allow to retrieve only phoneNumbers starting by the provided value.   \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**internalNumber=123**\n  * `pbxUserId`: allow to retrieve only phoneNumbers having the provided pbxUserId value.   \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**pbxUserId=123**\n  * `isMonitored`: allow to retrieve only phoneNumbers for which monitoring in Rainbow application is activated (true) or deactivated (false).   \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**isMonitored=true**\n  * `isAssignedToUser`: allow to retrieve only phoneNumbers being associated (true) or not (false) to a Rainbow user.   \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**isAssignedToUser=true**\n  * `firstName or lastName`: allow to retrieve only phoneNumbers where firstname or lastName starts with the provided keyword(s).   \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**name=david**\n  * `deviceName`: allow to retrieve only phoneNumbers having the provided deviceName value.   \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**deviceName=8082**\n  * `companyPrefix`: allow to retrieve only phoneNumbers having the provided companyPrefix value. **See below 'Sharing a system between several companies'**  \nExample: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**companyPrefix=8210**\n\n* Filters can be combined.   \nExample: retrieve the list of phoneNumbers being associated to a Rainbow user and for which monitoring is enabled in Rainbow application: GET https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers?**isAssignedToUser=true**&**isMonitored=true**&limit=100&offset=0\n\n  \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities.  \nWhen the PCG handles a directoryNumber from this system (create/update) two more data are available: \"companyName\", \"companyPrefix\".  \nThese data are stored and it's now possible to get all phoneNumbers having the given \"companyPrefix\".",
        "operationId": "GetPcgPbxPhoneNb",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "pbxId",
            "in": "path",
            "description": "Pbx unique identifier (known by PCG, and corresponding to a system known by admin portal, ex: pbxagent_315e5b2dbf8746fd93660df375933c23)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less phone numbers details in response.   \n- `small`: id shortNumber isMonitored   \n- `medium`: id shortNumber pbxUserId pbxId isMonitored firstName lastName deviceName jid_im jid_tel jid_password   \n- `full`: all phone numbers fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "shortNumber",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having shortNumber field starting with the provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "internalNumber",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having internalNumber field starting with the provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "pbxUserId",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having pbxUserId field equal to provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "companyPrefix",
            "in": "query",
            "description": "When the system is a centrex server (multi-tenant OXE), allow to filter phoneNumbers list on companyPrefix.The companyPrefix value to set is named 'tenantCallNumber' in companies data model. \n\n* 8210: return all phoneNumbers having the prefix 8210, then allocated to the company having the 'tenantCallNumber' 8210 (exact match)\n\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "isMonitored",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having isMonitored field equal to provided value.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having firstName or lastName starting with the provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "deviceName",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having deviceName field equal to provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "isAssignedToUser",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers being assigned or not to a Rainbow user, according to provided value. \n\n* true: return all phoneNumbers having userId !== null\n* false: return all phoneNumbers having userId === null\n\n",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of phone numbers to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first phone number to retrieve (first phone number if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort phone numbers list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting phone numbers list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetPcgPbxPhoneNbSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "5790fd2256b61a4d865839fe",
                    "shortNumber": "1001",
                    "internalNumber": "20001",
                    "pbxUserId": "1",
                    "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                    "isMonitored": true,
                    "firstName": "firstName",
                    "lastName": "lastName",
                    "deviceName": "4038",
                    "jid_im": "82fc7375cf34403a9c711ae7eda0929f@openrainbow.com",
                    "jid_tel": "tel_82fc7375cf34403a9c711ae7eda0929f@openrainbow.com",
                    "jid_password": "fd6806bca74942598f57c288b0d50baa"
                  },
                  {
                    "id": "5790fd2256b61a4d865839ff",
                    "shortNumber": "1002",
                    "internalNumber": "20002",
                    "pbxUserId": "2",
                    "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                    "isMonitored": false,
                    "firstName": "firstName",
                    "lastName": "lastName",
                    "deviceName": "4038"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "pcg"
          }
        ]
      },
      "post": {
        "tags": [
          "Pcg Pbxs Phone Numbers"
        ],
        "summary": "Create a pbx phone number",
        "description": "This API allows to create a phone number for a given pbx (system).   \nIt is dedicated to PCG component.   \n  \n_Note:_`pbxId` is the id handled by PCG, while `systemId` field (returned in response) corresponds to portal's internal mongoDB id of related system document (auto-filled by server during phone number creation).   \n  \nWhen the phone number object is updated from admin API (Rainbow user association / dissociation, isMonitored flag updated, numberE164 filled, ...), PCG is notified on its corresponding JID pbxpcg with the following XMPP message: \n\n    \n```html\n<message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n          from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n          to=\"pbxpcg_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com\"\n          xmlns=\"jabber:client\">\n     <config xmlns=\"urn:xmpp:pbxagent:config:1\">\n         <user device=\"1001\" action=\"update\"/>\n     </config>\n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/pcg/v1.0/pbxs/pbxagent_315e5b2dbf8746fd93660df375933c23/phone-numbers",
        "operationId": "PostPcgPbxPhoneNb",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "pbxId",
            "in": "path",
            "description": "Pbx unique identifier (known by PCG, and corresponding to a system known by admin portal, ex: pbxagent_315e5b2dbf8746fd93660df375933c23)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostPcgPbxPhoneNb"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostPcgPbxPhoneNbSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5790fd2256b61a4d865839fe",
                  "shortNumber": "1001",
                  "internalNumber": "20001",
                  "voiceMailNumber": "9999",
                  "number": "0300001001",
                  "numberE164": "+33300001001",
                  "pbxUserId": "1",
                  "country": "FR",
                  "type": "work",
                  "deviceType": "landline",
                  "isFromSystem": true,
                  "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                  "systemId": "575beb22ccb329a11a1cef6c",
                  "isMonitored": false,
                  "firstName": "firstName",
                  "lastName": "lastName",
                  "deviceName": "4038"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Pbx with id pbxagent_315e5b2dbf8746fd93660df375933c23 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "System 569ce8c8f9336c471b98eda1 is not isCentrex. And the phoneNumber seems coming from a system multi-tenant [8210] 1001",
                "errorDetailsCode": 409554
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "pcg"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/phone-numbers/analyze": {
      "post": {
        "tags": [
          "Phone Numbers"
        ],
        "summary": "Analyze phone number",
        "description": "This API allows to analyze a phone number using google libphonenumber.   \nThis API can be used for debugging purpose.",
        "operationId": "PhoneNumbersAnalyze",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PhoneNumbersAnalyze"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PhoneNumbersAnalyzeSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "inputPhoneNumber": "03 90 67 00 00",
                  "inputCountryCode": "FR",
                  "checkedCountryCode": "FR",
                  "parseAndKeepRawInput": {
                    "country_code": 33,
                    "national_number": 390670000,
                    "raw_input": "03 90 67 00 00",
                    "country_code_source": 20
                  },
                  "isPossibleNumber": true,
                  "isPossibleNumberWithReason": "IS_POSSIBLE",
                  "isValidNumber": true,
                  "isValidNumberForRegion": true,
                  "getRegionCodeForNumber": "FR",
                  "getNumberType": "FIXED_LINE",
                  "e164": "+33390670000",
                  "international": "+33 3 90 67 00 00",
                  "national": "03 90 67 00 00",
                  "rfc3966": "tel:+33-3-90-67-00-00",
                  "canBeInternationallyDialled": true,
                  "getLengthOfGeographicalAreaCode": 1,
                  "getLengthOfNationalDestinationCode": 1,
                  "isNumberGeographical": true,
                  "getNationalSignificantNumber": "390670000",
                  "getCountryCodeForRegion": 33,
                  "getRegionCodeForCountryCode": "FR",
                  "getRegionCodesForCountryCode": [
                    "FR"
                  ],
                  "isAlphaNumber": false,
                  "maybeStripExtension": "",
                  "hasNationalNumber": true,
                  "nationalNumberCount": 1,
                  "getNationalNumber": 390670000,
                  "hasCountryCode": true,
                  "countryCodeCount": 1,
                  "getCountryCode": 33,
                  "hasExtension": false,
                  "hasItalianLeadingZero": false,
                  "hasNumberOfLeadingZeros": false,
                  "hasRawInput": false,
                  "hasCountryCodeSource": false,
                  "hasPreferredDomesticCarrierCode": false
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/catalogs/{catalogId}": {
      "put": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Update a catalog",
        "description": "This API can be used to update a catalog.",
        "operationId": "admin_PutRainbowCatalogs",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowCatalogs"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowCatalogsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5984494643af69df7fda80e8",
                  "name": "A catalog without conference",
                  "description": "Catalog with Essential, Business and Enterprise offers (i.e. without Conference offer)",
                  "isDefault": false,
                  "creationDate": "2017-08-04T10:15:34.756Z",
                  "offersList": [
                    "5979fa62b8ae6cab0d5e53b5",
                    "598447213954d8d767728916",
                    "58072f646237427a3687dc90"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "No Catalog data provided for update. Expected optional fields: name, description",
                "errorDetailsCode": 400100
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Catalog with id 5984494643af69df7fda80e8 does not exist, not able to update it.",
                "errorDetailsCode": 404001
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Delete a catalog",
        "description": "This API can be used to delete a catalog.   \nDeletion of catalogs is not allowed if this catalog is associated to company(ies).   \nDeletion of default catalog is not allowed.",
        "operationId": "admin_DeleteRainbowCatalogs",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_DeleteRainbowCatalogsSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Catalog 5984494643af69df7fda80e8 successfully deleted",
                "data": []
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Rainbow catalog 5979f63bae6056aadd1a8f17 is the default catalog, not possible to delete it",
                "errorDetailsCode": 403602
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Catalog with id 5984494643af69df7fda80e8 does not exist, not able to delete it.",
                "errorDetailsCode": 404002
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/catalogs/{catalogId}/offers/{offerId}": {
      "post": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Add an offer to a catalog",
        "description": "This API can be used to add an offer to a catalog.   \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/catalogs/5984494643af69df7fda80e8/offers/58072f646237427a3687dc90",
        "operationId": "admin_PostRainbowCatalogsFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "offerId",
            "in": "path",
            "description": "Unique identifier of the offer to add in the catalog.",
            "required": true,
            "type": "string"
          },
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowCatalogsFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5984494643af69df7fda80e8",
                  "name": "A catalog without conference",
                  "description": "Catalog with Essential, Business and Enterprise offers (i.e. without Conference offer)",
                  "isDefault": false,
                  "creationDate": "2017-08-04T10:15:34.756Z",
                  "offersList": [
                    "5979fa62b8ae6cab0d5e53b5",
                    "598447213954d8d767728916",
                    "58072f646237427a3687dc90"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "catalogId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  },
                  {
                    "param": "offerId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Offer with id 58072f646237427a3687dc90 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Catalog with offerId = 58072f646237427a3687dc90 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Remove an offer from a catalog",
        "description": "This API can be used to remove an offer from a catalog.   \nExample: DELETE https://openrainbow.com/api/rainbow/admin/v1.0/catalogs/5984494643af69df7fda80e8/offers/58072f646237427a3687dc90",
        "operationId": "admin_DeleteRainbowCatalogsFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "offerId",
            "in": "path",
            "description": "Unique identifier of the offer to remove from the catalog.",
            "required": true,
            "type": "string"
          },
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_DeleteRainbowCatalogsFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "status": "OfferId 58072f646237427a3687dc90 successfully removed from Catalog 5984494643af69df7fda80e8",
                "data": {
                  "id": "5984494643af69df7fda80e8",
                  "name": "A catalog without conference",
                  "description": "Catalog with Essential, Business and Enterprise offers (i.e. without Conference offer)",
                  "isDefault": false,
                  "creationDate": "2017-08-04T10:15:34.756Z",
                  "offersList": [
                    "5979fa62b8ae6cab0d5e53b5",
                    "598447213954d8d767728916"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "catalogId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  },
                  {
                    "param": "offerId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Offer 58072f646237427a3687dc90 in catalog with id 5984494643af69df7fda80e8 does not exist, not able to update it.",
                "errorDetailsCode": 404001
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/catalogs/{catalogId}/service-description": {
      "get": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Get a service description file",
        "description": "This API can be used to get a service description pdf file linked to a catalog.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/catalogs/5984494643af69df7fda80e8/service-description",
        "operationId": "admin_GetRainbowCatalogsServiceDescription",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetRainbowCatalogsServiceDescriptionSuccess"
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "catalogId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Service description file with id 59de6b18d4dfb727e6750954 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "post": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Upload a service description file",
        "description": "This API can be used to upload a service description pdf file linked to a catalog.   \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/catalogs/5984494643af69df7fda80e8/service-description   \nRules: \n\n* Service description file has to be sent directly in http body (no JSon).\n* Only .pdf format is supported.\n* By default, pdf file size is limited to 10 MB.\n* Content-type should be set to 'application/pdf' in request header.\n\n",
        "operationId": "admin_PostRainbowCatalogsServiceDescription",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowCatalogsServiceDescriptionSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Service Description file successfully uploaded for catalog 59de6b18d4dfb727e6750954"
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "catalogId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Catalog with id 5984494643af69df7fda80e8 does not exist, not able to update it.",
                "errorDetailsCode": 404001
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Delete a service description file",
        "description": "This API can be used to delete a service description linked to a catalog.   \nExample: DELETE https://openrainbow.com/api/rainbow/admin/v1.0/catalogs/5984494643af69df7fda80e8/service-description",
        "operationId": "admin_DeleteRainbowCatalogsServiceDescription",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_DeleteRainbowCatalogsServiceDescriptionSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Successfully deleted service description file linked to catalog 59de6b18d4dfb727e6750954"
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "catalogId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Service description file with id 59de6b18d4dfb727e6750954 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/catalogs/default": {
      "get": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Get default catalog",
        "description": "Get the default Rainbow catalog   \nDefault catalog is the catalog which is automatically assigned to newly created companies.   \n  \n`superadmin` can change the catalog associated to a given company using API [PUT /api/rainbow/admin/v1.0/companies/{companyId}][0].\n\n[0]: #api-companies-PutCompanies",
        "operationId": "admin_GetDefaultRainbowCatalog",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetDefaultRainbowCatalogSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5979f63bae6056aadd1a8f17",
                  "name": "Rainbow catalog",
                  "description": "The default Rainbow catalog with Essential, Business, Enterprise and Conference offers",
                  "isDefault": true,
                  "creationDate": "2017-07-27T14:18:41.066Z",
                  "offersList": [
                    "5979fa62b8ae6cab0d5e53b5",
                    "598447213954d8d767728916",
                    "5979f641ae6056aadd1a8f18",
                    "5979f5ac9b4375aa9af22e93"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin,support",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Catalog with id 5984494643af69df7fda80e8 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/catalog/{catalogId}": {
      "get": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Get a catalog",
        "description": "",
        "operationId": "admin_GetRainbowCatalogById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetRainbowCatalogByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5984494643af69df7fda80e8",
                  "name": "A catalog without conference",
                  "description": "Catalog with Essential, Business and Enterprise offers (i.e. without Conference offer)",
                  "isDefault": false,
                  "creationDate": "2017-08-04T10:15:34.756Z",
                  "offersList": [
                    "5979fa62b8ae6cab0d5e53b5",
                    "598447213954d8d767728916",
                    "58072f646237427a3687dc90"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin,support",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/catalogs": {
      "get": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Get all catalogs",
        "description": "",
        "operationId": "admin_GetRainbowCatalogs",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less catalog details in response.   \n- `small`: id name   \n- `medium`: id name description isDefault   \n- `full`: all offer fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter catalog list on field name.",
            "required": false,
            "type": "string"
          },
          {
            "name": "isDefault",
            "in": "query",
            "description": "Allows to filter catalog list on field isDefault.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "offerId",
            "in": "query",
            "description": "Allows to filter catalog list on field offersList (allow to list catalogs having a given offerId in their offersList).",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of catalogs to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first catalog to retrieve (first catalog if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort catalog list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting catalog list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetRainbowCatalogsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "5979f63bae6056aadd1a8f17",
                    "name": "Rainbow catalog",
                    "description": "The default Rainbow catalog with Essential, Business, Enterprise and Conference offers",
                    "isDefault": true,
                    "creationDate": "2017-07-27T14:18:41.066Z",
                    "offersList": [
                      "5979fa62b8ae6cab0d5e53b5",
                      "598447213954d8d767728916",
                      "5979f641ae6056aadd1a8f18",
                      "5979f5ac9b4375aa9af22e93"
                    ]
                  },
                  {
                    "id": "5984494643af69df7fda80e8",
                    "name": "A catalog without conference",
                    "description": "Catalog with Essential, Business and Enterprise offers (i.e. without Conference offer)",
                    "isDefault": false,
                    "creationDate": "2017-08-04T10:15:34.756Z",
                    "offersList": [
                      "5979fa62b8ae6cab0d5e53b5",
                      "598447213954d8d767728916",
                      "58072f646237427a3687dc90"
                    ]
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "post": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Create a catalog",
        "description": "This API can be used to create a catalog.",
        "operationId": "admin_PostRainbowCatalogs",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowCatalogs"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowCatalogsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5984494643af69df7fda80e8",
                  "name": "A catalog without conference",
                  "description": "Catalog with Essential, Business and Enterprise offers (i.e. without Conference offer)",
                  "isDefault": false,
                  "creationDate": "2017-08-04T10:15:34.756Z",
                  "offersList": [
                    "5979fa62b8ae6cab0d5e53b5",
                    "598447213954d8d767728916",
                    "58072f646237427a3687dc90"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/catalogs/default/{catalogId}": {
      "put": {
        "tags": [
          "Rainbow Catalogs"
        ],
        "summary": "Set a catalog as default",
        "description": "This API can be used to change default Rainbow catalog.   \nThe flag isDefault of previous default catalog is set to false, and the flag isDefault of the specified catalog is set to true.   \nPrevious default catalog stays the default catalog for companies having already this catalog as default.",
        "operationId": "admin_PutRainbowCatalogsDefault",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "catalogId",
            "in": "path",
            "description": "Catalog unique identifier.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowCatalogsDefaultSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5984494643af69df7fda80e8",
                  "name": "A catalog without conference",
                  "description": "Catalog with Essential, Business and Enterprise offers (i.e. without Conference offer)",
                  "isDefault": false,
                  "creationDate": "2017-08-04T10:15:34.756Z",
                  "offersList": [
                    "5979fa62b8ae6cab0d5e53b5",
                    "598447213954d8d767728916",
                    "58072f646237427a3687dc90"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "catalogId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Catalog with id 5984494643af69df7fda80e8 does not exist, not able to update it.",
                "errorDetailsCode": 404001
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Catalog 5979f63bae6056aadd1a8f17 is already the default catalog",
                "errorDetailsCode": 409300
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/features/{featureId}": {
      "get": {
        "tags": [
          "Rainbow Features"
        ],
        "summary": "Get a feature",
        "description": "Get a feature from its id   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/features/5745b14694397864437b84a8",
        "operationId": "admin_GetRainbowFeatureById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "featureId",
            "in": "path",
            "description": "Feature unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetRainbowFeatureByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5745b14694397864437b84a8",
                  "name": "Company admin",
                  "uniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
                  "description": "Define the number of company admins allowed",
                  "type": "number",
                  "creationDate": "2016-10-14T16:20:58.896Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "put": {
        "tags": [
          "Rainbow Features"
        ],
        "summary": "Update a feature",
        "description": "This API can be used to update a feature.   \nOnly feature name and description can be updated.   \nType and uniqueRef can't be modified, as they are linked to restrictions applied to this feature which are controlled by servers/clients",
        "operationId": "admin_PutRainbowFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "featureId",
            "in": "path",
            "description": "Feature unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowFeatures"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5745b14694397864437b84a8",
                  "name": "Company admin",
                  "uniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
                  "description": "Define the number of company admins allowed",
                  "type": "number",
                  "creationDate": "2016-10-14T16:20:58.896Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "delete": {
        "tags": [
          "Rainbow Features"
        ],
        "summary": "Delete a feature",
        "description": "This API can be used to delete a feature.",
        "operationId": "admin_DeleteRainbowFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "featureId",
            "in": "path",
            "description": "Feature unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_DeleteRainbowFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "status": "RainbowFeature 57b44e9c0c32e0b425252f9e successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/features": {
      "get": {
        "tags": [
          "Rainbow Features"
        ],
        "summary": "Get all features",
        "description": "List available features for which restrictions are applied for some Rainbow offers",
        "operationId": "admin_GetRainbowFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less feature details in response.   \n- `small`: id name   \n- `medium`: id name description   \n- `full`: all feature fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter feature list on field name.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of features to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first feature to retrieve (first feature if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort feature list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting feature.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetRainbowFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "5745b14694397864437b84a8",
                    "name": "Company admin",
                    "uniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
                    "description": "Define the number of company admins allowed",
                    "type": "number",
                    "creationDate": "2016-10-14T16:20:58.896Z"
                  },
                  {
                    "id": "5745b147f0674c7c43417997",
                    "name": "PBX Conference call",
                    "uniqueRef": "CONFERENCE_CALL",
                    "description": "Define if PBX Conference Call control is enabled",
                    "type": "boolean",
                    "creationDate": "2016-10-14T16:29:12.432"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "post": {
        "tags": [
          "Rainbow Features"
        ],
        "summary": "Create a feature",
        "description": "This API can be used to create a feature.",
        "operationId": "admin_PostRainbowFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowFeatures"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5745b14694397864437b84a8",
                  "name": "Company admin",
                  "uniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
                  "description": "Define the number of company admins allowed",
                  "type": "number",
                  "creationDate": "2016-10-14T16:20:58.896Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/offers": {
      "get": {
        "tags": [
          "Rainbow Offers"
        ],
        "summary": "Get all offers",
        "description": "List available offers which can be subscribed by companies.   \nThis corresponds to Marketing Rainbow offers. They are linked to a profile.   \nIf the offers are charged (i.e. can be sold), field canBeSold has to be set to true, and associated IDs in Zuora catalog offers has to be set (fields zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId).   \nWhen a subscription to a charged offer is done for a company, a subscription is created in Zuora for the related Zuora offer.   \n  \nIn all cases (i.e. even if the offer is not charged), when a subscription to an offer is done for a company, the subscription is added to the company subscriptions list. Each subscription entry contains the subscribed Rainbow OfferId and the related profileId.   \n  \nIf the profile associated to an offer is changed, existing company subscriptions are still linked to the previous profile.",
        "operationId": "GetApiRainbowAdminV10Offers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "businessSpecific",
            "in": "query",
            "description": "Allows to filter offer list on field businessSpecific.",
            "required": false,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less offer details in response.   \n- `small`: id name   \n- `medium`: id name description   \n- `full`: all offer fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter offer list on field name.",
            "required": false,
            "type": "string"
          },
          {
            "name": "canBeSold",
            "in": "query",
            "description": "Allows to filter offer list on field canBeSold.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "autoSubscribe",
            "in": "query",
            "description": "Allows to filter offer list on field autoSubscribe.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "isExclusive",
            "in": "query",
            "description": "Allows to filter offer list on field isExclusive.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "isPrepaid",
            "in": "query",
            "description": "Allows to filter offer list on field isPrepaid.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "profileId",
            "in": "query",
            "description": "Allows to filter offer list on field profileId.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "offerReference",
            "in": "query",
            "description": "Allows to filter offer list on field offerReference.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "sapReference",
            "in": "query",
            "description": "Allows to filter offer list on field sapReference.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of offers to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first offer to retrieve (first offer if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort offer list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting offer list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetApiRainbowAdminV10OffersSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "58050dc17c37990d161f6cb3",
                    "name": "Essential",
                    "description": "Essential offer",
                    "isDefault": true,
                    "creationDate": "2016-10-19T12:54:30.523",
                    "profileId": "57cd4346d8793a0d124aa21e",
                    "sapReference": "3EY95001AA",
                    "offerReference": "RB-Essential",
                    "isExclusive": false
                  },
                  {
                    "id": "58072f646237427a3687dc90",
                    "name": "Enterprise",
                    "description": "Rainbow Enterprise offer",
                    "technicalDescription": "Enterprise offer for BP VAD",
                    "profileId": "57cd90ddc04fd92e232ae258",
                    "isDefault": false,
                    "canBeSold": true,
                    "businessModel": "nb_users",
                    "isExclusive": true,
                    "provisioningNeeded": [
                      {
                        "providerType": "JANUS",
                        "mediaType": "webrtc"
                      }
                    ],
                    "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
                    "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
                    "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
                    "sapReference": "3EY95003AA",
                    "offerReference": "RB-Enterprise",
                    "creationDate": "2017-04-25T12:11:08.717Z"
                  },
                  {
                    "id": "59e8e083ca44fd228b850f39",
                    "name": "Business 1Year",
                    "description": "Rainbow Enterprise offer",
                    "technicalDescription": "Rainbow Business 1 User 1 Year",
                    "isDefault": false,
                    "creationDate": "2017-10-19T14:12:13.352",
                    "profileId": "58da6ef53b66b9584c1d1edf",
                    "canBeSold": true,
                    "businessModel": "nb_users",
                    "isExclusive": true,
                    "isPrepaid": true,
                    "prepaidDuration": 12,
                    "provisioningNeeded": [
                      {
                        "providerType": "JANUS",
                        "mediaType": "webrtc"
                      }
                    ],
                    "zuoraOfferId": "2c92c0f95b1abf84015b3acdf1ae0c32",
                    "zuoraProductRatePlanId": "2c92c0f95b1abf84015b3acdf1c50c34",
                    "zuoraProductRatePlanChargeId": "2c92c0f95b1abf84015b3acdf1dd0c36",
                    "sapReference": "3EY95101AB",
                    "offerReference": "RB-Business-1Y"
                  },
                  {
                    "id": "58ff3cdc5b9f3e48ad4fb906",
                    "name": "Conference",
                    "description": "Rainbow Conference offer",
                    "technicalDescription": "Conference offer for BP VAD",
                    "profileId": "58ff3cdb5b9f3e48ad4fb903",
                    "isDefault": false,
                    "canBeSold": true,
                    "businessModel": "usage",
                    "isExclusive": false,
                    "provisioningNeeded": [
                      {
                        "providerType": "PGI",
                        "pgiEnterpriseId": "testEnterpriseId"
                      }
                    ],
                    "zuoraOfferId": "2c92c0f95c14fb2c015c15bb8cb56926",
                    "zuoraProductRatePlanId": "2c92c0f95c14fb2c015c15bdaa8b79c1",
                    "zuoraProductRatePlanChargeId": "2c92c0f95c14fb2c015c15c00da07657",
                    "sapReference": "3EY95004AA",
                    "offerReference": "RB-Conference",
                    "creationDate": "2017-04-25T12:11:08.797Z"
                  },
                  {
                    "id": "59c90c7b0fe29371266e8a23",
                    "latin_name": "healthcare",
                    "name": "HealthCare",
                    "description": "Offer for HealthCare companies",
                    "profileId": "58f6393cdbcd448f0cf518ee",
                    "businessModel": "flat_fee",
                    "businessSpecific": [
                      "HDS"
                    ],
                    "autoSubscribe": true,
                    "zuoraOfferId": "2c92c0f85e9db193015e9fe579a23ceb",
                    "zuoraProductRatePlanId": "2c92c0f85e9db193015e9fe579b23ced",
                    "zuoraProductRatePlanChargeId": "2c92c0f85e9db193015e9fe579c13cf5",
                    "sapReference": "3EY95004HB",
                    "offerReference": "RB-Healthcare",
                    "canBeSold": true,
                    "isDefault": false,
                    "creationDate": "2018-08-21T18:57:12.321Z",
                    "technicalDescription": "HealthCare for BP VAD",
                    "isExclusive": false
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 5
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "post": {
        "tags": [
          "Rainbow Offers"
        ],
        "summary": "Create an offer",
        "description": "This API can be used to create an offer.",
        "operationId": "admin_PostRainbowOffers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowOffers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowOffersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "58072f646237427a3687dc90",
                  "name": "Enterprise",
                  "description": "Rainbow Enterprise offer",
                  "technicalDescription": "Enterprise offer for BP VAD",
                  "isDefault": false,
                  "creationDate": "2016-10-19T14:12:13.352",
                  "profileId": "57cd90ddc04fd92e232ae258",
                  "canBeSold": true,
                  "businessModel": "nb_users",
                  "businessSpecific": [
                    "NONE"
                  ],
                  "autoSubscribe": false,
                  "isExclusive": true,
                  "provisioningNeeded": [
                    {
                      "providerType": "JANUS",
                      "mediaType": "webrtc"
                    }
                  ],
                  "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
                  "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
                  "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
                  "sapReference": "3EY95003AA",
                  "offerReference": "RB-Enterprise"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Offer with technicalDescription = Business 1Year already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/offers/{offerId}": {
      "get": {
        "tags": [
          "Rainbow Offers"
        ],
        "summary": "Get an offer",
        "description": "Get an offer from its id   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/offers/58072f646237427a3687dc90",
        "operationId": "admin_GetRainbowOfferById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "offerId",
            "in": "path",
            "description": "Offer unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetRainbowOfferByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "58072f646237427a3687dc90",
                  "name": "Enterprise",
                  "description": "Rainbow Enterprise offer",
                  "technicalDescription": "Enterprise offer for BP VAD",
                  "isDefault": false,
                  "creationDate": "2016-10-19T14:12:13.352",
                  "profileId": "57cd90ddc04fd92e232ae258",
                  "canBeSold": true,
                  "businessModel": "nb_users",
                  "businessSpecific": [
                    "NONE"
                  ],
                  "autoSubscribe": false,
                  "isExclusive": true,
                  "provisioningNeeded": [
                    {
                      "providerType": "JANUS",
                      "mediaType": "webrtc"
                    }
                  ],
                  "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
                  "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
                  "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
                  "sapReference": "3EY95003AA",
                  "offerReference": "RB-Enterprise"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "put": {
        "tags": [
          "Rainbow Offers"
        ],
        "summary": "Update an offer",
        "description": "This API can be used to update an offer.",
        "operationId": "admin_PutRainbowOffers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "offerId",
            "in": "path",
            "description": "Offer unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowOffers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowOffersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "58072f646237427a3687dc90",
                  "name": "Enterprise",
                  "description": "Rainbow Enterprise offer",
                  "technicalDescription": "Enterprise offer for BP VAD",
                  "isDefault": false,
                  "creationDate": "2016-10-19T14:12:13.352",
                  "profileId": "57cd90ddc04fd92e232ae258",
                  "canBeSold": true,
                  "businessModel": "nb_users",
                  "businessSpecific": [
                    "NONE"
                  ],
                  "autoSubscribe": false,
                  "isExclusive": true,
                  "provisioningNeeded": [
                    {
                      "providerType": "JANUS",
                      "mediaType": "webrtc"
                    }
                  ],
                  "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
                  "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
                  "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
                  "sapReference": "3EY95003AA",
                  "offerReference": "RB-Enterprise"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "Offer with technicalDescription = Business 1Year already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "delete": {
        "tags": [
          "Rainbow Offers"
        ],
        "summary": "Delete an offer",
        "description": "This API can be used to delete an offer.",
        "operationId": "admin_DeleteRainbowOffers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "offerId",
            "in": "path",
            "description": "Offer unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_DeleteRainbowOffersSuccess"
            },
            "examples": {
              "application/json": {
                "status": "RainbowOffer 57b44e9c0c32e0b425252f9e successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/offers/default": {
      "get": {
        "tags": [
          "Rainbow Offers"
        ],
        "summary": "Get default offer",
        "description": "Get the default Rainbow offer (Essential)   \nDefault offer is the offer which related profile is automatically assigned to newly created companies and users.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/offers/default",
        "operationId": "admin_GetRainbowOffers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetRainbowOffersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "58050dc17c37990d161f6cb3",
                  "name": "Essential",
                  "description": "Essential offer",
                  "sapReference": "3EY95001AA",
                  "offerReference": "RB-Essential",
                  "isDefault": true,
                  "creationDate": "2016-10-19T12:54:30.523",
                  "profileId": "57cd4346d8793a0d124aa21e",
                  "canBeSold": false,
                  "businessModel": "none",
                  "isExclusive": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/offers/default/{offerId}": {
      "put": {
        "tags": [
          "Rainbow Offers"
        ],
        "summary": "Set an offer as default",
        "description": "This API can be used to change default Rainbow offer.   \nThe flag isDefault of previous default offer is set to false, and the flag isDefault of the specified offer is set to true.   \nPrevious default offer stays default offer for companies having already this subscription as default.",
        "operationId": "admin_PutRainbowOffersDefault",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "offerId",
            "in": "path",
            "description": "Offer unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowOffersDefault"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowOffersDefaultSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "58072f646237427a3687dc90",
                  "name": "Enterprise",
                  "description": "Rainbow Enterprise offer",
                  "technicalDescription": "Enterprise offer for BP VAD",
                  "isDefault": false,
                  "creationDate": "2016-10-19T14:12:13.352",
                  "profileId": "57cd90ddc04fd92e232ae258",
                  "canBeSold": true,
                  "businessModel": "nb_users",
                  "businessSpecific": [
                    "NONE"
                  ],
                  "autoSubscribe": false,
                  "isExclusive": true,
                  "provisioningNeeded": [
                    {
                      "providerType": "JANUS",
                      "mediaType": "webrtc"
                    }
                  ],
                  "zuoraOfferId": "2c92c0f95a6b227b015a84cd5d087031",
                  "zuoraProductRatePlanId": "2c92c0f95a6b227b015a84cd5d9d7043",
                  "zuoraProductRatePlanChargeId": "2c92c0f95a6b227b015a84cd5db67045",
                  "sapReference": "3EY95003AA",
                  "offerReference": "RB-Enterprise"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/profiles": {
      "get": {
        "tags": [
          "Rainbow Profiles"
        ],
        "summary": "Get all profiles",
        "description": "List available profiles which can be subscribed by companies (through offers) and assigned to users.   \nMarketing Rainbow offers are linked to one of these profiles.   \nWhen a subscription to an offer is done for a company, the company is linked to the related profile.   \nWhen a user is associated to one of the company subscriptions, the user is linked to the related profile.   \nIf restrictions are defined for a feature in featuresList of the profile, these restrictions are applied when user / company try to use this feature.   \nProfiles with isCpaasProfile field equal to true can be linked to applications profile. The featuresList defined in the application profile will be applied to users using this application.",
        "operationId": "GetApiRainbowAdminV10Profiles",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less profile details in response.   \n- `small`: id name   \n- `medium`: id name description   \n- `full`: all profile fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter profile list on field name.",
            "required": false,
            "type": "string"
          },
          {
            "name": "isCpaasProfile",
            "in": "query",
            "description": "Allows to filter profile list on field isCpaasProfile.   \nNote that app_superadmin users can only list profiles with isCpaasProfile equal to true.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of profiles to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first profile to retrieve (first profile if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort profile list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting profile list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetApiRainbowAdminV10ProfilesSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "57cd4346d8793a0d124aa21e",
                    "name": "Essential",
                    "description": "Essential profile",
                    "creationDate": "2016-10-17T15:20:58.896Z",
                    "featuresList": [
                      {
                        "featureId": "5745b14694397864437b84a8",
                        "featureName": "Company admin",
                        "featureUniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
                        "featureType": "number",
                        "addedDate": "2016-10-17T16:25:12.537",
                        "lastUpdateDate": "2016-10-17T16:25:12.537",
                        "limit_max": 1
                      },
                      {
                        "featureId": "5745b147f0674c7c43417997",
                        "featureName": "PBX Conference",
                        "featureUniqueRef": "PBX_CONFERENCE_ENABLED",
                        "featureType": "boolean",
                        "addedDate": "2016-10-17T16:25:12.537",
                        "lastUpdateDate": "2016-10-17T16:25:12.537",
                        "isEnabled": false
                      }
                    ]
                  },
                  {
                    "id": "57cd90ddc04fd92e232ae258",
                    "name": "Professional",
                    "description": "Professional profile",
                    "creationDate": "2016-10-17T16:45:42.451",
                    "featuresList": [
                      {
                        "featureId": "5745b14694397864437b84a8",
                        "featureName": "Company admin",
                        "featureUniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
                        "featureType": "number",
                        "addedDate": "2016-10-17T16:46:52.414",
                        "lastUpdateDate": "2016-10-17T16:46:52.414",
                        "limit_max": 100
                      },
                      {
                        "featureId": "5745b147f0674c7c43417997",
                        "featureName": "PBX Conference",
                        "featureUniqueRef": "PBX_CONFERENCE_ENABLED",
                        "featureType": "boolean",
                        "addedDate": "2016-10-17T16:48:12.251",
                        "lastUpdateDate": "2016-10-17T16:48:12.251",
                        "isEnabled": true
                      }
                    ]
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "app_superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "post": {
        "tags": [
          "Rainbow Profiles"
        ],
        "summary": "Create a profile",
        "description": "This API can be used to create a profile.",
        "operationId": "admin_PostRainbowProfiles",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowProfiles"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowProfilesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd90ddc04fd92e232ae258",
                  "name": "Professional",
                  "description": "This profile brings users advanced telephony features!",
                  "creationDate": "2016-10-17T16:45:42.451",
                  "featuresList": []
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/profiles/{profileId}": {
      "get": {
        "tags": [
          "Rainbow Profiles"
        ],
        "summary": "Get a profile",
        "description": "Get a profile from its id   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/profile/5745b147f0674c7c43417997",
        "operationId": "admin_GetRainbowProfileById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "description": "Profile unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_GetRainbowProfileByIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd90ddc04fd92e232ae258",
                  "name": "Professional",
                  "description": "Professional profile",
                  "creationDate": "2016-10-17T16:45:42.451",
                  "featuresList": [
                    {
                      "featureId": "5745b14694397864437b84a8",
                      "featureName": "Company admin",
                      "featureUniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
                      "featureType": "number",
                      "addedDate": "2016-10-17T16:46:52.414",
                      "lastUpdateDate": "2016-10-17T16:46:52.414",
                      "limit_max": 100
                    },
                    {
                      "featureId": "5745b147f0674c7c43417997",
                      "featureName": "PBX Conference",
                      "featureUniqueRef": "PBX_CONFERENCE_ENABLED",
                      "featureType": "boolean",
                      "addedDate": "2016-10-17T16:48:12.251",
                      "lastUpdateDate": "2016-10-17T16:48:12.251",
                      "isEnabled": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "put": {
        "tags": [
          "Rainbow Profiles"
        ],
        "summary": "Update a profile",
        "description": "This API can be used to update a profile.",
        "operationId": "admin_PutRainbowProfiles",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "description": "Profile unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowProfiles"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowProfilesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd90ddc04fd92e232ae258",
                  "name": "Professional",
                  "description": "This profile brings users advanced telephony features!",
                  "creationDate": "2016-10-17T16:45:42.451",
                  "featuresList": []
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Rainbow Profiles"
        ],
        "summary": "Delete a profile",
        "description": "This API can be used to delete a profile.   \nDeletion of profile is not allowed if this profile is associated to offers or company subscriptions",
        "operationId": "admin_DeleteRainbowProfiles",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "description": "Profile unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_DeleteRainbowProfilesSuccess"
            },
            "examples": {
              "application/json": {
                "status": "RainbowProfile 57b44e9c0c32e0b425252f9e successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/profiles/{profileId}/features/{featureId}": {
      "put": {
        "tags": [
          "Rainbow Profiles"
        ],
        "summary": "Update a feature in a profile",
        "description": "This API can be used to update a feature for a profile.   \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/profiles/57cd90ddc04fd92e232ae258/features/5745b147f0674c7c43417997",
        "operationId": "admin_PutRainbowProfilesFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "featureId",
            "in": "path",
            "description": "Id of the feature to update in the profile.",
            "required": true,
            "type": "string"
          },
          {
            "name": "profileId",
            "in": "path",
            "description": "Profile unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowProfilesFeatures"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PutRainbowProfilesFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "featureId": "5745b147f0674c7c43417997",
                  "featureName": "PBX Conference",
                  "featureUniqueRef": "PBX_CONFERENCE_ENABLED",
                  "featureType": "boolean",
                  "addedDate": "2016-10-17T16:48:12.251",
                  "lastUpdateDate": "2016-10-17T17:48:12.251",
                  "isEnabled": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "post": {
        "tags": [
          "Rainbow Profiles"
        ],
        "summary": "Add a feature to a profile",
        "description": "This API can be used to add a feature to a profile.   \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/profiles/57cd90ddc04fd92e232ae258/features/5745b147f0674c7c43417997",
        "operationId": "admin_PostRainbowProfilesFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "featureId",
            "in": "path",
            "description": "Id of the feature to add in the profile.",
            "required": true,
            "type": "string"
          },
          {
            "name": "profileId",
            "in": "path",
            "description": "Profile unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowProfilesFeatures"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_PostRainbowProfilesFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "featureId": "5745b147f0674c7c43417997",
                  "featureName": "PBX Conference",
                  "featureUniqueRef": "PBX_CONFERENCE_ENABLED",
                  "featureType": "boolean",
                  "addedDate": "2016-10-17T16:48:12.251",
                  "lastUpdateDate": "2016-10-17T17:45:12.251",
                  "isEnabled": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Rainbow Profiles"
        ],
        "summary": "Delete a feature from a profile",
        "description": "This API can be used to remove a feature from a profile.   \nExample: DELETE https://openrainbow.com/api/rainbow/admin/v1.0/profiles/57cd90ddc04fd92e232ae258/features/5745b147f0674c7c43417997",
        "operationId": "admin_DeleteRainbowProfilesFeatures",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "featureId",
            "in": "path",
            "description": "Id of the feature to remove from the profile.",
            "required": true,
            "type": "string"
          },
          {
            "name": "profileId",
            "in": "path",
            "description": "Profile unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_DeleteRainbowProfilesFeaturesSuccess"
            },
            "examples": {
              "application/json": {
                "status": "RainbowFeature 58050b2f5a5951ea1553051b successfully removed from RainbowProfile 5805ebcdecda646820343eec",
                "data": {
                  "id": "57cd90ddc04fd92e232ae258",
                  "name": "Professional",
                  "description": "Professional profile",
                  "creationDate": "2016-10-17T16:45:42.451",
                  "featuresList": [
                    {
                      "featureId": "5745b14694397864437b84a8",
                      "featureName": "Company admin",
                      "featureUniqueRef": "COMPANY_ADMIN_ALLOWED_NB",
                      "featureType": "number",
                      "addedDate": "2016-10-17T16:46:52.414",
                      "lastUpdateDate": "2016-10-17T16:46:52.414",
                      "limit_max": 100
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/rooms": {
      "get": {
        "tags": [
          "Rooms"
        ],
        "summary": "Get all rooms id",
        "description": "Display a list of short room description including: **id** - room identifier, **name** - room name  \n",
        "operationId": "GetApiRainbowAdminV10Rooms",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of rooms to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first room to retrieve (first room if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort room list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting company list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetApiRainbowAdminV10RoomsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "Chat room 1",
                    "id": "56f9777e0e5e7d7535a48fa2"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 1
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/settings/changelogs": {
      "get": {
        "tags": [
          "Settings Rainbow Change Log"
        ],
        "summary": "Get news about rainbow features",
        "description": "Display a list ICE servers available to start WebRTC audio / vidéo conversations   \nServers available from Rainbow infrastructure are returned.",
        "operationId": "GetRainbowChangeLog",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetRainbowChangeLogSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "changeLog": "# Change Log **otliteadminportal  ... markdown format ..."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      },
      "put": {
        "tags": [
          "Settings Rainbow Change Log"
        ],
        "summary": "Create a rainbow change log",
        "description": "",
        "operationId": "PutRainbowChange",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutRainbowChange"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutRainbowChangeSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Change log stored",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/settings/iceservers/{iceServerId}": {
      "put": {
        "tags": [
          "Settings Webrtc"
        ],
        "summary": "Update an ICE server",
        "description": "",
        "operationId": "PutIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "iceServerId",
            "in": "path",
            "description": "ICE server unique identifier (like 5734a186070f38215854b61f)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutIceServers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5734a186070f38215854b61f",
                  "urls": "turn:turn.1.google.com:19302",
                  "username": "alice",
                  "credential": "undeuxtroisjevaisaubois",
                  "adminUrl": "https://10.10.99.100:8080",
                  "adminLogin": "adminCoturnLogin1",
                  "adminPassword": "adminCoturnPwd1",
                  "dc": "SBG"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "urls",
                    "msg": "Field urls is mandatory."
                  },
                  {
                    "param": "urls",
                    "msg": "Field urls length must be between 1 and 255 characters."
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "ICE server with id 57347ea14a0327064fcb93fd does not exist, not able to update it.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "ICE server with Url = turn:turn.1.google.com:19302 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "delete": {
        "tags": [
          "Settings Webrtc"
        ],
        "summary": "Delete an ICE server",
        "description": "",
        "operationId": "DeleteIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "iceServerId",
            "in": "path",
            "description": "ICE server unique identifier (like 5734a186070f38215854b61f)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "content-type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "status": "ICE server 5734a186070f38215854b61f successfully deleted",
                "data": []
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "ICE server with id 57347ea14a0327064fcb93fd does not exist, not able to delete it.",
                "errorDetailsCode": 404002
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/settings/iceservers": {
      "get": {
        "tags": [
          "Settings Webrtc"
        ],
        "summary": "Get available stun, turn servers",
        "description": "Display a list ICE servers available to start WebRTC audio / vidéo conversations   \nServers available from Rainbow infrastructure are returned.",
        "operationId": "GetIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "57347ea14a0327064fcb93fd",
                    "credential": "lalala",
                    "urls": "turn:turn.1.google.com:19302",
                    "username": "alice",
                    "adminUrl": "https://10.10.99.100:8080",
                    "adminLogin": "adminCoturnLogin1",
                    "adminPassword": "adminCoturnPwd1",
                    "dc": "SBG"
                  },
                  {
                    "urls": "stun:stun.2.google.com:19302",
                    "id": "57348758fc51d8d652360f32"
                  }
                ]
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      },
      "post": {
        "tags": [
          "Settings Webrtc"
        ],
        "summary": "Create an ICE server",
        "description": "",
        "operationId": "PostIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostIceServers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5734a186070f38215854b61f",
                  "urls": "turn:turn.1.google.com:19302",
                  "username": "alice",
                  "credential": "undeuxtroisjevaisaubois",
                  "adminUrl": "https://10.10.99.100:8080",
                  "adminLogin": "adminCoturnLogin1",
                  "adminPassword": "adminCoturnPwd1",
                  "dc": "SBG"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "urls",
                    "msg": "Field urls is mandatory."
                  },
                  {
                    "param": "urls",
                    "msg": "Field urls length must be between 1 and 255 characters."
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "ICE server with Url = turn:turn.1.google.com:19302 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/sites/{siteId}": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Get a site data",
        "description": "This API allows administrator to retrieve a given site.   \n  \n`superadmin` and `support` can get all sites existing in Rainbow.   \n`bp_admin` can only get sites linked to End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only get sites linked to companies under their organisation.   \n`company_admin` can only get sites linked to their company.   \n`site_admin` can only get the site they administrate.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/sites/569d0ef3ef7816921f7e94fa",
        "operationId": "GetSitesId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSitesIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "latin_name": "illkirch",
                  "name": "Illkirch",
                  "companyId": "5749aa51245015fe0d36e968",
                  "creationDate": "2016-06-08T17:13:23.008Z",
                  "statusUpdatedDate": "2016-06-08T17:13:23.008Z",
                  "settings": {
                    "iceServers": []
                  },
                  "status": "active",
                  "id": "57585233d3c3e3e5095250ba"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "status",
                    "msg": "Invalid site status. Expected field status being a string and having one of the following values: active,alerting,hold,terminated"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Site with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Sites"
        ],
        "summary": "Update a site",
        "description": "This API allows administrator to update a given site.   \n  \n`superadmin` can update all sites existing in Rainbow.   \n`bp_admin` can only update sites linked to End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only update sites linked to companies under their organisation.   \n`company_admin` can only update sites linked to their company.   \n`site_admin` can only update the site they administrate.   \n  \nIn a Multi-Layer organization defining a hierarchy ORGANIZATIONS/COMPANIES/SITES/SYSTEMS, only bp admin or admin of the site's organization is allowed to move the site (change companyId field of the site).   \n",
        "operationId": "PutSites",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutSites"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutSitesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "latin_name": "illkirch",
                  "name": "Illkirch",
                  "companyId": "5749aa51245015fe0d36e968",
                  "creationDate": "2016-06-08T17:13:23.008Z",
                  "statusUpdatedDate": "2016-06-08T17:13:23.008Z",
                  "settings": {
                    "iceServers": []
                  },
                  "status": "active",
                  "id": "57585233d3c3e3e5095250ba"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "status",
                    "msg": "Invalid site status. Expected field status being a string and having one of the following values: active,alerting,hold,terminated"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate Site 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Sites"
        ],
        "summary": "Delete a site",
        "description": "This API allows administrator to delete a site for a company they administrate.   \n  \n`superadmin` can delete sites for all companies existing in Rainbow.   \n`bp_admin` can only delete sites for companies linked to End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only delete sites for companies linked to companies under their organisation.   \n`company_admin` can only delete sites for their own company.   \nNote : Delete will be forbidden if site is still linked to system(s)",
        "operationId": "DeleteSites",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteSitesSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Site 569d0ef3ef7816921f7e94fa successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "siteId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate Site 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Site with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/sites": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Get all sites",
        "description": "This API allows administrator to retrieve sites they can administrate.   \n  \n`superadmin` and `support` get all sites existing in Rainbow.   \n`bp_admin` only get sites linked to End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` only get sites linked to companies under their organisation.   \n`company_admin` only get sites linked to their company.   \n`site_admin` only get the site they administrate.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/sites?format=small&limit=100&offset=0&sortField=name&sortOrder=-1",
        "operationId": "GetSites",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less site details in response.   \n- `small`: _id, name   \n- `medium`: _id, name, status, companyId   \n- `full`: all site fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter sites list on field name.   \n  \nThe filtering is case insensitive and on partial name match: all sites **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _sit_, sites with the following names are match the filter 'My site', 'Site', 'A site 1', 'Site of company', 'Sit1', 'Sit2', ...",
            "required": false,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "Allows to filter sites list on the companyIds provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of companies to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first site to retrieve (first site if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort site list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting site list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSitesSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "ALE1",
                    "id": "569ce8c8f9336c471b98eda1"
                  },
                  {
                    "name": "ALE2",
                    "id": "569ce938f9336c471b98eda2"
                  }
                ],
                "total": 2,
                "limit": 100,
                "offset": 0
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Create a site",
        "description": "This API allows administrator to create a site for a company they administrate.   \n  \n`superadmin` can create sites for all companies existing in Rainbow.   \n`bp_admin` can only create sites for companies linked to End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only create sites for companies linked to companies under their organisation.   \n`company_admin` can only create sites for their own company.   \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities. For us an entity is a company with the flag isCentrex=true.  \nA company in this environment can only have a single site. It has automatically the flag isCentrex = true  \nThis flag is readonly.",
        "operationId": "PostSites",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostSites"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostSitesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "latin_name": "illkirch",
                  "name": "Illkirch",
                  "companyId": "5749aa51245015fe0d36e968",
                  "creationDate": "2016-06-08T17:13:23.008Z",
                  "statusUpdatedDate": "2016-06-08T17:13:23.008Z",
                  "settings": {
                    "iceServers": []
                  },
                  "status": "active",
                  "id": "57585233d3c3e3e5095250ba"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "status",
                    "msg": "Invalid site status. Expected field status being a string and having one of the following values: active,alerting,hold,terminated"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate Site 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/sites/{siteId}/settings/iceservers/{iceServerId}": {
      "put": {
        "tags": [
          "Sites Settings Webrtc"
        ],
        "summary": "Update an ICE server",
        "description": "",
        "operationId": "PutSiteIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "iceServerId",
            "in": "path",
            "description": "ICE server unique identifier (like 5734a186070f38215854b61f)",
            "required": true,
            "type": "string"
          },
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutSiteIceServers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutSiteIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5734a186070f38215854b61f",
                  "urls": "turn:turn.1.google.com:19302",
                  "username": "alice",
                  "credential": "undeuxtroisjevaisaubois",
                  "adminUrl": "https://10.10.99.100:8080",
                  "adminLogin": "adminCoturnLogin1",
                  "adminPassword": "adminCoturnPwd1",
                  "dc": "SBG"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "urls",
                    "msg": "Field urls is mandatory."
                  },
                  {
                    "param": "urls",
                    "msg": "Field urls length must be between 1 and 255 characters."
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "ICE server with id 57347ea14a0327064fcb93fd does not exist, not able to update it.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "ICE server with Url = turn:turn.1.google.com:19302 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          }
        ]
      },
      "delete": {
        "tags": [
          "Sites Settings Webrtc"
        ],
        "summary": "Delete an ICE server",
        "description": "",
        "operationId": "DeleteSiteIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "iceServerId",
            "in": "path",
            "description": "ICE server unique identifier (like 5734a186070f38215854b61f)",
            "required": true,
            "type": "string"
          },
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "content-type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteSiteIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "status": "ICE server 5734a186070f38215854b61f successfully deleted",
                "data": []
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "ICE server with id 57347ea14a0327064fcb93fd does not exist, not able to delete it.",
                "errorDetailsCode": 404002
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/sites/{siteId}/settings/iceservers": {
      "post": {
        "tags": [
          "Sites Settings Webrtc"
        ],
        "summary": "Create an ICE server",
        "description": "For the 'Enterprise (E1)' offer, the premium offer, the Multi-Layer organization is defined. It describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS.   \nThe site is a geographical entity. It can own specific settings like a WebRTC configuration.   \nWhen a mobile or desktop Rainbow client has to use this media, it has to use the API \"Enduser Settings WebRTC\" ([GET /api/rainbow/enduser/v1.0/settings/iceservers][0]), to get setting.   \nWhen the end user is liked to a site, ICE server settings of this site are given when its exist. Else a fallback is searched.\n\n[0]: /enduser/#api-settings_WebRTC",
        "operationId": "PostSiteIceServers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostSiteIceServers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostSiteIceServersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5734a186070f38215854b61f",
                  "urls": "turn:turn.1.google.com:19302",
                  "username": "alice",
                  "credential": "undeuxtroisjevaisaubois",
                  "adminUrl": "https://10.10.99.100:8080",
                  "adminLogin": "adminCoturnLogin1",
                  "adminPassword": "adminCoturnPwd1",
                  "dc": "SBG"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "urls",
                    "msg": "Field urls is mandatory."
                  },
                  {
                    "param": "urls",
                    "msg": "Field urls length must be between 1 and 255 characters."
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: user user1@company.com does not have required role(s) admin,superadmin",
                "errorDetailsCode": 403000
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Site with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "ICE server with Url = turn:turn.1.google.com:19302 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/sites/{siteId}/systems/{systemId}": {
      "delete": {
        "tags": [
          "Sites Systems"
        ],
        "summary": "Unlink a system to a site",
        "description": "This API allows administrator to delete a link between a system and a site   \n  \n`superadmin` and `support` can unlink any systems from any sites existing in Rainbow.   \n`bp_admin` can only unlink systems being linked to sites of End Customer companies for which their bp_admin's company is the BP company from sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only unlink systems being linked to sites of companies under their organisation from sites of companies under their organisation.   \n`company_admin` can only unlink systems being linked to sites of their company from sites of their company.   \nAccess is denied for `site_admin`.   \nA system could be shared by several sites.   \nLast site can be detached from a system only if it is multi-company or multi-tenant (`isShared`=true or `isCentrex`=true)",
        "operationId": "DeleteSiteSystems",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteSiteSystemsSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Site 5749ab92245015fe0d36e96a successfully removed",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "systemId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Administrator bob@ale-international.com is not assigned to administrate Company hosting site Id 57585233d3c3e3e5095250ba.",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not Found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "System 594cd6b9ad17fcca5dbcb75c must have at least one attachment to a site. Site 594cd6a226b31045baf7fc9a is the last.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/sites/{siteId}/systems": {
      "get": {
        "tags": [
          "Sites Systems"
        ],
        "summary": "Get all systems linked with this site",
        "description": "This API allows administrator to retrieve systems linked to a given site   \n  \n`superadmin` and `support` can get systems linked to all companies existing in Rainbow.   \n`bp_admin` can only get systems linked to sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only get systems linked to sites of companies under their organisation.   \n`company_admin` can only get systems linked to sites of their company.   \n`site_admin` can only get the systems linked to the site they administrate.",
        "operationId": "GetSiteSystems",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less system details in response.   \n- `small`: id pbxId version   \n- `medium`: id name pbxId serialNumber version status   \n- `full`: all system fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of systems to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first system to retrieve (first site if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort system list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting pbx list.",
            "required": false,
            "type": "number"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter systems list on field name.   \n  \nThe filtering is case insensitive and on partial name match: all systems **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _oxe1_, systems with the following names are match the filter 'OXE1', 'Oxe1', 'My oxe1', 'oxe12', 'My OXE12', ...",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Allows to filter systems list on the provided type(s)",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Allows to filter systems list on the provided status(es)",
            "required": false,
            "type": "string"
          },
          {
            "name": "siteId",
            "in": "query",
            "description": "Allows to filter systems list on the siteIds provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "Allows to filter systems list on the siteIds linked to companyIds provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "bpId",
            "in": "query",
            "description": "Allows to filter systems list on the bpIds provided in this option.   \nOnly `superadmin`, `support` and `bp_admin` users can use bpId filter.   \n`bp_admin` users can only use bpId filter with bpId they manage (their own BP company or companies being in their BP organisation).",
            "required": false,
            "type": "string"
          },
          {
            "name": "isShared",
            "in": "query",
            "description": "Allows to filter systems list by the status isShared.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "isCentrex",
            "in": "query",
            "description": "Allows to filter systems list by the status isCentrex.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "isSharedOrCentrex",
            "in": "query",
            "description": "Allows to filter systems list having the requested flag isShared **or** isCentrex. \n\n* If isSharedOrCentrex=true, only systems having isShared=true or isCentrex=true are returned.\n* If isSharedOrCentrex=false, only systems having isShared=false and isCentrex=false are returned.\n\n",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "fromCreationDate",
            "in": "query",
            "description": "Allows to filter systems list from provided date (ISO 8601 format).",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "toCreationDate",
            "in": "query",
            "description": "Allows to filter systems list until provided date (ISO 8601 format).",
            "required": false,
            "type": "string",
            "format": "date-time"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSiteSystemsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "pbxId": "OXE.123.456",
                    "version": "1.9.1",
                    "id": "575beb22ccb329a11a1cef6c"
                  },
                  {
                    "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                    "version": "",
                    "id": "57ab1af307d0a6293dd03472"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "siteId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate Site 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Site with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "post": {
        "tags": [
          "Sites Systems"
        ],
        "summary": "Link a system to a site",
        "description": "This API allows administrator to link a system to a given site   \n  \nA PABX can be multi tenant.   \nWhen a PABX is shared, that means in our data model: 'A system is shared between several sites'.   \nThis API makes possible to add a link between a system and a site that belongs to the same company or not.   \nIf the link still exists, no error is thrown.   \n  \n`superadmin` and `support` can link any systems to any sites existing in Rainbow.   \n`bp_admin` can only link systems being already linked to sites of End Customer companies for which their bp_admin's company is the BP company to sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only link systems being already linked to sites of companies under their organisation to sites of companies under their organisation.   \n`company_admin` can only link systems being already linked to sites of their company to sites of their company.   \nAccess is denied for `site_admin`.   \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities. For us an entity is a company with the flag isCentrex=true.  \nA company in this environment can only have a single site. It has automatically the flag isCentrex = true  \nOnly one sytem having the flag isCentrex = true can be linked with a site having the same flag value.  \nA system having the flag isCentrex = true can be shared by several sites having the same flag value.  \nA specific error \"Inconsistent link. A multi-tenant system must be shared by a multi-tenant company only\" 43709 is thrown when we try to link an incompatible system to a site.   \nWhen set during the system creation, isCentrex flag is readonly.",
        "operationId": "PostSiteSystems",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "Site unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostSiteSystems"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostSiteSystemsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "node_alpha_oxe_R11 demo",
                  "pbxId": "pbxagent_aace13f751734a6596ac6cdd567c4898",
                  "jid_pbxagent": "pbxagent_aace13f751734a6596ac6cdd567c4898@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxagent_password": "061947863a3147b5b9b28c3b5712ed83",
                  "jid_pbxpcg": "pbxpcg_fad0ec2eb92045868a32a189f31bbe90@openrainbow.com",
                  "jid_pbxpcg_password": "2001b0f5dc5245e1aa07e444d3524a76",
                  "version": "",
                  "country": "FRA",
                  "serverPingTimeout": 120,
                  "pbxMainBundlePrefix": [
                    "0"
                  ],
                  "usePbxMainBundlePrefix": true,
                  "pbxNationalPrefix": "0",
                  "pbxInternationalPrefix": "00",
                  "statusUpdatedDate": "2016-08-10T12:57:19.298Z",
                  "creationDate": "2016-08-10T12:57:19.298Z",
                  "status": "created",
                  "siteId": [
                    "575d4bacb630c12b305aa310",
                    "57585233d3c3e3e5095250ba"
                  ],
                  "searchResultOrder": [
                    "RAINBOW",
                    "LDAP",
                    "PBX"
                  ],
                  "type": "oxe",
                  "id": "57ab24af27fe23cc40fef473"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "systemId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Inconsistent link. A multi-tenant system must be shared by a multi-tenant companies only (systemId: 59e9f917673c5f24d14a7450, company centrex: false, system centrex: true)",
                "errorDetailsCode": 403709
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/{systemId}": {
      "get": {
        "tags": [
          "Systems"
        ],
        "summary": "Get a system data",
        "description": "This API allows administrator to retrieve a given system.   \n  \n`superadmin` and `support` can get all systems existing in Rainbow.   \n`bp_admin` can only get systems linked to sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only get systems linked to sites of companies under their organisation.   \n`company_admin` can only get systems linked to sites of their company.   \n`site_admin` can only get the systems linked to the site they administrate.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa",
        "operationId": "GetSystemsId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSystemsIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "node_alpha_oxe_R11 demo",
                  "country": "FRA",
                  "pbxId": "pbxagent_db489778882d41d6a9d69e2f0d0170b5",
                  "jid_pbxagent": "pbxagent_db489778882d41d6a9d69e2f0d0170b5@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxagent_password": "6763",
                  "jid_pbxpcg": "pbxpcg_806f9c73c4be40a191f5591be778e9f3@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxpcg_password": "af9b871bc5204184bf84d4bc9aabd1bf",
                  "version": "9.2",
                  "serverPingTimeout": 120,
                  "pbxMainBundlePrefix": [
                    "0"
                  ],
                  "usePbxMainBundlePrefix": true,
                  "pbxNumberingTranslator": [
                    {
                      "regexpMatch": "^218",
                      "regexpReplace": "039067",
                      "description": "Numbers 218xxx => 039067xxx"
                    },
                    {
                      "regexpMatch": "^((0..9){1,5})$",
                      "regexpReplace": "$1",
                      "description": "Numbers of five digits are internal"
                    },
                    {
                      "regexpMatch": "^3699$",
                      "regexpReplace": "03699",
                      "description": "Numbers 3699xxx => 03699xxx"
                    },
                    {
                      "regexpMatch": "^18$",
                      "regexpReplace": "",
                      "description": "18 is forbidden"
                    }
                  ],
                  "pbxNationalPrefix": "0",
                  "pbxInternationalPrefix": "00",
                  "statusUpdatedDate": "2016-12-14T15:03:25.858Z",
                  "creationDate": "2016-12-14T15:03:25.858Z",
                  "status": "activating",
                  "siteId": [
                    "57585233d3c3e3e5095250ba"
                  ],
                  "searchResultOrder": [
                    "RAINBOW",
                    "LDAP",
                    "PBX"
                  ],
                  "type": "oxe",
                  "activatingTransactionId": "d182c8e122504350ab36008be1552518",
                  "jid_pbxagent_password_activating": "9e5c326b10b54fcdbf50caf1951f17b7",
                  "id": "58515f3df5eb9225650b64d8"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invalid format 'System' 'pbxNumberingTranslator'. Array size is longer than 100",
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Systems"
        ],
        "summary": "Update a system",
        "description": "This API allows administrator to update a given system.   \n  \n`superadmin` can update systems linked to all sites existing in Rainbow.   \n`bp_admin` can only update systems linked to sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only update systems linked to sites of companies under their organisation.   \n`company_admin` can only update systems linked to sites of their company.   \n`site_admin` can only update the systems linked to the site they administrate.   \n  \nWhen the system is updated, PCG is notified on its corresponding JID pbxpcg with the following XMPP message: \n\n    \n```html\n<message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n          from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n          to=\"pbxpcg_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com\"\n          xmlns=\"jabber:client\">\n     <config xmlns=\"urn:xmpp:pbxagent:config:1\"/>\n         <pbx action=\"update\">\n     </config>\n</message>\n```\n  \nDon't use this api to move a 'isCentrex' system to another site. Use instead DELETE /api/rainbow/admin/v1.0/sites/:siteId/systems then POST /api/rainbow/admin/v1.0/sites/:siteId/systems",
        "operationId": "PutSystems",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutSystems"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutSystemsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "node_alpha_oxe_R11 demo",
                  "country": "FRA",
                  "pbxId": "pbxagent_db489778882d41d6a9d69e2f0d0170b5",
                  "jid_pbxagent": "pbxagent_db489778882d41d6a9d69e2f0d0170b5@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxagent_password": "1113ba19",
                  "jid_pbxpcg": "pbxpcg_806f9c73c4be40a191f5591be778e9f3@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxpcg_password": "af9b871bc5204184bf84d4bc9aabd1bf",
                  "version": "9.2",
                  "serverPingTimeout": 120,
                  "pbxMainBundlePrefix": [
                    "0"
                  ],
                  "pbxNumberingTranslator": [],
                  "usePbxMainBundlePrefix": true,
                  "pbxNationalPrefix": "0",
                  "pbxInternationalPrefix": "00",
                  "statusUpdatedDate": "2016-12-14T15:03:25.858Z",
                  "creationDate": "2016-12-14T15:03:25.858Z",
                  "status": "activated",
                  "siteId": [
                    "57585233d3c3e3e5095250ba"
                  ],
                  "searchResultOrder": [
                    "RAINBOW",
                    "LDAP",
                    "PBX"
                  ],
                  "type": "oxe",
                  "activatingTransactionId": "",
                  "jid_pbxagent_password_activating": "",
                  "id": "58515f3df5eb9225650b64d8"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invalid format 'System' 'pbxNumberingTranslator'. Array size is longer than 100",
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate System 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "System with pbxId = OXE.000.111 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Systems"
        ],
        "summary": "Delete a system",
        "description": "This API allows administrator to delete a given system.   \n  \n`superadmin` can delete systems linked to all sites existing in Rainbow.   \n`bp_admin` can only delete systems linked to sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only delete systems linked to sites of companies under their organisation.   \n`company_admin` can only delete systems linked to sites of their company.   \n`site_admin` can only delete the systems linked to the site they administrate.   \n  \n**Warning**: all phoneNumbers associated to this system will be deleted, and if these phoneNumbers were associated to a Rainbow user, it won't be anymore.   \njid_pbxagent and jid_pbxpcg XMPP accounts will also be deleted from XMPP.   \n  \nPCG is notified of the system deletion with the following XMPP message. Once PCG has acknowledged the IQ, the system is deleted from mongoDB, jid_pbxagent and jid_pbxpcg XMPP accounts are deleted from XMPP, and all phoneNumbers objects linked to this system are deleted (therefore PCG don't have to call delete for all deleted system's phoneNumbers). \n\n    \n```html\n<iq id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n       from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n       to=\"pbxpcg_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com/pbxpcg\"\n       xmlns=\"jabber:client\">\n    <config xmlns=\"urn:xmpp:pbxagent:config:1\">\n        <pbx action=\"delete\">\n    </config>\n</iq>\n```\n",
        "operationId": "DeleteSystems",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteSystemsSuccess"
            },
            "examples": {
              "application/json": {
                "status": "Systems 569d0ef3ef7816921f7e94fa successfully deleted",
                "data": []
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "systemId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Can't delete system with id 569d0ef3ef7816921f7e94fa because it's still linked to Media Pillar.",
                "errorDetailsCode": 403030
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems": {
      "get": {
        "tags": [
          "Systems"
        ],
        "summary": "Get all systems",
        "description": "This API allows administrator to retrieve systems they can administrate.   \n  \n`superadmin` and `support` get all systems existing in Rainbow.   \n`bp_admin` only get systems linked to sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` only get systems linked to sites of companies under their organisation.   \n`company_admin` only get systems linked to sites of their company.   \n`site_admin` only get the systems linked to the site they administrate.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems?type=oxe&status=activated&format=small&limit=100&offset=0&sortField=name&sortOrder=-1  \n  \n**Specific feature:** Sharing a system between several companies \n\n* Since 1.47.0 release, configuring companies sharing a **multi-tenant** system is possible.   \nThis corresponds to **OTEC-S OXEs**, which are multi-tenant.   \nA multi-tenant system, so called **centrex**, allows sharing a call-server between several entities by setting the flag `isCentrex=true` on the system. This flag is set during the system creation and can't be changed (the system would have to be deleted first and then re-created without the flag isCentrex).   \nFor Rainbow, an entity is a site with the flag `isCentrex=true` linked to a company with the flag `isCentrex=true` (the company and site must both have the flag isCentrex=true to be linked to a system with isCentrex=true).   \nA company with the flag isCentrex=true can only have a single site (the site will have automatically the flag isCentrex=true when it is created).   \nGetting a list having the status isCentrex=true is possible using query parameter filter `isCentrex`.\n* Since 1.73.0 release, configuring companies sharing a **multi-company** system is possible.   \nA shared multi-company system, so called **shared**, allows sharing a call-server between several sites from different companies.   \nNo specific configuration is applied on the PBX, the specific configuration is only on Rainbow side, by setting the flag `isShared=true` on the system. This flag is set during the system creation and can't be changed (the system would have to be deleted first and then re-created without the flag isShared).   \nIt is understood that this approach exposes all users of the PBX to all companies that have users on this PBX (for association, for dial by name). Anyway it seats on a PBX infra where all PBX users can directly dial (by short num and DBN) any other users of the network from their deskphones.   \nA site being linked to such systems can be linked to other systems (shared or not, but not centrex).   \nGetting a list having the status isShared=true is possible using query parameter filter `isShared`.\n* It is possible to get the list of systems being shared **or** centrex using query parameter filter `isSharedOrCentrex`.\n\n",
        "operationId": "GetSystems",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less system details in response.   \n- `small`: id pbxId version   \n- `medium`: id name pbxId serialNumber version status   \n- `full`: all system fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of systems to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first system to retrieve (first site if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort system list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting pbx list.",
            "required": false,
            "type": "number"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter systems list on field name.   \n  \nThe filtering is case insensitive and on partial name match: all systems **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _oxe1_, systems with the following names are match the filter 'OXE1', 'Oxe1', 'My oxe1', 'oxe12', 'My OXE12', ...",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Allows to filter systems list on the provided type(s)",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Allows to filter systems list on the provided status(es)",
            "required": false,
            "type": "string"
          },
          {
            "name": "siteId",
            "in": "query",
            "description": "Allows to filter systems list on the siteIds provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "Allows to filter systems list on the siteIds linked to companyIds provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "bpId",
            "in": "query",
            "description": "Allows to filter systems list on the bpIds provided in this option.   \nOnly `superadmin`, `support` and `bp_admin` users can use bpId filter.   \n`bp_admin` users can only use bpId filter with bpId they manage (their own BP company or companies being in their BP organisation).",
            "required": false,
            "type": "string"
          },
          {
            "name": "isShared",
            "in": "query",
            "description": "Allows to filter systems list by the status isShared.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "isCentrex",
            "in": "query",
            "description": "Allows to filter systems list by the status isCentrex.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "isSharedOrCentrex",
            "in": "query",
            "description": "Allows to filter systems list having the requested flag isShared **or** isCentrex. \n\n* If isSharedOrCentrex=true, only systems having isShared=true or isCentrex=true are returned.\n* If isSharedOrCentrex=false, only systems having isShared=false and isCentrex=false are returned.\n\n",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "fromCreationDate",
            "in": "query",
            "description": "Allows to filter systems list from provided date (ISO 8601 format).",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "toCreationDate",
            "in": "query",
            "description": "Allows to filter systems list until provided date (ISO 8601 format).",
            "required": false,
            "type": "string",
            "format": "date-time"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSystemsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "pbxId": "OXE.123.456",
                    "version": "1.9.1",
                    "id": "575beb22ccb329a11a1cef6c"
                  },
                  {
                    "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                    "version": "",
                    "id": "57ab1af307d0a6293dd03472"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "post": {
        "tags": [
          "Systems"
        ],
        "summary": "Create a system",
        "description": "This API allows administrator to create a system.   \nA system hosts the CCA (Call Control Agent) configuration.   \n  \n`superadmin` can create systems linked to all sites existing in Rainbow.   \n`bp_admin` can only create systems linked to sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only create systems linked to sites of companies under their organisation.   \n`company_admin` can only create systems linked to sites of their company.   \n`site_admin` can only create the systems linked to the site they administrate.   \n  \n**Specific feature:** Sharing a system between several companies \n\n* Since 1.47.0 release, configuring companies sharing a **multi-tenant** system is possible.   \nThis corresponds to **OTEC-S OXEs**, which are multi-tenant.   \nA multi-tenant system, so called **centrex**, allows sharing a call-server between several entities by setting the flag `isCentrex=true` on the system. This flag is set during the system creation and can't be changed (the system would have to be deleted first and then re-created without the flag isCentrex).   \nFor Rainbow, an entity is a site with the flag `isCentrex=true` linked to a company with the flag `isCentrex=true` (the company and site must both have the flag isCentrex=true to be linked to a system with isCentrex=true).   \nA company with the flag isCentrex=true can only have a single site (the site will have automatically the flag isCentrex=true when it is created).   \nGetting a list having the status isCentrex=true is possible using query parameter filter `isCentrex`.\n* Since 1.73.0 release, configuring companies sharing a **multi-company** system is possible.   \nA shared multi-company system, so called **shared**, allows sharing a call-server between several sites from different companies.   \nNo specific configuration is applied on the PBX, the specific configuration is only on Rainbow side, by setting the flag `isShared=true` on the system. This flag is set during the system creation and can't be changed (the system would have to be deleted first and then re-created without the flag isShared).   \nIt is understood that this approach exposes all users of the PBX to all companies that have users on this PBX (for association, for dial by name). Anyway it seats on a PBX infra where all PBX users can directly dial (by short num and DBN) any other users of the network from their deskphones.   \nA site being linked to such systems can be linked to other systems (shared or not, but not centrex).   \nGetting a list having the status isShared=true is possible using query parameter filter `isShared`.\n* It is possible to get the list of systems being shared **or** centrex using query parameter filter `isSharedOrCentrex`.\n\n",
        "operationId": "PostSystems",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostSystems"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostSystemsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "OXE_RB_MULTI_TENANT_BPDR_01",
                  "country": "FRA",
                  "pbxId": "PBXc2ae-3590-f08b-4c6c-bccf-4e99-478a-17e4",
                  "jid_pbxagent": "PBXc2ae-3590-f08b-4c6c-bccf-4e99-478a-17e4@aio-pcg-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxagent_password": "4645",
                  "jid_pbxpcg": "pbxpcg_66950b0aefe840cd9ef2adcd8ed561ef@aio-pcg-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxpcg_password": "6b45a2f50e7c45b8aaaf4a153f38e7f2",
                  "searchResultOrder": [],
                  "version": "",
                  "serverPingTimeout": 120,
                  "pbxNumberingTranslator": [],
                  "usePbxMainBundlePrefix": true,
                  "pbxMainBundlePrefix": [],
                  "bpId": "59f061085fbc10b394aab3ff",
                  "isCentrex": true,
                  "isShared": false,
                  "statusUpdatedDate": "2017-12-06T18:36:17.904Z",
                  "creationDate": "2017-12-06T18:36:17.904Z",
                  "status": "created",
                  "siteId": [],
                  "type": "oxe",
                  "id": "5a2838a11f8b207210326e60"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invalid format 'System' 'pbxNumberingTranslator'. Array size is longer than 100",
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Inconsistent link. A multi-tenant company must only use a multi-tenant system (site.isCentrex=false, system.isCentrex=true)",
                "errorDetailsCode": 403710,
                "errorDetailsData": {
                  "siteCentrex": false,
                  "systemCentrex": true
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "System with pbxId = OXE.000.111 already exists.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/pbxid/{pbxId}": {
      "get": {
        "tags": [
          "Systems"
        ],
        "summary": "Get a system data by pbxId",
        "description": "This API allows administrator to retrieve a given system from its pbxId.   \n  \n`superadmin` and `support` can get all systems existing in Rainbow.   \n`bp_admin` can only get systems linked to sites of End Customer companies for which their bp_admin's company is the BP company.   \n`organization_admin` can only get systems linked to sites of companies under their organisation.   \n`company_admin` can only get systems linked to sites of their company.   \n`site_admin` can only get the systems linked to the site they administrate.",
        "operationId": "GetSystemsIdByPbxId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "pbxId",
            "in": "path",
            "description": "Pbx unique identifier known by PCG",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSystemsIdByPbxIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "node_alpha_oxe_R11 demo",
                  "country": "FRA",
                  "pbxId": "pbxagent_db489778882d41d6a9d69e2f0d0170b5",
                  "jid_pbxagent": "pbxagent_db489778882d41d6a9d69e2f0d0170b5@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxagent_password": "6763",
                  "jid_pbxpcg": "pbxpcg_806f9c73c4be40a191f5591be778e9f3@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxpcg_password": "af9b871bc5204184bf84d4bc9aabd1bf",
                  "version": "9.2",
                  "serverPingTimeout": 120,
                  "pbxMainBundlePrefix": [
                    "0"
                  ],
                  "usePbxMainBundlePrefix": true,
                  "pbxNumberingTranslator": [
                    {
                      "regexpMatch": "^218",
                      "regexpReplace": "039067",
                      "description": "Numbers 218xxx => 039067xxx"
                    },
                    {
                      "regexpMatch": "^((0..9){1,5})$",
                      "regexpReplace": "$1",
                      "description": "Numbers of five digits are internal"
                    },
                    {
                      "regexpMatch": "^3699$",
                      "regexpReplace": "03699",
                      "description": "Numbers 3699xxx => 03699xxx"
                    },
                    {
                      "regexpMatch": "^18$",
                      "regexpReplace": "",
                      "description": "18 is forbidden"
                    }
                  ],
                  "pbxNationalPrefix": "0",
                  "pbxInternationalPrefix": "00",
                  "statusUpdatedDate": "2016-12-14T15:03:25.858Z",
                  "creationDate": "2016-12-14T15:03:25.858Z",
                  "status": "activating",
                  "siteId": [
                    "57585233d3c3e3e5095250ba"
                  ],
                  "searchResultOrder": [
                    "RAINBOW",
                    "LDAP",
                    "PBX"
                  ],
                  "type": "oxe",
                  "activatingTransactionId": "d182c8e122504350ab36008be1552518",
                  "jid_pbxagent_password_activating": "9e5c326b10b54fcdbf50caf1951f17b7",
                  "id": "58515f3df5eb9225650b64d8"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "Invalid format 'System' 'pbxNumberingTranslator'. Array size is longer than 100",
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/{systemId}/groups/{groupId}": {
      "put": {
        "tags": [
          "Systems Groups"
        ],
        "summary": "Add a new system to a group",
        "description": "Add a new system to a group. If the system already exists in the group or inside another one, an error is raised (409 Conflict)   \nA systems group is a logical set of systems (pabx), sharing the same dial plan and linked through a private network.   \nSystems belonging to this group may either belonging to the same Site, or belonging from several sites under the same company.   \nWaiting for a real use case, it is possible to federate inside the same group, systems belonging to companies under the same organization.   \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities. For us an entity is a company with the flag isCentrex=true.  \nA multi-tenant system can't be set inside a systems group. That does not make sense.",
        "operationId": "PutSystemsGroupId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "SystemsGroup unique identifier",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutSystemsGroupIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "ALE_SP Malaga",
                  "systems": [
                    {
                      "systemId": "57e8c879b8be68670b2a6ca8",
                      "pbxId": "pbxagent_07f9596a5cc34dde8a37dd3200566a10"
                    },
                    {
                      "systemId": "57e8ced2212d6d09123ec9d4",
                      "pbxId": "pbxagent_7f521f657b9042eba12fbf896e60e72b"
                    }
                  ],
                  "companies": [
                    "57e2afbb467af7d11dc0eb57"
                  ],
                  "id": "57ecdc63fa5aac7050dba4d7"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Can't add system with id 57e8ced2212d6d09123ec9d4 to group with id 57e2afbb467af7d11dc0eb58 because there is no default Media Pillar.",
                "errorDetailsCode": 403037
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Media Pillar for system with id 57e8ced2212d6d09123ec9d4 does not exist.",
                "errorDetailsCode": 404030
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": [
                  "System: 57e8c879b8be68670b2a6ca8 was found in SystemsGroup: 57ecdc63fa5aac7050dba4d7 Name: ALE_SP Malaga"
                ],
                "errorDetailsCode": 409200
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Systems Groups"
        ],
        "summary": "Remove a system from a group",
        "description": "Remove system to a group. If the system doesn't exist in the group, an error is raised (404 Not found)   \nA systems group is a logical set of systems (pabx), sharing the same dial plan and linked through a private network.   \nSystems belonging to this group may either belonging to the same Site, or belonging from several sites under the same company.   \nWaiting for a real use case, it is possible to federate inside the same group, systems belonging to companies under the same organization.",
        "operationId": "DeleteSystemsFromGroupId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "SystemsGroup unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "content-type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteSystemsFromGroupIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "ALE_SP Malaga",
                  "systems": [
                    {
                      "systemId": "57e8c879b8be68670b2a6ca8",
                      "pbxId": "pbxagent_07f9596a5cc34dde8a37dd3200566a10"
                    },
                    {
                      "systemId": "57e8ced2212d6d09123ec9d4",
                      "pbxId": "pbxagent_7f521f657b9042eba12fbf896e60e72b"
                    }
                  ],
                  "companies": [
                    "57e2afbb467af7d11dc0eb57"
                  ],
                  "id": "57ecdc63fa5aac7050dba4d7"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Can't remove system with id 57e8ced2212d6d09123ec9d4 from group with id 57e2afbb467af7d11dc0eb58 because there will be no more default Media Pillar.",
                "errorDetailsCode": 403038
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Media Pillar for system with id 57e8ced2212d6d09123ec9d4 does not exist.",
                "errorDetailsCode": 404030
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/groups/{groupId}": {
      "get": {
        "tags": [
          "Systems Groups"
        ],
        "summary": "Get systems group data",
        "description": "A systems group is a logical set of systems (pabx), sharing the same dial plan and linked through a private network.   \nSystems belonging to this group may either belonging to the same Site, or belonging from several sites under the same company.   \n  \nAccording with api permission, the response is not the same.   \n- Superadmin, Support and organization_admin must see all Systems inside the group.   \n- bp_admin, company_admin may see Systems hosted by sites under his company.   \n- site_admin only see systems of his site, inside the group>.",
        "operationId": "GetSystemsGroupId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "SystemsGroup unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSystemsGroupIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "ALE_SP Malaga",
                  "systems": [
                    {
                      "systemId": "57e8c879b8be68670b2a6ca8",
                      "pbxId": "pbxagent_07f9596a5cc34dde8a37dd3200566a10"
                    },
                    {
                      "systemId": "57e8ced2212d6d09123ec9d4",
                      "pbxId": "pbxagent_7f521f657b9042eba12fbf896e60e72b"
                    }
                  ],
                  "companies": [
                    "57e2afbb467af7d11dc0eb57"
                  ],
                  "id": "57ecdc63fa5aac7050dba4d7"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Administrator admin1@ale-international.com is not assigned to administrate Company Id 57e2afbb467af7d11dc0eb58.",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 57e8c879b8be68670b2a6ca9 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Systems Groups"
        ],
        "summary": "Rename a systems group",
        "description": "Only allow a systems group renaming.",
        "operationId": "PutSystemsGroupNameId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "SystemsGroup unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutSystemsGroupNameId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutSystemsGroupNameIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "ALE_SP Malaga",
                  "systems": [
                    {
                      "systemId": "57e8c879b8be68670b2a6ca8",
                      "pbxId": "pbxagent_07f9596a5cc34dde8a37dd3200566a10"
                    },
                    {
                      "systemId": "57e8ced2212d6d09123ec9d4",
                      "pbxId": "pbxagent_7f521f657b9042eba12fbf896e60e72b"
                    }
                  ],
                  "companies": [
                    "57e2afbb467af7d11dc0eb57"
                  ],
                  "id": "57ecdc63fa5aac7050dba4d7"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "No Systems Group data provided for update. Expected optional fields:  name",
                "errorDetailsCode": 400100
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Administrator admin1@ale-international.com is not assigned to administrate Systems Group Id 57e2afbb467af7d11dc0eb58.",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 57e8c879b8be68670b2a6ca9 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Systems Groups"
        ],
        "summary": "Delete a systems group",
        "description": "Delete a systems groups.",
        "operationId": "DeleteSystemsGroupId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "SystemsGroup unique identifier",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteSystemsGroupIdSuccess"
            },
            "examples": {
              "application/json": {
                "status": "SystemsGroup 57ed149c7473a55c17b1d238 successfully deleted",
                "data": []
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Administrator admin1@ale-international.com is not assigned to administrate Systems Group Id 57e2afbb467af7d11dc0eb58.",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 57e8c879b8be68670b2a6ca9 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/groups": {
      "get": {
        "tags": [
          "Systems Groups"
        ],
        "summary": "Get all systems groups",
        "description": "Get all systems groups.   \nA systems group is a logical set of systems (pabx), sharing the same dial plan and linked through a private network.   \nSystems belonging to this group may either belonging to the same Site, or belonging from several sites under the same company.   \nAccording with api permission, the response is not the same.   \n- Superadmin and Support see all SystemsGroups   \n- bp_admin, organization_admin and company_admin may see several SystemsGroups, **but some systems could be hidden for company_admin**.   \n- site_admin only see SystemsGroups hosting some systems of his site, **but some systems could be hidden as they are hosted by another site**.",
        "operationId": "GetSystemsGroups",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allows to filter groups list on the given keyword(s) on field name. The filtering is **not case insensitive** and on partial name match: all groups containing the provided name value will be returned (whatever the position of the match). Ex: if filtering is done on comp, group with the following names are match the filter 'My Group', 'Group', 'A Group 1', 'Group of', ...",
            "required": false,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Should allow to retrieve more or less group details in response. But in fact whatever the choice:   \n- `small`: _id, name, companies, systems (all SystemsGroup fields)   \n- `medium`: all SystemsGroup fields   \n- `full`: all SystemsGroup fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of companies to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first company to retrieve (first company if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort company list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting company list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSystemsGroupsSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "name": "ALE_FR Illkirch",
                    "systems": [
                      {
                        "systemId": "57e518750d0794392aa7daec",
                        "pbxId": "pbxagent_3adb4a57e52f49f6a29b95372aed4751"
                      },
                      {
                        "systemId": "57e518890d0794392aa7daed",
                        "pbxId": "pbxagent_9f8cbe9d67e4445f960378cfa17cc60c"
                      },
                      {
                        "systemId": "57ea24bd5672bd5622a8354a",
                        "pbxId": "pbxagent_0cbe28aa301d40d08b1c9eb264cc7dc8"
                      }
                    ],
                    "companies": [
                      "57e2b30c89a091b21e843924"
                    ],
                    "id": "57e55ba1aa2b014d715f9c8f"
                  },
                  {
                    "name": "ALE_SP Malaga",
                    "systems": [
                      {
                        "systemId": "57e8c879b8be68670b2a6ca8",
                        "pbxId": "pbxagent_07f9596a5cc34dde8a37dd3200566a10"
                      },
                      {
                        "systemId": "57e8ced2212d6d09123ec9d4",
                        "pbxId": "pbxagent_7f521f657b9042eba12fbf896e60e72b"
                      }
                    ],
                    "companies": [
                      "57e2afbb467af7d11dc0eb57"
                    ],
                    "id": "57ecdc63fa5aac7050dba4d7"
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "support"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "post": {
        "tags": [
          "Systems Groups"
        ],
        "summary": "Create a systems group",
        "description": "A systems group is a logical set of systems (pabx), sharing the same dial plan and linked through a private network.   \nSystems belonging to this group may either belonging to the same Site, or belonging from several sites under the same company.   \nWaiting for a real use case, it is possible to federate inside the same group, systems belonging to companies under the same organization.   \nIt's not possible to include multi-tenant systems (isCentrex = true) inside a systems group.   \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities. For us an entity is a company with the flag isCentrex=true.  \nA multi-tenant system can't be set inside a systems group. That does not make sense.",
        "operationId": "PostSystemsGroups",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostSystemsGroups"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostSystemsGroupsSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "ALE_SP Malaga",
                  "systems": [
                    {
                      "systemId": "57e8c879b8be68670b2a6ca8",
                      "pbxId": "pbxagent_07f9596a5cc34dde8a37dd3200566a10"
                    },
                    {
                      "systemId": "57e8ced2212d6d09123ec9d4",
                      "pbxId": "pbxagent_7f521f657b9042eba12fbf896e60e72b"
                    }
                  ],
                  "companies": [
                    "57e2afbb467af7d11dc0eb57"
                  ],
                  "id": "57ecdc63fa5aac7050dba4d7"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": "No Systems Group data provided for update. Expected optional fields:  name",
                "errorDetailsCode": 400100
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Administrator admin.bpdr@mycompany.com is not allowed to perform this operation. (Detail: A CENTREX company can't own a systems group)",
                "errorDetailsCode": 403303
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": [
                  "System: 57e8c879b8be68670b2a6ca8 was found in SystemsGroup: 57ecdc63fa5aac7050dba4d7 Name: ALE_SP Malaga"
                ],
                "errorDetailsCode": 409200
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/{systemId}/phone-numbers": {
      "get": {
        "tags": [
          "Systems Phone Numbers"
        ],
        "summary": "Get all system phone numbers",
        "description": "This API allows to list all phoneNumbers associated to a given system (pbx).   \n  \nUsers with `superadmin` or `support` role can retrieve phoneNumbers from any system.   \n`bp_admin` can only retrieve phoneNumbers linked to systems of End Customer companies for which their bp_admin's company is the BP company.   \nUsers with `admin` role (and not having superadmin nor support role) can only retrieve phoneNumbers of systems that they manage.   \nIn a Multi-Layer organization that describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS, an admin role of a upper layer is allowed to see systems within their's reach.   \n_Notes:_* `systemId` field returned in response corresponds to portal's internal mongoDB id, while `pbxId` is the id handled by PCG.\n* This API is paginated.\n* phoneNumbers list can be filtered on the following fields:\n\n  * `shortNumber`: allow to retrieve only phoneNumbers starting by the provided value.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phone-numbers?**shortNumber=123**\n  * `internalNumber`: allow to retrieve only phoneNumbers starting by the provided value.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phone-numbers?**internalNumber=123**\n  * `pbxUserId`: allow to retrieve only phoneNumbers having the provided pbxUserId value.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phone-numbers?**pbxUserId=123**\n  * `isMonitored`: allow to retrieve only phoneNumbers for which monitoring in Rainbow application is activated (true) or deactivated (false).   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phone-numbers?**isMonitored=true**\n  * `isAssignedToUser`: allow to retrieve only phoneNumbers being associated (true) or not (false) to a Rainbow user.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phone-numbers?**isAssignedToUser=true**\n  * `userId`: allow to retrieve only phoneNumbers being associated to the requested Rainbow user id.   \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phone-numbers?**userId=57960e4fa1ab69c4243415b1**\n  * `companyPrefix`: allow to retrieve only phoneNumbers having the provided companyPrefix value. **See below 'Sharing a system between several companies'**  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phone-numbers?**companyPrefix=8210****This filter is not taken in account for role admin.**\n\n* Filters can be combined.   \nExample: retrieve the list of phoneNumbers being associated to a Rainbow user and for which monitoring is enabled in Rainbow application: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phone-numbers?**isAssignedToUser=true**&**isMonitored=true**\n\n  \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities.  \nWhen directoryNumber are got from this system two more data are available: \"companyName\", \"companyPrefix\".  \nThese data are stored and it's now possible to get all phoneNumbers having the given \"companyPrefix\".   \nA company-admin can only see, then give to a rainbow user, numbers of his company.  \n",
        "operationId": "GetSystemPhoneNumbers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "shortNumber",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having shortNumber field starting with the provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "internalNumber",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having internalNumber field starting with the provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "pbxUserId",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having pbxUserId field equal to provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "companyPrefix",
            "in": "query",
            "description": "When the system is a centrex server (multi-tenant OXE), allow to filter phoneNumbers list on companyPrefix.The companyPrefix value to set is named 'tenantCallNumber' in companies data model. \n\n* 8210: return all phoneNumbers having the prefix 8210, then allocated to the company having the 'tenantCallNumber' 8210 (exact match)\n\n",
            "required": false,
            "type": "string"
          },
          {
            "name": "isMonitored",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having isMonitored field equal to provided value.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having firstName or lastName starting with the provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "deviceName",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers having deviceName field equal to provided value.",
            "required": false,
            "type": "string"
          },
          {
            "name": "isAssignedToUser",
            "in": "query",
            "description": "Allow to filter phoneNumbers list on phoneNumbers being assigned or not to a Rainbow user, according to provided value. \n\n* true: return all phoneNumbers having userId !== null\n* false: return all phoneNumbers having userId === null\n\n",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less phone numbers details in response.   \n- `small`: id shortNumber internalNumber numberE164   \n- `medium`: id shortNumber internalNumber voiceMailNumber number numberE164 isFromSystem pbxId systemId   \n- `full`: all phone numbers fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of phone numbers to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first phone number to retrieve (first phone number if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort phone numbers list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting phone numbers list.",
            "required": false,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSystemPhoneNumbersSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "5790fd2256b61a4d865839fe",
                    "shortNumber": "1001",
                    "internalNumber": "20001",
                    "voiceMailNumber": "9999",
                    "number": "0300001001",
                    "numberE164": "+33300001001",
                    "pbxUserId": "1",
                    "country": "FRA",
                    "type": "work",
                    "deviceType": "landline",
                    "isFromSystem": true,
                    "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                    "systemId": "575beb22ccb329a11a1cef6c",
                    "isMonitored": true,
                    "userId": "57960e4fa1ab69c4243415b1",
                    "jid_im": "82fc7375cf34403a9c711ae7eda0929f@openrainbow.com",
                    "jid_tel": "tel_82fc7375cf34403a9c711ae7eda0929f@openrainbow.com",
                    "jid_password": "fd6806bca74942598f57c288b0d50baa"
                  },
                  {
                    "id": "5790fd2256b61a4d865839ff",
                    "shortNumber": "1002",
                    "internalNumber": "20002",
                    "voiceMailNumber": "9999",
                    "number": "0300001002",
                    "numberE164": "+33300001002",
                    "pbxUserId": "2",
                    "country": "FRA",
                    "type": "work",
                    "deviceType": "landline",
                    "isFromSystem": true,
                    "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                    "systemId": "575beb22ccb329a11a1cef6c",
                    "isMonitored": false
                  }
                ],
                "limit": 100,
                "offset": 0,
                "total": 2
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/{systemId}/phone-numbers/{phoneNumberId}": {
      "get": {
        "tags": [
          "Systems Phone Numbers"
        ],
        "summary": "Get a system phone number",
        "description": "This API allows to retrieve a specific phoneNumber associated to a given system (pbx).   \n  \nUsers with `superadmin` or `support` role can retrieve phoneNumbers from any system.   \n`bp_admin` can only retrieve phoneNumbers linked to systems of End Customer companies for which their bp_admin's company is the BP company.   \nUsers with `admin` role (and not having superadmin nor support role) can only retrieve phoneNumbers of systems that they manage.   \nIn a Multi-Layer organization that describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS, an admin role of a upper layer is allowed to see systems within their's reach.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phoneNumbers/5790fd2256b61a4d865839fe   \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities.  \nWhen a company-admin or a site-admin wants to get one of the directoryNumber of this system we have to check if the \"tenantCallNumber\" of his company matches with \"companyPrefix\".  \nElse an HTTP error 404 Not Found is thrown.  \n",
        "operationId": "GetSystemPhoneNumbersId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "phoneNumberId",
            "in": "path",
            "description": "PhoneNumber unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetSystemPhoneNumbersIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5790fd2256b61a4d865839fe",
                  "shortNumber": "1001",
                  "internalNumber": "20001",
                  "voiceMailNumber": "9999",
                  "number": "0300001001",
                  "numberE164": "+33300001001",
                  "pbxUserId": "1",
                  "country": "FRA",
                  "type": "work",
                  "deviceType": "landline",
                  "isFromSystem": true,
                  "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                  "systemId": "575beb22ccb329a11a1cef6c",
                  "isMonitored": false,
                  "userId": "57960e4fa1ab69c4243415b1",
                  "jid_im": "82fc7375cf34403a9c711ae7eda0929f@openrainbow.com",
                  "jid_tel": "tel_82fc7375cf34403a9c711ae7eda0929f@openrainbow.com",
                  "jid_password": "fd6806bca74942598f57c288b0d50baa"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "phoneNumber with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Systems Phone Numbers"
        ],
        "summary": "Update a system phone number",
        "description": "This API allows to update a phone number for a given system (pbx).   \n  \nIt can be used to link a system phoneNumber to a Rainbow user by setting `userId` parameter. If `userId` parameter is provided, jid_im, jid_tel and jid_password of the corresponding user are automatically set in phoneNumber.   \nIt can also be used to enable monitoring of this phoneNumber by PCG (set `isMonitored` parameter to true). **Note that**`pbxId`, `systemId`, `shortNumber` and `pbxUserId` can't be modified.   \n  \nWhen the phoneNumber is updated with this API, PCG is notified on its corresponding JID pbxpcg with the following XMPP iq: \n\n    \n```html\n<iq id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n          from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n          to=\"pbxpcg_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com\"\n          xmlns=\"jabber:client\">\n     <config xmlns=\"urn:xmpp:pbxagent:config:1\">\n         <user action=\"update\"/>\n            <shortNumber>1001</shortNumber>\n            <internalNumber>20001</internalNumber>\n            <voiceMailNumber>9999</voiceMailNumber>\n            <numberE164>+33300001001</numberE164>\n            <isMonitored>false</isMonitored>\n            <userId>57960e4fa1ab69c4243415b1</userId>\n            <jid_im>82fc7375cf34403a9c711ae7eda0929f@openrainbow.com</jid_im>\n            <jid_tel>tel_82fc7375cf34403a9c711ae7eda0929f@openrainbow.com</jid_tel>\n            <jid_password>fd6806bca74942598f57c288b0d50baa</jid_password>\n     </config>\n</iq>\n```\n  \n  \nThe API waits that PCG has taken into account the phoneNumber update before processing the update in database and sending the response to client.   \n  \nUsers with `superadmin` role can update phoneNumbers objects of any system.   \n`bp_admin` can only update phoneNumbers linked to systems of End Customer companies for which their bp_admin's company is the BP company.   \nUsers with `admin` role (and not having superadmin) can only update phoneNumbers objects on systems that they manage.   \nIn a Multi-Layer organization that describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS, an admin role of a upper layer is allowed to see systems within their's reach.   \n  \nExample: PUT https://openrainbow.com/api/rainbow/admin/v1.0/systems/569d0ef3ef7816921f7e94fa/phoneNumbers/5790fd2256b61a4d865839fe   \n  \n**Specific feature:** Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities. For us an entity is a company with the flag isCentrex=true.  \nIt's not possible to update the internalNumber for a phone number supplied by this kind of system.  \nThe specific error \"internalNumber 3000 is readonly because it belongs to a multi-tenant system\",\"errorDetailsCode\": 409553 is thrown.",
        "operationId": "PutSystemPhoneNumbers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "phoneNumberId",
            "in": "path",
            "description": "PhoneNumber unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutSystemPhoneNumbers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutSystemPhoneNumbersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "5790fd2256b61a4d865839fe",
                  "shortNumber": "1001",
                  "internalNumber": "20001",
                  "voiceMailNumber": "9999",
                  "number": "0300001001",
                  "numberE164": "+33300001001",
                  "pbxUserId": "1",
                  "country": "FRA",
                  "type": "work",
                  "deviceType": "landline",
                  "isFromSystem": true,
                  "pbxId": "pbxagent_315e5b2dbf8746fd93660df375933c23",
                  "systemId": "575beb22ccb329a11a1cef6c",
                  "isMonitored": false,
                  "userId": "57960e4fa1ab69c4243415b1",
                  "jid_im": "82fc7375cf34403a9c711ae7eda0929f@openrainbow.com",
                  "jid_tel": "tel_82fc7375cf34403a9c711ae7eda0929f@openrainbow.com",
                  "jid_password": "fd6806bca74942598f57c288b0d50baa"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate System 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "user with id 574ffbe0170a86f3297bc35a does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "System 575beb22ccb329a11a1cef6c already has a phoneNumber with shortNumber 1001",
                "errorDetailsCode": 409550
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/{systemId}/phone-numbers/multi-companies": {
      "get": {
        "tags": [
          "Systems Phone Numbers Multi Companies"
        ],
        "summary": "Get all companyPrefix for a isCentrex system",
        "description": "Sharing a system between several companies   \nSince 1.47.0 release, configuring companies sharing a multi-tenant system is possible.  \nAn OXE can be multi-company.  \nA multi-tenant system, so called CENTREX, allows sharing a call-server between several entities.  \nWhen directoryNumber are got from this system two more data are available: \"companyName\", \"companyPrefix\".  \nThese data are stored and it's now possible to get all \"companyPrefix\".   \n",
        "operationId": "GetSystemPhoneNumbersMulti",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/systems/{systemId}/reset-password": {
      "post": {
        "tags": [
          "Systems Reset Password"
        ],
        "summary": "Reset CCCA jid password",
        "description": "It would be necessary to reset the password used by the CCCA to join rainbow infrastructure.   \nAmong system data fields, jid_pbxagent and jid_pbxagent_password are used by the CCCA to try an authentication.   \nThe new API : \n\n* regenerate an activation code which is stored in the Admin portal and XMPP server (four digits)\n* does not change the existing pbxId\n* replace the system status from \"activated\" to \"created\"\n\n  \nTo finalize CCCA authentication refer to (Get a pbx data using API [GET /api/rainbow/pcg/v1.0/pbxs/{pbxId}][0]).\n\n[0]: #api-pcg_pbxs-GetPbxId",
        "operationId": "PostSystemsRestPassword",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "System unique identifier (like 569ce8c8f9336c471b98eda1)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostSystemsRestPasswordSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "name": "node_alpha_oxe_R11 demo",
                  "country": "FRA",
                  "pbxId": "pbxagent_db489778882d41d6a9d69e2f0d0170b5",
                  "jid_pbxagent": "pbxagent_db489778882d41d6a9d69e2f0d0170b5@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxagent_password": "6763",
                  "jid_pbxpcg": "pbxpcg_806f9c73c4be40a191f5591be778e9f3@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_pbxpcg_password": "af9b871bc5204184bf84d4bc9aabd1bf",
                  "version": "9.2",
                  "serverPingTimeout": 120,
                  "pbxMainBundlePrefix": [
                    "0"
                  ],
                  "usePbxMainBundlePrefix": true,
                  "pbxNumberingTranslator": [
                    {
                      "regexpMatch": "^218",
                      "regexpReplace": "039067",
                      "description": "Numbers 218xxx => 039067xxx"
                    },
                    {
                      "regexpMatch": "^((0..9){1,5})$",
                      "regexpReplace": "$1",
                      "description": "Numbers of five digits are internal"
                    },
                    {
                      "regexpMatch": "^3699$",
                      "regexpReplace": "03699",
                      "description": "Numbers 3699xxx => 03699xxx"
                    },
                    {
                      "regexpMatch": "^18$",
                      "regexpReplace": "",
                      "description": "18 is forbidden"
                    }
                  ],
                  "pbxNationalPrefix": "0",
                  "pbxInternationalPrefix": "00",
                  "statusUpdatedDate": "2016-12-14T15:03:25.858Z",
                  "creationDate": "2016-12-14T15:03:25.858Z",
                  "status": "created",
                  "siteId": [
                    "57585233d3c3e3e5095250ba"
                  ],
                  "searchResultOrder": [
                    "RAINBOW",
                    "LDAP",
                    "PBX"
                  ],
                  "type": "oxe",
                  "id": "58515f3df5eb9225650b64d8"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "systemId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "User 5749afba245015fe0d36e96c with 'admin' role is not assigned to administrate System 57486e5d807a594145e510d6",
                "errorDetailsCode": 403301
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "System with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/users/{userId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a user data",
        "description": "This API can be used to get a user.   \n  \nUsers with `superadmin`, `support` role can retrieve any user whatever the company.   \nUsers with `support` role retrieve additional data lastLoginIOSDate and lastLoginAndroidDate.   \n  \nUsers with `bp_admin` or `bp_finance` role can only retrieve users from company being End Customers of their BP company (i.e. all the companies having bpId equal to their companyId).   \n  \nUsers with `admin` role can only retrieve users belonging to companies they can manage. That is to say: \n\n* an organization_admin can only get users belonging to a company he can manage (i.e. companies having organisationId equal to his organisationId)\n* a company_admin can only get a user being in his company\n* a site_admin can only get a user being in his company\n\n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/users/56c5cb38e8078d7512c43985",
        "operationId": "GetUsersId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56c5c19f94141765119f896c)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less user details in response.   \n- `small`: id, loginEmail, firstName, lastName, displayName, companyId, companyName, isTerminated   \n- `medium`: id, loginEmail, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode   \n- `full`: all user fields",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetUsersIdSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "56c5c19f94141765119f896c",
                  "loginEmail": "user1@company.com",
                  "firstName": "Firstname",
                  "lastName": "Lastname",
                  "displayName": "Firstname Lastname",
                  "nickName": "Nickname",
                  "title": "Mr.",
                  "jobTitle": "Research and Development",
                  "emails": [
                    {
                      "email": "user1@company.com",
                      "type": "work"
                    },
                    {
                      "email": "user1@home.com",
                      "type": "home"
                    }
                  ],
                  "phoneNumbers": [
                    {
                      "shortNumber": "1002",
                      "pbxId": "PBX712e-bd96-0c27-4350-a3ff-dc0c-83e7-c246",
                      "systemId": "57dc0644f44a97c9155cd462",
                      "country": "FRA",
                      "number": "0390676767",
                      "numberE164": "+33390676767",
                      "phoneNumberId": "58876dad81e063e01187dd24",
                      "isMonitored": true,
                      "isFromSystem": true,
                      "deviceType": "landline",
                      "type": "work"
                    },
                    {
                      "number": "0390909090",
                      "country": "FRA",
                      "numberE164": "+33390909090",
                      "phoneNumberId": "577e2e9b86c953de7838d635",
                      "isFromSystem": false,
                      "deviceType": "landline",
                      "type": "home"
                    },
                    {
                      "number": "0690909090",
                      "country": "FRA",
                      "numberE164": "+33690909090",
                      "phoneNumberId": "577e2e9b86c953de7838d636",
                      "isFromSystem": false,
                      "deviceType": "mobile",
                      "type": "home"
                    }
                  ],
                  "country": "FRA",
                  "language": "fr-FR",
                  "timezone": "Europe/Paris",
                  "jid_im": "2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com",
                  "jid_tel": "tel_2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com",
                  "jid_password": "3b3f6e2c927940b2875f1ec604c0363b",
                  "roles": [
                    "user",
                    "superadmin"
                  ],
                  "adminType": "undefined",
                  "companyId": "569ce8c8f9336c471b98eda1",
                  "companyName": "My company",
                  "isInDefaultCompany": false,
                  "calendars": [
                    {
                      "email": "user1@company.com",
                      "enabled": true
                    }
                  ],
                  "isADSearchAvailable": true,
                  "isActive": true,
                  "isInitialized": true,
                  "initializationDate": "2016-01-18T13:30:44.498Z",
                  "activationDate": "2016-01-18T13:29:44.498Z",
                  "creationDate": "2016-01-18T12:45:44.498Z",
                  "lastUpdateDate": "2016-01-19T16:33:22.548Z",
                  "lastAvatarUpdateDate": "2016-01-19T11:29:11.567Z",
                  "createdBySelfRegister": true,
                  "createdByAdmin": {
                    "userId": "56d69d020c92b35b3041d433",
                    "loginEmail": "superadmin@localhost.fr"
                  },
                  "invitedBy": {
                    "invitationId": "574ffe07170a86f3297bc35b",
                    "invitationDate": "2016-01-15T13:29:44.498Z",
                    "userId": "56d69d020c92b35b3041d533",
                    "loginEmail": "user0@company.com"
                  },
                  "firstLoginDate": "2016-01-18T13:29:44.498Z",
                  "lastLoginDate": "2016-02-23T09:17:42.523Z",
                  "loggedSince": "2016-02-23T09:17:42.523Z",
                  "isTerminated": false,
                  "guestMode": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "User with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update a user",
        "description": "This API can be used to update data of a user.   \nUnlike end-user PUT /users/id API, this admin API allows to update these fields: `loginEmail`, `password`, `roles`, `accountType` and `isActive`.   \nIn case of user password update, if user account was locked (because of too many login attempts failures), user account will be unlocked once password is changed.   \n  \n**BP Admin** and **BP Finance** users can only update users being in a company linked to their BP company.   \n**Admin** users can only update users being in their own company.   \n**Support** users can only update user password.   \nWhatever user's admin roles, user can't update his own loginEmail.   \nA user can't modify his own roles.   \n  \nA presence stanza is sent to updated user's resources and users being in user's roster. This allow clients to be notified that this user has been updated: \n\n    \n```html\n<presence from='3ae059e2a91c40d9bdd7df0eedc911ca@openrainbow.com'>\n    <x xmlns='vcard-temp:x:update'>\n        <data/>\n    </x>\n</presence>\n```\n  \nNote that phone numbers linked to a system (pbx) can't be added in user's phoneNumbers using this API. System phone numbers are created by administrators or by PCG and can be linked to Rainbow user using: [PUT /api/rainbow/admin/v1.0/systems/:systemId/phone-numbers/:phoneNumberId][0]  \nIn some cases, creating a user with GUEST role may be sufficient. Here are GUEST role specificity: \n\n* GUEST is a single role that can't be modified\n* Created by a COMPANY ADMIN only, in his company\n* Has limited rights to chat, audio and video conversations\n* Is never notified by email\n* Can't receive welcome message by Emily\n* Can't manage its password (reset)\n* By default, can't be search inside or outside his company\n* Can't be moved to another company\n* Definitely deleted (his user experience is not kept: conversations ...)\n\n  \nNote than when user password is changed, all its previously generated JWT are revoked and jid_password of its jid_im and jid_tel is updated with a new password. All connected jid_im and jid_tel resources are also disconnected.   \nTherefore, clients have to login again with this user in order to retrieve a new valid JWT and its new jid_password.   \n  \nThe following XMPP message is sent to user's jid_im to warn that the password has changed: \n\n    \n```html\n<message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\" type=\"management\"\n    from=\"pcloud_enduser_1@openrainbow.com/172440802160413612281463752830017532\"\n    to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"\n    xmlns=\"jabber:client\">\n    <userpassword action=\"update\" xmlns=\"jabber:iq:configuration\"\n</message>\n```\n\n[0]: #api-admin_systems_phone_numbers-PutSystemPhoneNumbers",
        "operationId": "PutUsers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56c5c19f94141765119f896c)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutUsers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PutUsersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "56c5c19f94141765119f896c",
                  "loginEmail": "user1@company.com",
                  "firstName": "Firstname",
                  "lastName": "Lastname",
                  "displayName": "Firstname Lastname",
                  "nickName": "Nickname",
                  "title": "Mr.",
                  "jobTitle": "Research and Development",
                  "emails": [
                    {
                      "email": "user1@company.com",
                      "type": "work"
                    },
                    {
                      "email": "user1@home.com",
                      "type": "home"
                    }
                  ],
                  "phoneNumbers": [
                    {
                      "shortNumber": "1002",
                      "pbxId": "PBX712e-bd96-0c27-4350-a3ff-dc0c-83e7-c246",
                      "systemId": "57dc0644f44a97c9155cd462",
                      "country": "FRA",
                      "number": "0390676767",
                      "numberE164": "+33390676767",
                      "phoneNumberId": "58876dad81e063e01187dd24",
                      "isMonitored": true,
                      "isFromSystem": true,
                      "deviceType": "landline",
                      "type": "work"
                    },
                    {
                      "number": "0390909090",
                      "country": "FRA",
                      "numberE164": "+33390909090",
                      "phoneNumberId": "577e2e9b86c953de7838d635",
                      "isFromSystem": false,
                      "deviceType": "landline",
                      "type": "home"
                    },
                    {
                      "number": "0690909090",
                      "country": "FRA",
                      "numberE164": "+33690909090",
                      "phoneNumberId": "577e2e9b86c953de7838d636",
                      "isFromSystem": false,
                      "deviceType": "mobile",
                      "type": "home"
                    }
                  ],
                  "country": "FRA",
                  "language": "fr-FR",
                  "timezone": "Europe/Paris",
                  "jid_im": "2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com",
                  "jid_tel": "tel_2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com",
                  "jid_password": "3b3f6e2c927940b2875f1ec604c0363b",
                  "roles": [
                    "user",
                    "superadmin"
                  ],
                  "adminType": "undefined",
                  "companyId": "569ce8c8f9336c471b98eda1",
                  "companyName": "My company",
                  "isInDefaultCompany": false,
                  "isActive": true,
                  "isInitialized": true,
                  "initializationDate": "2016-01-18T13:30:44.498Z",
                  "activationDate": "2016-01-18T13:29:44.498Z",
                  "creationDate": "2016-01-18T12:45:44.498Z",
                  "lastUpdateDate": "2016-01-19T16:33:22.548Z",
                  "lastAvatarUpdateDate": "2016-01-19T11:29:11.567Z",
                  "createdBySelfRegister": true,
                  "createdByAdmin": {
                    "userId": "56d69d020c92b35b3041d433",
                    "loginEmail": "superadmin@localhost.fr"
                  },
                  "invitedBy": {
                    "invitationId": "574ffe07170a86f3297bc35b",
                    "invitationDate": "2016-01-15T13:29:44.498Z",
                    "userId": "56d69d020c92b35b3041d533",
                    "loginEmail": "user0@company.com"
                  },
                  "firstLoginDate": "2016-01-18T13:29:44.498Z",
                  "lastLoginDate": "2016-02-23T09:17:42.523Z",
                  "loggedSince": "2016-02-23T09:17:42.523Z",
                  "isTerminated": false,
                  "guestMode": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "The current company subscription disallow to create another admin. (Detail: max value [counter])",
                "errorDetailsCode": 403304
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "User with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": [
                  {
                    "param": "phoneNumbers.internalNumber",
                    "msg": "internalNumber 218001 is already associated to another phoneNumber within the system group to which belongs system 57dc0644f44a97c9155cd462",
                    "value": "218001"
                  }
                ],
                "errorDetailsCode": 409552,
                "errorDetailsData": {
                  "conflictWith": {
                    "id": "598087a294fa7340b7dfa5bd",
                    "internalNumber": "218001",
                    "shortNumber": "8001",
                    "pbxId": "pbxagent_e84bba45aef74331858354a2a0ac653f",
                    "systemId": "57dc0620317e17c315b94487",
                    "deviceName": "",
                    "lastName": "Doe",
                    "firstName": "John"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete a user",
        "description": "This API can be used to delete a user.   \n  \n**BP Admin** and **BP Finance** users can only delete users being in a company linked to their BP company.   \n**Admin** users can only delete users being in their own company. (superadmin, organization_admin, company_admin)   \n  \nDepending current user initialization, the behaviour to follow may change \n\n* user never initialized and never logged, user with the role 'guest':\n\n  * delete the user from xmpp and database\n\n* user currently initialized or logged at least one time\n\n  * change loginEmail, change rainbow password, change jid_password, warn deleted user clients for disconnection\n  * delete personal phone numbers and free system phone numbers\n  * flag pending invite as canceled\n  * flag join company requests as canceled\n  * for all rooms where the user privilege is not 'moderator' or not le last, he gets the status 'deleted'\n  * for all rooms where the user is the last moderator, the room is 'archived', that is to say all users of the room get the status 'unsubscribed'\n  * delete avatar and warn clients\n  * set user flag 'isTerminated' and move him to the dedicated company 'Terminated'\n\n\nThe following XMPP message is sent to all users being in deleted user's roster: \n\n    \n```html\n<message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\" type=\"management\"\n    from=\"pcloud_enduser_1@openrainbow.com/172440802160413612281463752830017532\"\n    to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"\n    xmlns=\"jabber:client\">\n    <useraccount id=\"56c5c19f94141765119f896c\" action=\"update\" xmlns=\"jabber:iq:configuration\"\n</message>\n```\n  \n**Only a migration script is planned to delete permanently a user 'terminated' after a legal delay time.**",
        "operationId": "DeleteUsers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56c5c19f94141765119f896c)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/DeleteUsersSuccess"
            },
            "examples": {
              "application/json": {
                "status": "User 56c5c19f94141765119f896c successfully disabled",
                "data": {
                  "firstLoginDate": "2016-10-26T07:31:05.744Z",
                  "activationDate": "2016-10-26T07:23:59.796Z",
                  "companyName": "Terminated",
                  "initializationDate": "2016-10-26T07:31:33.651Z",
                  "accountType": "free",
                  "jid_password": "cf1c87a48b7f434fa4d1bdd2895330f8",
                  "sponsoring": {
                    "invitationsAcceptedByList": [],
                    "invitationsSentNumber": 0
                  },
                  "id": "58105a0f4b1748307345bf58",
                  "loggedSince": "2016-10-26T13:57:47.991Z",
                  "loginEmail": "ter_1478105583769_alice@mycompany.fr",
                  "failedLoginAttempts": 0,
                  "firstName": "Alice",
                  "isInitialized": true,
                  "profile": {
                    "subscriptionId": "580e2630a6501830067dcb7a",
                    "offerId": "580e262ea2bc0f70c000dacd",
                    "offerName": "Essential",
                    "profileId": "580e262ea2bc0f70c000dacc",
                    "profileName": "Essential",
                    "assignationDate": "2016-11-02T16:53:04.163Z",
                    "status": "active"
                  },
                  "companyId": "5808b7fd0265331550d655d1",
                  "roles": [
                    "user"
                  ],
                  "visibleBy": [],
                  "lastUpdateDate": "2016-11-02T16:53:03.979Z",
                  "lastName": "De Nice",
                  "displayName": "Alice De Nice",
                  "terminatedDate": "2016-11-02T16:53:03.769Z",
                  "jid_tel": "tel_81bd130d022f470fa1455dfe8916f2c6@francky-all-in-one-dev-1.opentouch.cloud",
                  "createdBySelfRegister": false,
                  "visibility": "private",
                  "phoneNumbers": [],
                  "lastLoginDate": "2016-10-26T13:57:47.991Z",
                  "jid_im": "81bd130d022f470fa1455dfe8916f2c6@francky-all-in-one-dev-1.opentouch.cloud",
                  "emails": [
                    {
                      "email": "alice@mycompany.fr",
                      "type": "work"
                    }
                  ],
                  "terminatedBy": {
                    "userId": "57e396cdb6173c684e48c6d7",
                    "loginEmail": "superadmin@openrainbow.org"
                  },
                  "createdByAdmin": {
                    "userId": "57e3c0376f24fcf959676dba",
                    "loginEmail": "admin5@ale-international.com"
                  },
                  "adminType": "undefined",
                  "creationDate": "2016-10-26T07:23:59.796Z",
                  "isTerminated": true,
                  "isActive": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "User with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "User 58105a0f4b1748307345bf58 (ter_1477556743898_alice@mycompany.fr). Already terminated.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get all users",
        "description": "This API allows administrators to list users.   \n  \nUsers with `superadmin`, `support` role can retrieve users from any company.   \nUsers with `support` role can retrieve lastLoginIOSDate and lastLoginAndroidDate providing format option `full`.   \n  \nUsers with `bp_admin` or `bp_finance` role retrieve only users from company being End Customers of their BP company (i.e. all the companies having bpId equal to their companyId).   \n  \nUsers with `admin` role retrieve only users belonging to companies they can manage. That is to say: \n\n* an organization_admin gets all users belonging to each companies he manages (i.e. companies having organisationId equal to his organisationId)\n* a company_admin gets all users being in his company\n* a site_admin gets all users being in his company\n\n  \nNote: \n\n* To hide GUEST, the filter roles=user is applied by default. Then all multi-roles like `admin`, `bp_admin` or `bp_finance` stay retrievable. To get only guest belonging to a company, use GET /api/rainbow/admin/v1.0/users?roles=guest\n\n  \nThis API can return more or less user information using format option in query string arguments (default is small).   \nThis API implement pagination, using limit and offset options in query string arguments (default is limit on 100 users). Result sorting can also be done using sort and order options (default is sort on displayName on ascending order).   \n  \nThis API allows to filter results on several criterion by providing appropriate options in query string arguments (displayName, companyName, loginEmail, jid_im, jid_tel, companyId).   \n  \nExamples: \n\n* basic: GET https://openrainbow.com/api/rainbow/admin/v1.0/users\n* with format options: GET https://openrainbow.com/api/rainbow/admin/v1.0/users?format=full\n* with pagination options: GET https://openrainbow.com/api/rainbow/admin/v1.0/users?limit=10&offset=20&sortField=loginEmail&sortOrder=-1\n* with filter options: GET https://openrainbow.com/api/rainbow/admin/v1.0/users?displayName=john doe&companyId=56d6f0d441255dd54b5b61b3 56b89d26f7ab94c69ad41584\n\n",
        "operationId": "GetUsers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          },
          {
            "name": "searchEmail",
            "in": "query",
            "description": "Allows to filter users list on the loginEmail field using the word provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "Allows to filter users list on the companyIds provided in this option.   \n  \nIn the case of `admin` (without superadmin, support roles), provided companyIds should correspond to companies visible by logged in user's company (if some of the provided companyId are not visible by logged in user's company, users from these companies will not be returned).",
            "required": false,
            "type": "string"
          },
          {
            "name": "roles",
            "in": "query",
            "description": "Allows to filter users list on the role(s) provided in this option.   \n  \nThis allow for example to get all users with role bp_admin.   \nBy default, only users having (at least) the role `user` are listed.",
            "required": false,
            "type": "string"
          },
          {
            "name": "isTerminated",
            "in": "query",
            "description": "Allows to filter users list on the status 'isTerminated'.   \n  \nBy default, terminated users are not listed.",
            "required": false,
            "type": "string"
          },
          {
            "name": "format",
            "in": "query",
            "description": "Allows to retrieve more or less user details in response.   \n- `small`: id, loginEmail, firstName, lastName, displayName, companyId, companyName, isTerminated   \n- `medium`: id, loginEmail, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode   \n- `full`: all user fields",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Allow to specify the number of users to retrieve.",
            "required": false,
            "type": "number"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Allow to specify the position of first user to retrieve (first user if not specified). Warning: if offset > total, no results are returned.",
            "required": false,
            "type": "number"
          },
          {
            "name": "sortField",
            "in": "query",
            "description": "Sort user list based on the given field.",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Specify order when sorting user list.",
            "required": false,
            "type": "number"
          },
          {
            "name": "displayName",
            "in": "query",
            "description": "Allows to filter users list on the given keyword(s) on field displayName.",
            "required": false,
            "type": "string"
          },
          {
            "name": "useEmails",
            "in": "query",
            "description": "used with displayName, allows to filter users list on the given keyword(s) on field displayName for loginEmails too.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "companyName",
            "in": "query",
            "description": "Allows to filter users list on the given keyword(s) on field companyName.",
            "required": false,
            "type": "string"
          },
          {
            "name": "loginEmail",
            "in": "query",
            "description": "Allows to filter users list on the loginEmails provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "email",
            "in": "query",
            "description": "Allows to filter users list on the emails provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "visibility",
            "in": "query",
            "description": "Allows to filter users list on the visibility(ies) provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "organisationId",
            "in": "query",
            "description": "Allows to filter users list on the organisationIds provided in this option.   \n  \nOption is reserved for superAdmin or admin allowed to manage the given organisationId.",
            "required": false,
            "type": "string"
          },
          {
            "name": "siteId",
            "in": "query",
            "description": "Allows to filter users list on the siteIds provided in this option.   \n  \nOption is reserved for superAdmin or admin allowed to manage the given siteIds.",
            "required": false,
            "type": "string"
          },
          {
            "name": "jid_im",
            "in": "query",
            "description": "Allows to filter users list on the jid_ims provided in this option.",
            "required": false,
            "type": "string"
          },
          {
            "name": "jid_tel",
            "in": "query",
            "description": "Allows to filter users list on the jid_tels provided in this option.",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GetUsersSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "id": "56c5c19f94141765119f896c",
                    "loginEmail": "user1@company.com",
                    "firstName": "Firstname",
                    "lastName": "Lastname",
                    "displayName": "Firstname Lastname",
                    "companyId": "569ce8c8f9336c471b98eda1",
                    "companyName": "My company",
                    "isTerminated": false
                  },
                  {
                    "id": "56c5cb38e8078d7512c43985",
                    "loginEmail": "user2@company.com",
                    "firstName": "Firstname",
                    "lastName": "Lastname",
                    "displayName": "Firstname Lastname",
                    "companyId": "569ce8c8f9336c471b98eda1",
                    "companyName": "My company",
                    "isTerminated": false
                  }
                ],
                "total": 2,
                "limit": 100,
                "offset": 0
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "site_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Create a user",
        "description": "This api creates a user in Rainbow application.   \n  \nJabber identifiers (IM and TEL) are generated and user is created in XMPP server.   \n  \nUsers with `bp_admin` or `bp_finance` role can only create users in companies being End Customers of their BP company (i.e. all the companies having bpId equal to their companyId).   \n  \nUsers with `admin` role can only create users in companies they can manage. That is to say:  \n- an organization_admin can create users only in a company he can manage (i.e. companies having organisationId equal to his organisationId)  \n- a company_admin can only create users in his company  \n- a site_admin can't create users   \n  \n**Admin** users can only set roles `guest`, `user` and `admin`.   \n  \nNote that phone numbers linked to a system (pbx) can't be added in user's phoneNumbers using this API. System phone numbers are created by administrators or by PCG and can be linked to Rainbow user using: [PUT /api/rainbow/admin/v1.0/systems/{systemId}/phone-numbers/{phoneNumberId}][0]  \n  \nIn some cases, creating a user with GUEST role may be sufficient. Here are GUEST role specificity: \n\n* GUEST is a single role that can't be modified\n* Created by a COMPANY ADMIN only, in his company\n* Has limited rights to chat, audio and video conversations\n* Is never notified by email\n* Can't receive welcome message by Emily\n* Can't manage its password (reset)\n* By default, can't be search inside or outside his company\n* Can't be moved to another company\n* Definitely deleted (his user experience is not kept: conversations ...)\n\n\n[0]: #api-admin_systems_phone_numbers-PutSystemPhoneNumbers",
        "operationId": "PostUsers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostUsers"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PostUsersSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "firstName": "John",
                  "lastName": "Doe",
                  "emails": [
                    {
                      "email": "john.doe@home.com",
                      "type": "home"
                    },
                    {
                      "email": "john.doe@mycompany.com",
                      "type": "work"
                    }
                  ],
                  "phoneNumbers": [
                    {
                      "firstName": "",
                      "lastName": "",
                      "deviceName": "",
                      "names": [],
                      "type": "home",
                      "deviceType": "landline",
                      "isFromSystem": false,
                      "isMonitored": false,
                      "number": "0390909090",
                      "country": "FRA",
                      "numberE164": "+33390909090",
                      "phoneNumberId": "5b39e11ed0b1a669e71d0eac"
                    },
                    {
                      "firstName": "",
                      "lastName": "",
                      "deviceName": "",
                      "names": [],
                      "type": "home",
                      "deviceType": "mobile",
                      "isFromSystem": false,
                      "isMonitored": false,
                      "number": "0690909090",
                      "country": "FRA",
                      "numberE164": "+33690909090",
                      "phoneNumberId": "5b39e11ed0b1a669e71d0eae"
                    },
                    {
                      "firstName": "",
                      "lastName": "",
                      "deviceName": "",
                      "names": [],
                      "type": "rainbow",
                      "deviceType": "other",
                      "isFromSystem": false,
                      "isMonitored": false,
                      "number": "10277088499392642",
                      "phoneNumberId": "5b39e11ed0b1a669e71d0eb0"
                    }
                  ],
                  "isActive": true,
                  "roles": [
                    "user",
                    "admin"
                  ],
                  "adminType": "company_admin",
                  "accountType": "free",
                  "profiles": [
                    {
                      "isDefault": true,
                      "status": "active",
                      "assignationDate": "2018-07-02T08:23:58.289Z",
                      "provisioningNeeded": [],
                      "canBeSold": false,
                      "isExclusive": false,
                      "isPrepaid": false,
                      "subscriptionId": "58d4f9821f0612597704f6c8",
                      "offerId": "58346927cd759a1cbd501e8d",
                      "offerName": "Professional",
                      "profileId": "58346200cd759a1cbd501e8c",
                      "profileName": "Professional",
                      "offerDescription": "Professional offer (6€/month)",
                      "offerTechnicalDescription": "Professional"
                    }
                  ],
                  "visibility": "public",
                  "creationDate": "2018-07-02T08:23:58.279Z",
                  "activationDate": "2018-07-02T08:23:58.279Z",
                  "isInitialized": true,
                  "initializationDate": "2018-07-02T08:23:58.279Z",
                  "createdBySelfRegister": false,
                  "failedLoginAttempts": 0,
                  "timeToLive": -1,
                  "isTerminated": false,
                  "guestMode": false,
                  "loginEmail": "john.doe@mycompany.com",
                  "nickName": "Nickname",
                  "title": "Mr.",
                  "jobTitle": "Secret agent",
                  "country": "FRA",
                  "language": "fr-FR",
                  "timezone": "Europe/Paris",
                  "companyId": "58d4f9821f0612597704f6c7",
                  "createdByAdmin": {
                    "userId": "57e396cdb6173c684e48c6d7",
                    "loginEmail": "superadmin@openrainbow.org"
                  },
                  "jid_im": "aa86d52e08f24f46a5dc39c48e79c03c@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_tel": "tel_aa86d52e08f24f46a5dc39c48e79c03c@francky-all-in-one-dev-1.opentouch.cloud",
                  "jid_password": "5c653ecd5c3a486580af3967b2a570da",
                  "companyName": "DEMO COMPANY",
                  "displayName": "John Doe",
                  "id": "5b39e11ed0b1a669e71d0ea9",
                  "isInDefaultCompany": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "The current company subscription disallow to create another admin. (Detail: max value [counter])",
                "errorDetailsCode": 403304
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "User with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": [
                  {
                    "param": "phoneNumbers.internalNumber",
                    "msg": "internalNumber 218001 is already associated to another phoneNumber within the system group to which belongs system 57dc0644f44a97c9155cd462",
                    "value": "218001"
                  }
                ],
                "errorDetailsCode": 409552,
                "errorDetailsData": {
                  "conflictWith": {
                    "id": "598087a294fa7340b7dfa5bd",
                    "internalNumber": "218001",
                    "shortNumber": "8001",
                    "pbxId": "pbxagent_e84bba45aef74331858354a2a0ac653f",
                    "systemId": "57dc0620317e17c315b94487",
                    "deviceName": "",
                    "lastName": "Doe",
                    "firstName": "John"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/users/{userId}/companies/default": {
      "put": {
        "tags": [
          "Users Companies"
        ],
        "summary": "Unlink user from a company and link it to default company",
        "description": "This API can be used to unlink user from a company and link it to the default company.   \nNote that if user to unlink is an admin (organization_admin, company_admin, bp_admin, bp_finance ...), he will loose his admin rights.   \nNote also that if user was linked to PBX phone numbers, these phone numbers will be removed from user phone numbers.   \n",
        "operationId": "UnlinkUserFromACompany",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56d0277a0261b53142a5cab5)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/UnlinkUserFromACompanySuccess"
            },
            "examples": {
              "application/json": {
                "status": "User 590b29d522315ea8d106fb3a successfully unlinked from company 5901d451faae4928ef13bb78.",
                "data": {
                  "displayName": "Organisation Admin",
                  "companyName": "Default",
                  "loginEmail": "orgadmin1@acme.com",
                  "country": "FRA",
                  "companyId": "58ede1170f0f528f85faa9bc",
                  "jid_im": "c47c27bc90464918b82243f047ada08e@luverhae-all-in-one-dev-1.opentouch.cloud",
                  "jid_tel": "tel_c47c27bc90464918b82243f047ada08e@luverhae-all-in-one-dev-1.opentouch.cloud",
                  "jid_password": "f36a4b7c02424c9c92df0ccdf15ce140",
                  "createdByAdmin": {
                    "userId": "58ede12b44b22d0c86ffb4fd",
                    "loginEmail": "superadmin@openrainbow.org"
                  },
                  "isTerminated": false,
                  "failedLoginAttempts": 0,
                  "loggedSince": "2017-05-04T13:19:24.836Z",
                  "lastLoginDate": "2017-05-04T13:19:24.836Z",
                  "firstLoginDate": "2017-05-04T13:19:24.836Z",
                  "createdBySelfRegister": false,
                  "lastUpdateDate": "2017-05-04T13:49:44.664Z",
                  "initializationDate": "2017-05-04T13:17:09.467Z",
                  "isInitialized": true,
                  "activationDate": "2017-05-04T13:17:09.465Z",
                  "creationDate": "2017-05-04T13:17:09.465Z",
                  "visibleBy": [],
                  "visibility": "public",
                  "profiles": [
                    {
                      "subscriptionId": "58ede1170f0f528f85faa9bd",
                      "offerId": "58ede0fd48ea010fe51810b9",
                      "offerName": "Essential",
                      "profileId": "58ede0fd48ea010fe51810b8",
                      "profileName": "Essential",
                      "assignationDate": "2017-05-04T13:49:44.843Z",
                      "status": "active",
                      "isDefault": true
                    }
                  ],
                  "accountType": "free",
                  "adminType": "undefined",
                  "roles": [
                    "user"
                  ],
                  "isActive": true,
                  "phoneNumbers": [],
                  "emails": [
                    {
                      "email": "orgadmin1@acme.com",
                      "type": "work"
                    }
                  ],
                  "lastName": "Admin",
                  "firstName": "Organisation",
                  "id": "590b29d522315ea8d106fb3a"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "User with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "User 5912d2d756b8266139d0a14f (ter_1494406256897_user_test@test.com). Seen as terminated.",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/users/{userId}/invitations/{invitationId}/failed": {
      "post": {
        "tags": [
          "Users Invitations"
        ],
        "summary": "Tag as failed a user invitation",
        "description": "This API can be used to tag an invitation sent by another Rainbow user as 'failed'.   \nThis API can only be used by a superadmin   \nOnly invitations with the status 'pending' and the type 'registration' can be tagged.   \n  \nInviting user is notified with an XMPP message that the invitation has been failed.   \nThe XMPP message is the following: \n\n    \n```html\n<message type='management' id='122'\n        from='jid_from@openrainbow.com'\n        to='jid_to@openrainbow.com'\n        xmlns='jabber:client'>\n     <userinvite id='57cd5922d341df5812bbcb72' action=\"update\"\n     type='sent' status='failed' xmlns='jabber:iq:configuration'/>\n</message>\n```\n  \n  \nInviting user can know that some invitations are tagged as failed by API [GET /api/rainbow/enduser/v1.0/users/{userId}/invitations/sent(?status=pending|accepted|auto-accepted|declined|failed)][0]).\n\n[0]: /enduser/#api-invitations-enduser_users_GetSentInvites",
        "operationId": "admin_users_tag_failed",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56d0277a0261b53142a5cab5)",
            "required": true,
            "type": "string"
          },
          {
            "name": "invitationId",
            "in": "path",
            "description": "Group unique identifier (like 57b44e9c0c32e0b425252f9e)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_users_tag_failedSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "id": "57cd5922d341df5812bbcb72",
                  "invitedUserId": "573b46a305a4c22a19b216ce",
                  "invitedUserEmail": "bob@company.com",
                  "invitingUserId": "5703d4829ccf39843c7ef89b",
                  "invitingUserEmail": "alice@my-company.com",
                  "requestedNotificationLanguage": "fr",
                  "hiddenForInvitingUser": false,
                  "hiddenForInvitedUser": false,
                  "type": "registration",
                  "status": "failed",
                  "lastNotificationDate": "2017-01-02T15:25:39.586Z",
                  "invitingDate": "2017-01-02T15:25:39.586Z"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "examples": {
              "application/json": {
                "errorCode": 400,
                "errorMsg": "Bad Request",
                "errorDetails": [
                  {
                    "param": "userId",
                    "msg": "Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars",
                    "value": "1"
                  }
                ],
                "errorDetailsCode": 400000
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Inviting user 56c5cb38e8078d7512c43985 not found, not able to tag 'failed' invitation 569ce8c8f9336c471b98eda1",
                "errorDetailsCode": 404106
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorDetails": "User invitation 57cd5922d341df5812bbcb72 has a bad type (visibility), not able to tag it",
                "errorDetailsCode": 409609
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/users/{userId}/networks": {
      "post": {
        "tags": [
          "Users Networks"
        ],
        "summary": "Add users to user network",
        "description": "This API can be used to add users to requested user networks.   \n  \nBETA: this API is currently in beta. Restriction: only 1 user can be provided in users array (others are ignored)   \n  \n`superadmin` can set user network from any users existing in Rainbow.   \n`bp_admin` or `bp_finance` can only set user network for users being in companies being End Customers of their BP company (i.e. all the companies having bpId equal to their companyId) and their own BP company.   \n`organization_admin` can only set user network for users being in companies under their organisation.   \n`company_admin` can only set user network for users being in their company.",
        "operationId": "admin_users_PostUserNetworks",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56c5c19f94141765119f896c)",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/admin_users_PostUserNetworks"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_users_PostUserNetworksSuccess"
            },
            "examples": {
              "application/json": {
                "status": "success"
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/users/{userId}/profiles/subscriptions/{subscriptionId}": {
      "post": {
        "tags": [
          "Users Profiles"
        ],
        "summary": "Add a user profile",
        "description": "This API can be used to assign a company's subscription to user profiles (user must be in the same company than the company which own the subscription).   \n  \nBy default, when users are created or moved to a company, user's company's subscription to the default offer (Essential) is automatically added to user's profiles (therefore user's profiles should never be empty)   \n  \n`superadmin` can add a profile from any user existing in Rainbow.   \n`bp_admin` and `bp_finance` can add a profile to users being in End Customer companies linked to their BP company and to users being in their own BP company (or organisation).   \n`organization_admin` can only add a profile to users being in companies under their organisation.   \n`company_admin` can only add a profile to users being in their company.   \n  \nProvided subscriptionId must be one of the subscriptions available in user's company's subscriptions list (it can be the company's subscription to the default offer (Essential)).   \nThe subscription must have the status `active` and not being synchronizing with Business Store / Zuora (`syncOngoing` equal to false), otherwise 403 errors are returned.   \nSubscription with businessModel `flat_fee` can not be assigned to user profiles (they are fees at company level).   \nIf the subscription has a `maxNumberUsers` and the subscription is already assigned to this number of users, the assignation to the user is denied.   \nIf the provided subscriptionId is already assigned to user's profiles, a conflict error is returned.   \n  \nExample: POST https://openrainbow.com/api/rainbow/admin/v1.0/users/56d0277a0261b53142a5cab5/profiles/subscriptions/5808afeb4372eb19547e90cf",
        "operationId": "admin_users_PostUserProfiles",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/xml",
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56d0277a0261b53142a5cab5)",
            "required": true,
            "type": "string"
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "Company subscription unique identifier.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_users_PostUserProfilesSuccess"
            },
            "examples": {
              "application/json": {
                "data": {
                  "subscriptionId": "59396b2918f2e75c2bd3bb5b",
                  "offerId": "58ff3cdc5b9f3e48ad4fb906",
                  "offerName": "Conference",
                  "offerDescription": "Rainbow Conference offer",
                  "offerTechnicalDescription": "Conference offer for BP VAD",
                  "offerReference": "RB-Conference",
                  "profileId": "58ff3cdb5b9f3e48ad4fb903",
                  "profileName": "Conference",
                  "status": "active",
                  "isDefault": false,
                  "businessModel": "usage",
                  "isExclusive": false,
                  "assignationDate": "2016-10-24T14:11:50.800Z",
                  "provisioningNeeded": [
                    {
                      "providerType": "PGI",
                      "provisioningOngoing": true,
                      "provisioningStartDate": "2017-06-14T13:48:25.924Z"
                    }
                  ]
                }
              },
              "text/xml": "<message type=\"management\" id=\"2c11e9f1-3e59-4c7d-b1b7-1d38d31ab458_0\" to=\"ae55432b2d064d38be333204591daca9@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n <userprofile action=\"created\" subscriptionId=\"59396b2918f2e75c2bd3bb5b\" offerReference=\"RB-Conference\" xmlns=\"jabber:iq:configuration\"/>\n</message>"
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Subscription with id 5808afeb4372eb19547e90cf does not exist",
                "errorDetailsCode": 404000
              }
            }
          },
          "409": {
            "description": "Conflict",
            "examples": {
              "application/json": {
                "errorCode": 409,
                "errorMsg": "Conflict",
                "errorDetails": "'User 56d0277a0261b53142a5cab5 profile is already assigned to subscription 5808afeb4372eb19547e90cf",
                "errorDetailsCode": 409000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      },
      "delete": {
        "tags": [
          "Users Profiles"
        ],
        "summary": "Delete a user profile",
        "description": "This API can be used to un-assign a company's subscription from user profiles.   \n  \nProfile linked to company's default subscription can't be removed.   \n  \n`superadmin` can remove a profile from any user existing in Rainbow.   \n`bp_admin` and `bp_finance` can remove a profile for users being in End Customer companies linked to their BP company and from users being in their own BP company (or organisation).   \n`organization_admin` can only remove a profile for users being in companies under their organisation.   \n`company_admin` can only remove a profile for users being in their company.   \n  \nExample: DELETE https://openrainbow.com/api/rainbow/admin/v1.0/users/56d0277a0261b53142a5cab5/profiles/subscriptions/5808afeb4372eb19547e90cf",
        "operationId": "admin_users_DeleteUserProfiles",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/xml",
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56d0277a0261b53142a5cab5)",
            "required": true,
            "type": "string"
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "Company subscription unique identifier.",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_users_DeleteUserProfilesSuccess"
            },
            "examples": {
              "text/xml": "<message type=\"management\" id=\"2c11e9f1-3e59-4c7d-b1b7-1d38d31ab458_0\" to=\"ae55432b2d064d38be333204591daca9@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n <userprofile action=\"deleted\" subscriptionId=\"59396b2918f2e75c2bd3bb5b\" offerReference=\"RB-Conference\" xmlns=\"jabber:iq:configuration\"/>\n</message>",
              "application/json": {
                "data": [
                  {
                    "subscriptionId": "5808b655a55a36d354f75cbe",
                    "offerId": "58079ed2041fa586e92337cd",
                    "offerName": "Essential",
                    "offerReference": "RB-Essential",
                    "profileId": "580777f56fbd22a442d4fb57",
                    "profileName": "Essential",
                    "status": "active",
                    "isDefault": true,
                    "isExclusive": false,
                    "assignationDate": "2016-10-12T09:54:12.634Z"
                  },
                  {
                    "subscriptionId": "5808afeb4372eb19547e90cf",
                    "offerId": "58072f646237427a3687dc90",
                    "offerName": "Enterprise",
                    "offerDescription": "Rainbow Enterprise offer",
                    "offerTechnicalDescription": "Enterprise offer for BP VAD",
                    "offerReference": "RB-Enterprise",
                    "profileId": "57cd90ddc04fd92e232ae258",
                    "profileName": "Enterprise",
                    "status": "active",
                    "isDefault": false,
                    "businessModel": "nb_users",
                    "isExclusive": true,
                    "assignationDate": "2016-10-24T14:11:50.641Z"
                  },
                  {
                    "subscriptionId": "59396b2918f2e75c2bd3bb5b",
                    "offerId": "58ff3cdc5b9f3e48ad4fb906",
                    "offerName": "Conference",
                    "offerDescription": "Rainbow Conference offer",
                    "offerTechnicalDescription": "Conference offer for BP VAD",
                    "profileId": "58ff3cdb5b9f3e48ad4fb903",
                    "profileName": "Conference",
                    "status": "active",
                    "isDefault": false,
                    "businessModel": "usage",
                    "isExclusive": false,
                    "assignationDate": "2016-10-24T14:11:50.800Z",
                    "provisioningNeeded": [
                      {
                        "providerType": "PGI",
                        "provisioningOngoing": false,
                        "provisioningStartDate": "2017-06-14T13:48:25.924Z"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "Subscription with id 5808afeb4372eb19547e90cf does not exist",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    },
    "/api/rainbow/admin/v1.0/users/{userId}/profiles": {
      "get": {
        "tags": [
          "Users Profiles"
        ],
        "summary": "Get a user profiles",
        "description": "This API can be used to get a user's profiles.   \n  \n`superadmin` and `support` can get profiles from any existing user in Rainbow.   \n`bp_admin` and `bp_finance` can only retrieve profiles of users being in End Customer companies linked to their BP company.   \n`organization_admin` can only retrieve profiles of users being in companies under their organisation.   \n`company_admin` can only get profiles of users being in their company.   \n  \nExample: GET https://openrainbow.com/api/rainbow/admin/v1.0/users/56d0277a0261b53142a5cab5/profiles",
        "operationId": "admin_users_GetUserProfiles",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User unique identifier (like 56d0277a0261b53142a5cab5)",
            "required": true,
            "type": "string"
          },
          {
            "name": "accept",
            "in": "header",
            "description": "application/json",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/admin_users_GetUserProfilesSuccess"
            },
            "examples": {
              "application/json": {
                "data": [
                  {
                    "subscriptionId": "5808b655a55a36d354f75cbe",
                    "offerId": "58079ed2041fa586e92337cd",
                    "offerName": "Essential",
                    "offerReference": "RB-Essential",
                    "profileId": "580777f56fbd22a442d4fb57",
                    "profileName": "Essential",
                    "status": "active",
                    "isDefault": true,
                    "isExclusive": false,
                    "assignationDate": "2016-10-12T09:54:12.634Z"
                  },
                  {
                    "subscriptionId": "5808afeb4372eb19547e90cf",
                    "offerId": "58072f646237427a3687dc90",
                    "offerName": "Enterprise",
                    "offerDescription": "Rainbow Enterprise offer",
                    "offerTechnicalDescription": "Enterprise offer for BP VAD",
                    "offerReference": "RB-Enterprise",
                    "profileId": "57cd90ddc04fd92e232ae258",
                    "profileName": "Enterprise",
                    "status": "active",
                    "isDefault": false,
                    "businessModel": "nb_users",
                    "isExclusive": true,
                    "assignationDate": "2016-10-24T14:11:50.641Z"
                  },
                  {
                    "subscriptionId": "59396b2918f2e75c2bd3bb5b",
                    "offerId": "58ff3cdc5b9f3e48ad4fb906",
                    "offerName": "Conference",
                    "offerDescription": "Rainbow Conference offer",
                    "offerTechnicalDescription": "Conference offer for BP VAD",
                    "profileId": "58ff3cdb5b9f3e48ad4fb903",
                    "profileName": "Conference",
                    "status": "active",
                    "isDefault": false,
                    "businessModel": "usage",
                    "isExclusive": false,
                    "assignationDate": "2016-10-24T14:11:50.800Z",
                    "provisioningNeeded": [
                      {
                        "providerType": "PGI",
                        "provisioningOngoing": false,
                        "provisioningStartDate": "2017-06-14T13:48:25.924Z"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized",
            "examples": {
              "application/json": {
                "errorCode": 401,
                "errorMsg": "Unauthorized",
                "errorDetails": {
                  "errorMsg": "User user1@company.com has expired (timeToLive)",
                  "timeToLive": 3600,
                  "creationDate": "2017-09-05T13:12:51.302Z",
                  "expirationDate": "2017-09-05T14:12:51.302Z",
                  "currentDate": "2017-09-05T14:48:23.694Z"
                },
                "errorDetailsCode": 401523
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "examples": {
              "application/json": {
                "errorCode": 403,
                "errorMsg": "Forbidden",
                "errorDetails": "Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)",
                "errorDetailsCode": 403100
              }
            }
          },
          "404": {
            "description": "Not found",
            "examples": {
              "application/json": {
                "errorCode": 404,
                "errorMsg": "Resource Not Found",
                "errorDetails": "User with id 569ce8c8f9336c471b98eda1 does not exist.",
                "errorDetailsCode": 404000
              }
            }
          },
          "500": {
            "description": "Server error",
            "examples": {
              "application/json": {
                "errorCode": 500,
                "errorMsg": "Internal Server Error",
                "errorDetails": ""
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-permissions": [
          {
            "name": "superadmin"
          },
          {
            "name": "support"
          },
          {
            "name": "bp_admin"
          },
          {
            "name": "bp_finance"
          },
          {
            "name": "organization_admin"
          },
          {
            "name": "company_admin"
          },
          {
            "name": "public"
          }
        ]
      }
    }
  },
  "definitions": {
    "admin_bots_GetBotIdSuccess": {
      "required": [
        "id",
        "name",
        "jid",
        "createdByUserId",
        "createdByLoginEmail"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Bot service unique identifier.",
          "type": "string"
        },
        "name": {
          "description": "Bot title, like 'Emily'.",
          "type": "string"
        },
        "jid": {
          "description": "Bot service jid id, should be 'emily.rb.com'. A domain name.",
          "type": "string"
        },
        "createdByUserId": {
          "description": "Unique identifier of the bot service owner.",
          "type": "string"
        },
        "createdByLoginEmail": {
          "description": "Login of the bot service owner.",
          "type": "string"
        }
      }
    },
    "admin_bots_deleteBotsSuccess": {
      "required": [
        "Status"
      ],
      "type": "object",
      "properties": {
        "Status": {
          "description": "Deletion status",
          "type": "string"
        }
      }
    },
    "admin_bots_putBots": {
      "required": [
        "name",
        "jid"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Bot title",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "jid": {
          "description": "Domain name of the bot service.   \nFormat is checked by the regexp - (?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\\.)+[a-z]{2,63}$)",
          "type": "string"
        }
      }
    },
    "admin_bots_putBotsSuccess": {
      "required": [
        "id",
        "name",
        "jid",
        "createdByUserId",
        "createdByLoginEmail"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Bot service unique identifier.",
          "type": "string"
        },
        "name": {
          "description": "Bot title, like 'Emily'.",
          "type": "string"
        },
        "jid": {
          "description": "Bot service jid id, should be 'emily.rb.com'. A domain name.",
          "type": "string"
        },
        "createdByUserId": {
          "description": "Unique identifier of the bot service owner.",
          "type": "string"
        },
        "createdByLoginEmail": {
          "description": "Login of the bot service owner.",
          "type": "string"
        }
      }
    },
    "admin_bots_GetBotsSuccess": {
      "required": [
        "id",
        "name",
        "jid",
        "createdByUserId",
        "createdByLoginEmail"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Bot service unique identifier.",
          "type": "string"
        },
        "name": {
          "description": "Bot title, like 'Emily'.",
          "type": "string"
        },
        "jid": {
          "description": "Bot service jid id, should be 'emily.rb.com'. A domain name.",
          "type": "string"
        },
        "createdByUserId": {
          "description": "Unique identifier of the bot service owner.",
          "type": "string"
        },
        "createdByLoginEmail": {
          "description": "Login of the bot service owner.",
          "type": "string"
        }
      }
    },
    "admin_bots_postBots": {
      "required": [
        "name",
        "jid"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Bot title",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "jid": {
          "description": "Domain name of the bot service.   \nFormat is checked by the regexp - (?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\\.)+[a-z]{2,63}$)",
          "type": "string"
        }
      }
    },
    "admin_bots_postBotsSuccess": {
      "required": [
        "id",
        "name",
        "jid",
        "createdByUserId",
        "createdByLoginEmail"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Bot service unique identifier.",
          "type": "string"
        },
        "name": {
          "description": "Bot title, like 'Emily'.",
          "type": "string"
        },
        "jid": {
          "description": "Bot service jid id, should be 'emily.rb.com'. A domain name.",
          "type": "string"
        },
        "createdByUserId": {
          "description": "Unique identifier of the bot service owner.",
          "type": "string"
        },
        "createdByLoginEmail": {
          "description": "Login of the bot service owner.",
          "type": "string"
        }
      }
    },
    "DeleteClientsVersionsSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetClientsVersionsIdSuccess": {
      "required": [
        "name",
        "id",
        "version"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "App name",
          "type": "string"
        },
        "id": {
          "description": "App unique identifier",
          "type": "string"
        },
        "version": {
          "description": "App minimal version",
          "type": "string"
        }
      }
    },
    "PutClientsVersions": {
      "type": "object",
      "properties": {
        "version": {
          "description": "App version",
          "type": "string"
        }
      }
    },
    "PutClientsVersionsSuccess": {
      "required": [
        "name",
        "id",
        "version"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "App name",
          "type": "string"
        },
        "id": {
          "description": "App unique identifier",
          "type": "string"
        },
        "version": {
          "description": "App minimal version",
          "type": "string"
        }
      }
    },
    "GetClientsversionsSuccess": {
      "required": [
        "name",
        "id",
        "version"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "App name",
          "type": "string"
        },
        "id": {
          "description": "App unique identifier",
          "type": "string"
        },
        "version": {
          "description": "App minimal version",
          "type": "string"
        }
      }
    },
    "PostClientsVersions": {
      "required": [
        "name",
        "version"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "app name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "version": {
          "description": "App version",
          "type": "string"
        }
      }
    },
    "PostClientsVersionsSuccess": {
      "required": [
        "name",
        "id",
        "version"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "App name",
          "type": "string"
        },
        "id": {
          "description": "App unique identifier",
          "type": "string"
        },
        "version": {
          "description": "App minimal version",
          "type": "string"
        }
      }
    },
    "DeleteMetricsSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "In JSON format, status of the metrics deletion",
          "type": "string"
        }
      }
    },
    "GetMetricsSuccess": {
      "required": [
        "metrics"
      ],
      "type": "object",
      "properties": {
        "metrics": {
          "description": "In JSON format, all the metrics available",
          "type": "string"
        }
      }
    },
    "GetApiRainbowAdminV10AboutSuccess": {
      "required": [
        "version",
        "description"
      ],
      "type": "object",
      "properties": {
        "version": {
          "description": "Version of admin portal server",
          "type": "string"
        },
        "description": {
          "description": "Description of admin portal server",
          "type": "string"
        }
      }
    },
    "GetApiRainbowPcgV10AboutSuccess": {
      "required": [
        "version",
        "description"
      ],
      "type": "object",
      "properties": {
        "version": {
          "description": "Version of admin portal server",
          "type": "string"
        },
        "description": {
          "description": "Description of admin portal server",
          "type": "string"
        }
      }
    },
    "GetApiRainbowPingSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "State of admin portal server   \n`OK` if server status is good",
          "type": "string"
        }
      }
    },
    "PutApiRainbowLogsLevels": {
      "type": "object",
      "properties": {
        "console": {
          "description": "Level to set for **console** transport",
          "enum": [
            "debug",
            "info",
            "warn",
            "error"
          ],
          "type": "string"
        },
        "file": {
          "description": "Level to set for **file** transport",
          "enum": [
            "debug",
            "info",
            "warn",
            "error"
          ],
          "type": "string"
        },
        "syslog": {
          "description": "Level to set for **syslog** transport",
          "enum": [
            "debug",
            "info",
            "warning",
            "error"
          ],
          "type": "string"
        }
      }
    },
    "PutApiRainbowLogsLevelsSuccess": {
      "required": [
        "oldLoggerLevels",
        "newLoggerLevels"
      ],
      "type": "object",
      "properties": {
        "oldLoggerLevels": {
          "type": "object",
          "properties": {
            "console": {
              "description": "Previous log level of **console** transport (if enabled in portal's configuration)",
              "type": "string"
            },
            "file": {
              "description": "Previous log level of **file** transport (if enabled in portal's configuration)",
              "type": "string"
            },
            "syslog": {
              "description": "Previous log level of **syslog** transport (if enabled in portal's configuration)",
              "type": "string"
            }
          }
        },
        "newLoggerLevels": {
          "type": "object",
          "properties": {
            "console": {
              "description": "New log level of **console** transport (if enabled in portal's configuration)",
              "type": "string"
            },
            "file": {
              "description": "New log level of **file** transport (if enabled in portal's configuration)",
              "type": "string"
            },
            "syslog": {
              "description": "New log level of **syslog** transport (if enabled in portal's configuration)",
              "type": "string"
            }
          }
        }
      }
    },
    "DeleteCompaniesSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetCompaniesIdSuccess": {
      "required": [
        "numberUsers",
        "dataLocation",
        "id",
        "creationDate",
        "statusUpdatedDate",
        "lastAvatarUpdateDate",
        "name",
        "status",
        "visibility",
        "visibleBy",
        "userSelfRegisterEnabled",
        "userSelfRegisterAllowedDomains",
        "size",
        "organisationId",
        "catalogId",
        "bpId",
        "isBP",
        "offerType"
      ],
      "type": "object",
      "properties": {
        "numberUsers": {
          "description": "Number of Rainbow users being associated to the company",
          "type": "number"
        },
        "dataLocation": {
          "required": [
            "name",
            "location",
            "country"
          ],
          "type": "object",
          "properties": {
            "name": {
              "description": "Name of the zone where the company data are stored",
              "type": "string"
            },
            "location": {
              "description": "Location of the zone where the company data are stored. Should usually be the country name (English) where the zone is located.",
              "type": "string"
            },
            "country": {
              "description": "Country (ISO 3166-1 alpha3 format) of the zone where the company data are stored",
              "type": "string"
            }
          }
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last company status update (Read only)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last company avatar update (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "country": {
          "description": "Company country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "street": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "city": {
          "description": "Company city",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state should be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "postalCode": {
          "description": "Company postal code",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "currency": {
          "description": "Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "enum": [
            "initializing",
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company)",
          "enum": [
            "public",
            "private",
            "organisation"
          ],
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private, list of companyIds for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminEmail": {
          "description": "Company contact person email",
          "type": "string"
        },
        "supportEmail": {
          "description": "Company support email",
          "type": "string"
        },
        "companyContactId": {
          "description": "User Id of a Rainbow user which is the contact for this company",
          "type": "string"
        },
        "userSelfRegisterEnabled": {
          "description": "Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process",
          "type": "boolean"
        },
        "userSelfRegisterAllowedDomains": {
          "description": "Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slogan": {
          "description": "A free string corresponding to the slogan of the company (255 char length)",
          "type": "string"
        },
        "description": {
          "description": "A free string that describes the company (2000 char length)",
          "type": "string"
        },
        "size": {
          "description": " An overview of the number of employees",
          "enum": [
            "self-employed",
            "1-10 employees",
            "11-50 employees",
            "51-200 employees",
            "201-500 employees",
            "501-1000 employees",
            "1001-5000 employees",
            "5001-10,000 employees",
            "10,001+ employees"
          ],
          "type": "string"
        },
        "economicActivityClassification": {
          "description": "* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n",
          "enum": [
            "NONE",
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U"
          ],
          "type": "string"
        },
        "giphyEnabled": {
          "description": "Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)",
          "type": "boolean"
        },
        "website": {
          "description": "Company website URL",
          "type": "string"
        },
        "organisationId": {
          "description": "Optional identifier to indicate the company belongs to an organisation",
          "type": "string"
        },
        "catalogId": {
          "description": "Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe.",
          "type": "string"
        },
        "bpId": {
          "description": "Optional identifier which links the company to the corresponding Business partner company",
          "type": "string"
        },
        "adminHasRightToUpdateSubscriptions": {
          "description": "In the case the company is linked to a Business Partner company, indicates if the `bp_admin` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.",
          "type": "boolean"
        },
        "adminAllowedUpdateSubscriptionsOps": {
          "description": "In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_admin` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n",
          "enum": [
            "all",
            "increase_only"
          ],
          "type": "string"
        },
        "isBP": {
          "description": "Indicates if the company is a Business partner company",
          "default": "false",
          "type": "boolean"
        },
        "bpType": {
          "description": "Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n",
          "enum": [
            "IR",
            "VAD",
            "DR"
          ],
          "type": "string"
        },
        "bpBusinessModel": {
          "description": "Indicates BP business model",
          "type": "string"
        },
        "bpApplicantNumber": {
          "description": "Reference of the Business Partner in ALE Finance tools (SAP)",
          "type": "string"
        },
        "bpCRDid": {
          "description": "Reference of the Business Partner in CDR",
          "type": "string"
        },
        "bpHasRightToSell": {
          "description": "Indicates if the Business has the right to sell",
          "type": "boolean"
        },
        "bpHasRightToConnect": {
          "description": "When True, the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI",
          "type": "boolean"
        },
        "bpIsContractAccepted": {
          "description": "Indicates if the Business has accepted the contract and can sell Rainbow offers",
          "type": "boolean"
        },
        "bpContractAcceptationInfo": {
          "required": [
            "acceptationDate",
            "bpAdminId",
            "bpAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "acceptationDate": {
              "format": "date-time",
              "description": "Date of contract acceptation by the BP admin",
              "type": "string"
            },
            "bpAdminId": {
              "description": "User Id of the BP admin who accepted the contract",
              "type": "string"
            },
            "bpAdminLoginEmail": {
              "description": "User loginEmail of the BP admin who accepted the contract",
              "type": "string"
            }
          }
        },
        "offerType": {
          "description": "Allowed company offer types",
          "enum": [
            "freemium",
            "premium"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "When the customer has subscribed to specific business offers, this field is set to the associated specific business (ex: HDS for HealthCare business specific)",
          "enum": [
            "HDS"
          ],
          "type": "string"
        },
        "externalReference": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "externalReference2": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "avatarShape": {
          "description": "Company's avatar customization",
          "enum": [
            "square",
            "circle"
          ],
          "type": "string"
        },
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.",
              "type": "string"
            }
          }
        }
      }
    },
    "PutCompanies": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Company status.   \nIf company status is `initializing`, only `superadmin` can change the status value.",
          "enum": [
            "initializing",
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "catalogId": {
          "description": "Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe.   \n  \nOnly `superadmin` can change the catalogId of a company.   \nIf the catalogId of a BP company is changed, the new catalogId of the BP is also set on the companies for which this BP company is the BP (when the company is a BP VAD, the catalog of the EC companies under the BP IR companies is also updated).",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "country": {
          "description": "Company country (ISO 3166-1 alpha3 format)",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "street": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "city": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state must be defined. Else it is not managed.   \nUSA states code list: `AA`:\"Armed Forces America\",\n`AE`:\"Armed Forces\",\n`AP`:\"Armed Forces Pacific\",\n`AK`:\"Alaska\",\n`AL`:\"Alabama\",\n`AR`:\"Arkansas\",\n`AZ`:\"Arizona\",\n`CA`:\"California\",\n`CO`:\"Colorado\",\n`CT`:\"Connecticut\",\n`DC`:\"Washington DC\",\n`DE`:\"Delaware\",\n`FL`:\"Florida\",\n`GA`:\"Georgia\",\n`GU`:\"Guam\",\n`HI`:\"Hawaii\",\n`IA`:\"Iowa\",\n`ID`:\"Idaho\",\n`IL`:\"Illinois\",\n`IN`:\"Indiana\",\n`KS`:\"Kansas\",\n`KY`:\"Kentucky\",\n`LA`:\"Louisiana\",\n`MA`:\"Massachusetts\",\n`MD`:\"Maryland\",\n`ME`:\"Maine\",\n`MI`:\"Michigan\",\n`MN`:\"Minnesota\",\n`MO`:\"Missouri\",\n`MS`:\"Mississippi\",\n`MT`:\"Montana\",\n`NC`:\"North Carolina\",\n`ND`:\"North Dakota\",\n`NE`:\"Nebraska\",\n`NH`:\"New Hampshire\",\n`NJ`:\"New Jersey\",\n`NM`:\"New Mexico\",\n`NV`:\"Nevada\",\n`NY`:\"New York\",\n`OH`:\"Ohio\",\n`OK`:\"Oklahoma\",\n`OR`:\"Oregon\",\n`PA`:\"Pennsylvania\",\n`PR`:\"Puerto Rico\",\n`RI`:\"Rhode Island\",\n`SC`:\"South Carolina\",\n`SD`:\"South Dakota\",\n`TN`:\"Tennessee\",\n`TX`:\"Texas\",\n`UT`:\"Utah\",\n`VA`:\"Virginia\",\n`VI`:\"Virgin Islands\",\n`VT`:\"Vermont\",\n`WA`:\"Washington\",\n`WI`:\"Wisconsin\",\n`WV`:\"West Virginia\",\n`WY`:\"Wyoming\"   \nCanada states code list:\n`AB`: \"Alberta\",\n`BC`: \"British Columbia\",\n`MB`: \"Manitoba\",\n`NB`: \"New Brunswick\",\n`NL`: \"Newfoundland and Labrador\",\n`NS`: \"Nova Scotia\",\n`NT`: \"Northwest Territories\",\n`NU`: \"Nunavut\",\n`ON`: \"Ontario\",\n`PE`: \"Prince Edward Island\",\n`QC`: \"Quebec\",\n`SK`: \"Saskatchewan\",\n`YT`: \"Yukon\"\n",
          "enum": [
            "null",
            "AA",
            "AE",
            "AP",
            "AK",
            "AL",
            "AR",
            "AZ",
            "CA",
            "CO",
            "CT",
            "DC",
            "DE",
            "FL",
            "GA",
            "GU",
            "HI",
            "IA",
            "ID",
            "IL",
            "IN",
            "KS",
            "KY",
            "LA",
            "MA",
            "MD",
            "ME",
            "MI",
            "MN",
            "MO",
            "MS",
            "MT",
            "NC",
            "ND",
            "NE",
            "NH",
            "NJ",
            "NM",
            "NV",
            "NY",
            "OH",
            "OK",
            "OR",
            "PA",
            "PR",
            "RI",
            "SC",
            "SD",
            "TN",
            "TX",
            "UT",
            "VA",
            "VI",
            "VT",
            "WA",
            "WI",
            "WV",
            "WY",
            "AB",
            "BC",
            "MB",
            "NB",
            "NL",
            "NS",
            "NT",
            "NU",
            "ON",
            "PE",
            "QC",
            "SK",
            "YT"
          ],
          "type": "string"
        },
        "postalCode": {
          "description": "Company postal code",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "currency": {
          "description": "Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported   \nOnly settable by `superadmin`",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company).  \nUnder the same organisation, a company can choose the visibility=organisation. That means users belonging to this company are visible for users of foreign companies having the same visibility inside the same organisation.  \nThe visibility=organisation is same as visibility=private outside the organisation. That is to say users can't be searched.",
          "default": "private",
          "enum": [
            "public",
            "private",
            "organisation"
          ],
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private or organisation, list of company `ids` for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminEmail": {
          "description": "Company contact person email",
          "maxLength": 255,
          "minLength": 3,
          "pattern": "/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/",
          "type": "string"
        },
        "supportEmail": {
          "description": "Company support email",
          "maxLength": 255,
          "minLength": 3,
          "pattern": "/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/",
          "type": "string"
        },
        "companyContactId": {
          "description": "User Id of a Rainbow user which is the contact for this company",
          "type": "string"
        },
        "userSelfRegisterEnabled": {
          "description": "Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process",
          "enum": [
            "true"
          ],
          "type": "boolean"
        },
        "userSelfRegisterAllowedDomains": {
          "description": "Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slogan": {
          "description": "A free string corresponding to the slogan of the company",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "description": {
          "description": "A free string that describes the company (2000 char length)",
          "maxLength": 2000,
          "minLength": 0,
          "type": "string"
        },
        "size": {
          "description": " An overview of the number of employees",
          "default": "self-employed",
          "enum": [
            "self-employed",
            "1-10 employees",
            "11-50 employees",
            "51-200 employees",
            "201-500 employees",
            "501-1000 employees",
            "1001-5000 employees",
            "5001-10,000 employees",
            "10,001+ employees"
          ],
          "type": "string"
        },
        "economicActivityClassification": {
          "description": "* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n",
          "enum": [
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U"
          ],
          "type": "string"
        },
        "website": {
          "description": "Company website url",
          "maxLength": 2000,
          "minLength": 0,
          "type": "string"
        },
        "giphyEnabled": {
          "description": "Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)",
          "type": "boolean"
        },
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.   \ncustomData can only be created/updated by: \n\n* `superadmin` (all companies),\n* `bp_admin` and `bp_finance` for the companies he manages (except his own BP company),\n* `organization_admin` for the companies he manages.\n\nRestrictions on customData Object: \n\n* max 10 keys,\n* max key length: 64 characters,\n* max value length: 512 characters.\n\n",
              "type": "string"
            }
          }
        },
        "bpId": {
          "description": "Link the company to the corresponding Business partner company.   \n`bpId` must correspond to a valid company having `isBP` equal to true.   \nOnly directly settable by `superadmin`.   \nIf the company is **created** by a `bp_admin` or a `bp_finance`, `bpId` is automatically set to BP company `id`.   \nFor existing companies, `bp_admin` must use invitation mechanism to a company admin in order to request a link of this company company to his BP company.",
          "type": "string"
        },
        "adminHasRightToUpdateSubscriptions": {
          "description": "In the case the company is linked to a Business Partner company, indicates if the `bp_finance` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_finance` of the related company.",
          "type": "boolean"
        },
        "adminAllowedUpdateSubscriptionsOps": {
          "description": "In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_finance` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n",
          "enum": [
            "all",
            "increase_only"
          ],
          "type": "string"
        },
        "isBP": {
          "description": "Indicates if the company is a Business partner company   \nOnly settable by `superadmin`",
          "type": "boolean"
        },
        "bpType": {
          "description": "Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n  \nOnly applicable if `isBP` is true.   \nOnly settable by `superadmin`.",
          "enum": [
            "IR",
            "VAD",
            "DR"
          ],
          "type": "string"
        },
        "bpBusinessModel": {
          "description": "Indicates BP business model   \nOnly applicable if `isBP` is true.   \nOnly settable by `superadmin`.",
          "enum": [
            "referral",
            "resell"
          ],
          "type": "string"
        },
        "bpApplicantNumber": {
          "description": "Reference of the Business Partner in ALE Finance tools (SAP)   \nOnly applicable if `isBP` is true and `bpType` is DR or VAD.   \nOnly settable by `superadmin`.",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "bpCRDid": {
          "description": "Reference of the Business Partner in CDR   \nOnly applicable if `isBP` is true and `bpType` is DR or VAD.   \nIf `bpCRDid` is not defined, BP won't be able to sell (i.e. `bpHasRightToSell` can't be set to true)   \nOnly settable by `superadmin`.",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "bpHasRightToSell": {
          "description": "Indicates if the Business has the right to sell   \nOnly applicable if `isBP` is true and `bpType` is DR or VAD.   \nOnly applicable if `bpCRDid` is defined.   \nOnly settable by `superadmin`.",
          "type": "boolean"
        },
        "bpHasRightToConnect": {
          "description": "When True [Default], the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI   \nOnly applicable if `isBP` is true.   \nOnly settable by `superadmin`.",
          "type": "boolean"
        },
        "bpIsContractAccepted": {
          "description": "Indicates if the Business has accepted the contract and can sell Rainbow offers   \nShould be set by `bp_admin` or `bp_finance`.   \nOnly applicable if `isBP` is true.",
          "default": "false",
          "type": "boolean"
        },
        "externalReference": {
          "description": "Free field that BP can use to link their Indirect Resellers / End Customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin` or `bp_finance` on one of his Indirect Resellers / End Customers companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "externalReference2": {
          "description": "Free field that BP can use to link their Indirect Resellers / End Customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin` or `bp_finance` on one of his Indirect Resellers / End Customers companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "avatarShape": {
          "description": "Company's avatar customization",
          "enum": [
            "square",
            "circle"
          ],
          "type": "string"
        },
        "isCentrex": {
          "description": "Indicates if the company is one tenant of a multi-tenant call server (OXE - OTEC-S) (default: false)",
          "type": "boolean"
        },
        "companyCallNumber": {
          "description": "If isCentrex = true, this is the company access number [multi-company call + company Area, ex: 8 210, 8 211]",
          "type": "string"
        }
      }
    },
    "PutCompaniesSuccess": {
      "required": [
        "id",
        "creationDate",
        "statusUpdatedDate",
        "lastAvatarUpdateDate",
        "name",
        "status",
        "visibility",
        "visibleBy",
        "userSelfRegisterEnabled",
        "userSelfRegisterAllowedDomains",
        "size",
        "organisationId",
        "catalogId",
        "bpId",
        "isBP"
      ],
      "type": "object",
      "properties": {
        "offerType": {
          "description": "Company offer type.   \nCompanies with offerType=`freemium` are not able to subscribe to paid offers, they must be `premium` to do so.   \nOnly `superadmin` can set offerType from `premium` to `freemium`.",
          "enum": [
            "freemium",
            "premium"
          ],
          "type": "string"
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last company status update (Read only)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last company avatar update (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "country": {
          "description": "Company country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "street": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "city": {
          "description": "Company city",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state should be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "postalCode": {
          "description": "Company postal code",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "currency": {
          "description": "Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "enum": [
            "initializing",
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company)",
          "enum": [
            "public",
            "private",
            "organisation"
          ],
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private, list of companyIds for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminEmail": {
          "description": "Company contact person email",
          "type": "string"
        },
        "supportEmail": {
          "description": "Company support email",
          "type": "string"
        },
        "companyContactId": {
          "description": "User Id of a Rainbow user which is the contact for this company",
          "type": "string"
        },
        "userSelfRegisterEnabled": {
          "description": "Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process",
          "type": "boolean"
        },
        "userSelfRegisterAllowedDomains": {
          "description": "Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slogan": {
          "description": "A free string corresponding to the slogan of the company (255 char length)",
          "type": "string"
        },
        "description": {
          "description": "A free string that describes the company (2000 char length)",
          "type": "string"
        },
        "size": {
          "description": " An overview of the number of employees",
          "enum": [
            "self-employed",
            "1-10 employees",
            "11-50 employees",
            "51-200 employees",
            "201-500 employees",
            "501-1000 employees",
            "1001-5000 employees",
            "5001-10,000 employees",
            "10,001+ employees"
          ],
          "type": "string"
        },
        "economicActivityClassification": {
          "description": "* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n",
          "enum": [
            "NONE",
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U"
          ],
          "type": "string"
        },
        "giphyEnabled": {
          "description": "Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)",
          "type": "boolean"
        },
        "website": {
          "description": "Company website URL",
          "type": "string"
        },
        "organisationId": {
          "description": "Optional identifier to indicate the company belongs to an organisation",
          "type": "string"
        },
        "catalogId": {
          "description": "Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe.",
          "type": "string"
        },
        "bpId": {
          "description": "Optional identifier which links the company to the corresponding Business partner company",
          "type": "string"
        },
        "adminHasRightToUpdateSubscriptions": {
          "description": "In the case the company is linked to a Business Partner company, indicates if the `bp_admin` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.",
          "type": "boolean"
        },
        "adminAllowedUpdateSubscriptionsOps": {
          "description": "In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_admin` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n",
          "enum": [
            "all",
            "increase_only"
          ],
          "type": "string"
        },
        "isBP": {
          "description": "Indicates if the company is a Business partner company",
          "default": "false",
          "type": "boolean"
        },
        "bpType": {
          "description": "Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n",
          "enum": [
            "IR",
            "VAD",
            "DR"
          ],
          "type": "string"
        },
        "bpBusinessModel": {
          "description": "Indicates BP business model",
          "type": "string"
        },
        "bpApplicantNumber": {
          "description": "Reference of the Business Partner in ALE Finance tools (SAP)",
          "type": "string"
        },
        "bpCRDid": {
          "description": "Reference of the Business Partner in CDR",
          "type": "string"
        },
        "bpHasRightToSell": {
          "description": "Indicates if the Business has the right to sell",
          "type": "boolean"
        },
        "bpHasRightToConnect": {
          "description": "When True, the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI",
          "type": "boolean"
        },
        "bpIsContractAccepted": {
          "description": "Indicates if the Business has accepted the contract and can sell Rainbow offers",
          "type": "boolean"
        },
        "bpContractAcceptationInfo": {
          "required": [
            "acceptationDate",
            "bpAdminId",
            "bpAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "acceptationDate": {
              "format": "date-time",
              "description": "Date of contract acceptation by the BP admin",
              "type": "string"
            },
            "bpAdminId": {
              "description": "User Id of the BP admin who accepted the contract",
              "type": "string"
            },
            "bpAdminLoginEmail": {
              "description": "User loginEmail of the BP admin who accepted the contract",
              "type": "string"
            }
          }
        },
        "businessSpecific": {
          "description": "When the customer has subscribed to specific business offers, this field is set to the associated specific business (ex: HDS for HealthCare business specific)",
          "enum": [
            "HDS"
          ],
          "type": "string"
        },
        "externalReference": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "externalReference2": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "avatarShape": {
          "description": "Company's avatar customization",
          "enum": [
            "square",
            "circle"
          ],
          "type": "string"
        },
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.",
              "type": "string"
            }
          }
        }
      }
    },
    "GetCompaniesSuccess": {
      "required": [
        "name",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        }
      }
    },
    "PostCompanies": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Company status.   \nCompanies created by a `bp_admin` or a `bp_finance` are created with the status `initializing` (if status is provided, it is ignored).   \nOtherwise, if status is not provided, default value is `active`.",
          "enum": [
            "initializing",
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "privateDC": {
          "description": "Tag allowing to specify if the company and related data will be created on a given private data center   \nSupported values are the keys being in privateDCs section of zones.json file.   \nHDS (HealthCare) privateDC is charged. When creating a company with \"privateDC\": \"HDS\", a subscription to the \"HDS Company\" offer is automatically done. This require that the created company is linked to a BP company which has `bpHasRightToSell` equal to true and a valid `bpApplicantNumber`.   \nOnly settable by `superadmin`, `bp_admin` or `bp_finance`.",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "country": {
          "description": "Company country (ISO 3166-1 alpha3 format)",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "street": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "city": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state must be defined. Else it is not managed.   \nUSA states code list: `AA`:\"Armed Forces America\",\n`AE`:\"Armed Forces\",\n`AP`:\"Armed Forces Pacific\",\n`AK`:\"Alaska\",\n`AL`:\"Alabama\",\n`AR`:\"Arkansas\",\n`AZ`:\"Arizona\",\n`CA`:\"California\",\n`CO`:\"Colorado\",\n`CT`:\"Connecticut\",\n`DC`:\"Washington DC\",\n`DE`:\"Delaware\",\n`FL`:\"Florida\",\n`GA`:\"Georgia\",\n`GU`:\"Guam\",\n`HI`:\"Hawaii\",\n`IA`:\"Iowa\",\n`ID`:\"Idaho\",\n`IL`:\"Illinois\",\n`IN`:\"Indiana\",\n`KS`:\"Kansas\",\n`KY`:\"Kentucky\",\n`LA`:\"Louisiana\",\n`MA`:\"Massachusetts\",\n`MD`:\"Maryland\",\n`ME`:\"Maine\",\n`MI`:\"Michigan\",\n`MN`:\"Minnesota\",\n`MO`:\"Missouri\",\n`MS`:\"Mississippi\",\n`MT`:\"Montana\",\n`NC`:\"North Carolina\",\n`ND`:\"North Dakota\",\n`NE`:\"Nebraska\",\n`NH`:\"New Hampshire\",\n`NJ`:\"New Jersey\",\n`NM`:\"New Mexico\",\n`NV`:\"Nevada\",\n`NY`:\"New York\",\n`OH`:\"Ohio\",\n`OK`:\"Oklahoma\",\n`OR`:\"Oregon\",\n`PA`:\"Pennsylvania\",\n`PR`:\"Puerto Rico\",\n`RI`:\"Rhode Island\",\n`SC`:\"South Carolina\",\n`SD`:\"South Dakota\",\n`TN`:\"Tennessee\",\n`TX`:\"Texas\",\n`UT`:\"Utah\",\n`VA`:\"Virginia\",\n`VI`:\"Virgin Islands\",\n`VT`:\"Vermont\",\n`WA`:\"Washington\",\n`WI`:\"Wisconsin\",\n`WV`:\"West Virginia\",\n`WY`:\"Wyoming\"   \nCanada states code list:\n`AB`: \"Alberta\",\n`BC`: \"British Columbia\",\n`MB`: \"Manitoba\",\n`NB`: \"New Brunswick\",\n`NL`: \"Newfoundland and Labrador\",\n`NS`: \"Nova Scotia\",\n`NT`: \"Northwest Territories\",\n`NU`: \"Nunavut\",\n`ON`: \"Ontario\",\n`PE`: \"Prince Edward Island\",\n`QC`: \"Quebec\",\n`SK`: \"Saskatchewan\",\n`YT`: \"Yukon\"\n",
          "enum": [
            "null",
            "AA",
            "AE",
            "AP",
            "AK",
            "AL",
            "AR",
            "AZ",
            "CA",
            "CO",
            "CT",
            "DC",
            "DE",
            "FL",
            "GA",
            "GU",
            "HI",
            "IA",
            "ID",
            "IL",
            "IN",
            "KS",
            "KY",
            "LA",
            "MA",
            "MD",
            "ME",
            "MI",
            "MN",
            "MO",
            "MS",
            "MT",
            "NC",
            "ND",
            "NE",
            "NH",
            "NJ",
            "NM",
            "NV",
            "NY",
            "OH",
            "OK",
            "OR",
            "PA",
            "PR",
            "RI",
            "SC",
            "SD",
            "TN",
            "TX",
            "UT",
            "VA",
            "VI",
            "VT",
            "WA",
            "WI",
            "WV",
            "WY",
            "AB",
            "BC",
            "MB",
            "NB",
            "NL",
            "NS",
            "NT",
            "NU",
            "ON",
            "PE",
            "QC",
            "SK",
            "YT"
          ],
          "type": "string"
        },
        "postalCode": {
          "description": "Company postal code",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "currency": {
          "description": "Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported   \nOnly settable by `superadmin`",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company).  \nUnder the same organisation, a company can choose the visibility=organisation. That means users belonging to this company are visible for users of foreign companies having the same visibility inside the same organisation.  \nThe visibility=organisation is same as visibility=private outside the organisation. That is to say users can't be searched.",
          "default": "private",
          "enum": [
            "public",
            "private",
            "organisation"
          ],
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private or organisation, list of company `ids` for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminEmail": {
          "description": "Company contact person email",
          "maxLength": 255,
          "minLength": 3,
          "pattern": "/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/",
          "type": "string"
        },
        "supportEmail": {
          "description": "Company support email",
          "maxLength": 255,
          "minLength": 3,
          "pattern": "/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/",
          "type": "string"
        },
        "companyContactId": {
          "description": "User Id of a Rainbow user which is the contact for this company",
          "type": "string"
        },
        "userSelfRegisterEnabled": {
          "description": "Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process",
          "enum": [
            "true"
          ],
          "type": "boolean"
        },
        "userSelfRegisterAllowedDomains": {
          "description": "Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slogan": {
          "description": "A free string corresponding to the slogan of the company",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "description": {
          "description": "A free string that describes the company (2000 char length)",
          "maxLength": 2000,
          "minLength": 0,
          "type": "string"
        },
        "size": {
          "description": " An overview of the number of employees",
          "default": "self-employed",
          "enum": [
            "self-employed",
            "1-10 employees",
            "11-50 employees",
            "51-200 employees",
            "201-500 employees",
            "501-1000 employees",
            "1001-5000 employees",
            "5001-10,000 employees",
            "10,001+ employees"
          ],
          "type": "string"
        },
        "economicActivityClassification": {
          "description": "* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n",
          "enum": [
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U"
          ],
          "type": "string"
        },
        "website": {
          "description": "Company website url",
          "maxLength": 2000,
          "minLength": 0,
          "type": "string"
        },
        "giphyEnabled": {
          "description": "Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)",
          "type": "boolean"
        },
        "catalogId": {
          "description": "Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe.   \nWhen a new company is created, if no catalogId is specified the company is automatically linked to the default catalog.   \nWhen a `bp_admin>` or `bp_finance>` creates a company, catalogId of this new company is automatically set to BP company's catalogId.   \nWhen an `organization_admin>` creates a company, catalogId of this new company is automatically set to organization_admin's company's catalogId.   \n  \nOnly `superadmin` can set a different catalogId to a company.",
          "type": "string"
        },
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.   \ncustomData can only be created/updated by: \n\n* `superadmin` (all companies),\n* `bp_admin` and `bp_finance` for the companies he manages (except his own BP company),\n* `organization_admin` for the companies he manages.\n\nRestrictions on customData Object: \n\n* max 10 keys,\n* max key length: 64 characters,\n* max value length: 512 characters.\n\n",
              "type": "string"
            }
          }
        },
        "bpId": {
          "description": "Link the company to the corresponding Business partner company.   \n`bpId` must correspond to a valid company having `isBP` equal to true.   \nOnly directly settable by `superadmin`.   \nIf the company is **created** by a `bp_admin` or a `bp_finance`, `bpId` is automatically set to BP company `id`.   \nFor existing companies, `bp_admin` must use invitation mechanism to a company admin in order to request a link of this company company to his BP company.",
          "type": "string"
        },
        "adminHasRightToUpdateSubscriptions": {
          "description": "In the case the company is linked to a Business Partner company, indicates if the `bp_finance` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_finance` of the related company.",
          "type": "boolean"
        },
        "adminAllowedUpdateSubscriptionsOps": {
          "description": "In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_finance` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n",
          "enum": [
            "all",
            "increase_only"
          ],
          "type": "string"
        },
        "isBP": {
          "description": "Indicates if the company is a Business partner company   \nOnly settable by `superadmin`",
          "type": "boolean"
        },
        "bpType": {
          "description": "Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n  \nOnly applicable if `isBP` is true.   \nOnly settable by `superadmin`.",
          "enum": [
            "IR",
            "VAD",
            "DR"
          ],
          "type": "string"
        },
        "bpBusinessModel": {
          "description": "Indicates BP business model   \nOnly applicable if `isBP` is true.   \nOnly settable by `superadmin`.",
          "enum": [
            "referral",
            "resell"
          ],
          "type": "string"
        },
        "bpApplicantNumber": {
          "description": "Reference of the Business Partner in ALE Finance tools (SAP)   \nOnly applicable if `isBP` is true and `bpType` is DR or VAD.   \nOnly settable by `superadmin`.",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "bpCRDid": {
          "description": "Reference of the Business Partner in CDR   \nOnly applicable if `isBP` is true and `bpType` is DR or VAD.   \nIf `bpCRDid` is not defined, BP won't be able to sell (i.e. `bpHasRightToSell` can't be set to true)   \nOnly settable by `superadmin`.",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "bpHasRightToSell": {
          "description": "Indicates if the Business has the right to sell   \nOnly applicable if `isBP` is true and `bpType` is DR or VAD.   \nOnly applicable if `bpCRDid` is defined.   \nOnly settable by `superadmin`.",
          "type": "boolean"
        },
        "bpHasRightToConnect": {
          "description": "When True [Default], the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI   \nOnly applicable if `isBP` is true.   \nOnly settable by `superadmin`.",
          "type": "boolean"
        },
        "bpIsContractAccepted": {
          "description": "Indicates if the Business has accepted the contract and can sell Rainbow offers   \nShould be set by `bp_admin` or `bp_finance`.   \nOnly applicable if `isBP` is true.",
          "default": "false",
          "type": "boolean"
        },
        "externalReference": {
          "description": "Free field that BP can use to link their Indirect Resellers / End Customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin` or `bp_finance` on one of his Indirect Resellers / End Customers companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "externalReference2": {
          "description": "Free field that BP can use to link their Indirect Resellers / End Customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin` or `bp_finance` on one of his Indirect Resellers / End Customers companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "avatarShape": {
          "description": "Company's avatar customization",
          "enum": [
            "square",
            "circle"
          ],
          "type": "string"
        },
        "isCentrex": {
          "description": "Indicates if the company is one tenant of a multi-tenant call server (OXE - OTEC-S) (default: false)",
          "type": "boolean"
        },
        "companyCallNumber": {
          "description": "If isCentrex = true, this is the company access number [multi-company call + company Area, ex: 8 210, 8 211]",
          "type": "string"
        }
      }
    },
    "PostCompaniesSuccess": {
      "required": [
        "id",
        "creationDate",
        "statusUpdatedDate",
        "lastAvatarUpdateDate",
        "name",
        "status",
        "visibility",
        "visibleBy",
        "userSelfRegisterEnabled",
        "userSelfRegisterAllowedDomains",
        "size",
        "organisationId",
        "catalogId",
        "bpId",
        "isBP"
      ],
      "type": "object",
      "properties": {
        "offerType": {
          "description": "Company offer type.   \nCompanies with offerType=`freemium` are not able to subscribe to paid offers, they must be `premium` to do so.   \nCompanies created with privateDC=\"HDS\" are automatically created with offerType=`premium` (as a paid subscription to HDS Company offer is automatically done during the company creation.",
          "default": "freemium",
          "enum": [
            "freemium",
            "premium"
          ],
          "type": "string"
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last company status update (Read only)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last company avatar update (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "country": {
          "description": "Company country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "street": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "city": {
          "description": "Company city",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state should be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "postalCode": {
          "description": "Company postal code",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "currency": {
          "description": "Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "enum": [
            "initializing",
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company)",
          "enum": [
            "public",
            "private",
            "organisation"
          ],
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private, list of companyIds for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminEmail": {
          "description": "Company contact person email",
          "type": "string"
        },
        "supportEmail": {
          "description": "Company support email",
          "type": "string"
        },
        "companyContactId": {
          "description": "User Id of a Rainbow user which is the contact for this company",
          "type": "string"
        },
        "userSelfRegisterEnabled": {
          "description": "Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process",
          "type": "boolean"
        },
        "userSelfRegisterAllowedDomains": {
          "description": "Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slogan": {
          "description": "A free string corresponding to the slogan of the company (255 char length)",
          "type": "string"
        },
        "description": {
          "description": "A free string that describes the company (2000 char length)",
          "type": "string"
        },
        "size": {
          "description": " An overview of the number of employees",
          "enum": [
            "self-employed",
            "1-10 employees",
            "11-50 employees",
            "51-200 employees",
            "201-500 employees",
            "501-1000 employees",
            "1001-5000 employees",
            "5001-10,000 employees",
            "10,001+ employees"
          ],
          "type": "string"
        },
        "economicActivityClassification": {
          "description": "* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n",
          "enum": [
            "NONE",
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U"
          ],
          "type": "string"
        },
        "giphyEnabled": {
          "description": "Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)",
          "type": "boolean"
        },
        "website": {
          "description": "Company website URL",
          "type": "string"
        },
        "organisationId": {
          "description": "Optional identifier to indicate the company belongs to an organisation",
          "type": "string"
        },
        "catalogId": {
          "description": "Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe.",
          "type": "string"
        },
        "bpId": {
          "description": "Optional identifier which links the company to the corresponding Business partner company",
          "type": "string"
        },
        "adminHasRightToUpdateSubscriptions": {
          "description": "In the case the company is linked to a Business Partner company, indicates if the `bp_admin` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.",
          "type": "boolean"
        },
        "adminAllowedUpdateSubscriptionsOps": {
          "description": "In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_admin` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n",
          "enum": [
            "all",
            "increase_only"
          ],
          "type": "string"
        },
        "isBP": {
          "description": "Indicates if the company is a Business partner company",
          "default": "false",
          "type": "boolean"
        },
        "bpType": {
          "description": "Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n",
          "enum": [
            "IR",
            "VAD",
            "DR"
          ],
          "type": "string"
        },
        "bpBusinessModel": {
          "description": "Indicates BP business model",
          "type": "string"
        },
        "bpApplicantNumber": {
          "description": "Reference of the Business Partner in ALE Finance tools (SAP)",
          "type": "string"
        },
        "bpCRDid": {
          "description": "Reference of the Business Partner in CDR",
          "type": "string"
        },
        "bpHasRightToSell": {
          "description": "Indicates if the Business has the right to sell",
          "type": "boolean"
        },
        "bpHasRightToConnect": {
          "description": "When True, the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI",
          "type": "boolean"
        },
        "bpIsContractAccepted": {
          "description": "Indicates if the Business has accepted the contract and can sell Rainbow offers",
          "type": "boolean"
        },
        "bpContractAcceptationInfo": {
          "required": [
            "acceptationDate",
            "bpAdminId",
            "bpAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "acceptationDate": {
              "format": "date-time",
              "description": "Date of contract acceptation by the BP admin",
              "type": "string"
            },
            "bpAdminId": {
              "description": "User Id of the BP admin who accepted the contract",
              "type": "string"
            },
            "bpAdminLoginEmail": {
              "description": "User loginEmail of the BP admin who accepted the contract",
              "type": "string"
            }
          }
        },
        "businessSpecific": {
          "description": "When the customer has subscribed to specific business offers, this field is set to the associated specific business (ex: HDS for HealthCare business specific)",
          "enum": [
            "HDS"
          ],
          "type": "string"
        },
        "externalReference": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "externalReference2": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "avatarShape": {
          "description": "Company's avatar customization",
          "enum": [
            "square",
            "circle"
          ],
          "type": "string"
        },
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.",
              "type": "string"
            }
          }
        }
      }
    },
    "GetCompaniesAdministratorsSuccess": {
      "required": [
        "id",
        "loginEmail",
        "firstName",
        "lastName",
        "displayName",
        "nickName",
        "title",
        "jobTitle",
        "emails",
        "phoneNumbers",
        "country",
        "language",
        "timezone",
        "jid_im",
        "jid_tel",
        "jid_password",
        "roles",
        "adminType",
        "companyId",
        "organisationId",
        "siteId",
        "companyName",
        "isActive",
        "isInitialized",
        "initializationDate",
        "activationDate",
        "creationDate",
        "lastUpdateDate",
        "lastAvatarUpdateDate",
        "createdBySelfRegister",
        "createdByAdmin",
        "invitedBy",
        "firstLoginDate",
        "lastLoginDate",
        "loggedSince",
        "isTerminated",
        "guestMode",
        "timeToLive",
        "authenticationType"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "User unique identifier",
          "type": "string"
        },
        "loginEmail": {
          "description": "User email address (used for login)",
          "type": "string"
        },
        "firstName": {
          "description": "User first name",
          "type": "string"
        },
        "lastName": {
          "description": "User last name",
          "type": "string"
        },
        "displayName": {
          "description": "User display name (firstName + lastName concatenated on server side)",
          "type": "string"
        },
        "nickName": {
          "description": "User nickName",
          "type": "string"
        },
        "title": {
          "description": "User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)",
          "type": "string"
        },
        "jobTitle": {
          "description": "User job title",
          "type": "string"
        },
        "emails": {
          "description": "Array of user emails addresses objects",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetCompaniesAdministratorsSuccess_emails"
          }
        },
        "phoneNumbers": {
          "description": "Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetCompaniesAdministratorsSuccess_phoneNumbers"
          }
        },
        "country": {
          "description": "User country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "language": {
          "description": "User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)",
          "type": "string"
        },
        "timezone": {
          "description": "User timezone name",
          "type": "string"
        },
        "jid_im": {
          "description": "User Jabber IM identifier",
          "type": "string"
        },
        "jid_tel": {
          "description": "User Jabber TEL identifier",
          "type": "string"
        },
        "jid_password": {
          "description": "User Jabber IM and TEL password",
          "type": "string"
        },
        "roles": {
          "description": "List of user roles (Array of String)   \nNote: `company_support` role is only used for support redirection. If a user writes a #support ticket and have the role `company_support`, the ticket will be sent to ALE's support (otherwise the ticket is sent to user's company's `supportEmail` address is set, ALE otherwise).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminType": {
          "description": "In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)",
          "type": "string"
        },
        "companyId": {
          "description": "User company unique identifier",
          "type": "string"
        },
        "organisationId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to an organization",
          "type": "string"
        },
        "siteId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to a site",
          "type": "string"
        },
        "companyName": {
          "description": "User company name",
          "type": "string"
        },
        "isActive": {
          "description": "Is user active",
          "type": "boolean"
        },
        "isInitialized": {
          "description": "Is user initialized",
          "type": "boolean"
        },
        "initializationDate": {
          "format": "date-time",
          "description": "User initialization date",
          "type": "string"
        },
        "activationDate": {
          "format": "date-time",
          "description": "User activation date",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "User creation date",
          "type": "string"
        },
        "lastUpdateDate": {
          "format": "date-time",
          "description": "Date of last user update (whatever the field updated)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last user avatar create/update, null if no avatar",
          "type": "string"
        },
        "createdBySelfRegister": {
          "description": "true if user has been created using self register",
          "type": "boolean"
        },
        "createdByAdmin": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "invitedBy": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "firstLoginDate": {
          "format": "date-time",
          "description": "Date of first user login (only set the first time user logs in, null if user never logged in)",
          "type": "string"
        },
        "lastLoginDate": {
          "format": "date-time",
          "description": "Date of last user login (defined even if user is logged out)",
          "type": "string"
        },
        "loggedSince": {
          "format": "date-time",
          "description": "Date of last user login (null if user is logged out)",
          "type": "string"
        },
        "isTerminated": {
          "description": "Indicates if the Rainbow account of this user has been deleted",
          "type": "boolean"
        },
        "guestMode": {
          "description": "Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration.",
          "type": "boolean"
        },
        "timeToLive": {
          "description": "Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire).",
          "type": "number"
        },
        "authenticationType": {
          "description": "User authentication type (if not set company default authentication will be used)",
          "type": "string"
        }
      }
    },
    "GetCompaniesAdministratorsSuccess_emails": {
      "required": [
        "email",
        "type"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "User email address",
          "type": "string"
        },
        "type": {
          "description": "Email type, one of `home`, `work`, `other`",
          "type": "string"
        }
      }
    },
    "GetCompaniesAdministratorsSuccess_phoneNumbers": {
      "required": [
        "phoneNumberId",
        "number",
        "numberE164",
        "country",
        "isFromSystem",
        "shortNumber",
        "internalNumber",
        "systemId",
        "pbxId",
        "type",
        "deviceType"
      ],
      "type": "object",
      "properties": {
        "phoneNumberId": {
          "description": "Phone number unique id in directory collection.",
          "type": "string"
        },
        "number": {
          "description": "User phone number (as entered by user)",
          "type": "string"
        },
        "numberE164": {
          "description": "User E.164 phone number, computed by server from number and country fields",
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field.",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if phone is linked to a system (pbx).",
          "type": "boolean"
        },
        "shortNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field.",
          "type": "string"
        },
        "internalNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field.",
          "type": "string"
        },
        "systemId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database.",
          "type": "string"
        },
        "pbxId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx.",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`.",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`.",
          "type": "string"
        }
      }
    },
    "GetCompaniesServiceDescriptionSuccess": {
      "required": [
        "Content-Type",
        "Content-disposition",
        "pdf"
      ],
      "type": "object",
      "properties": {
        "Content-Type": {
          "description": "pdf content-type.",
          "enum": [
            "application/pdf"
          ],
          "type": "string"
        },
        "Content-disposition": {
          "description": "attachment; filename=RainbowServiceDescription-59de6b18d4dfb727e6750954.pdf",
          "type": "string"
        },
        "pdf": {
          "format": "binary",
          "description": "Service description pdf file",
          "type": "string"
        }
      }
    },
    "SetCompanyCustomisationSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Update operation status message.",
          "type": "string"
        }
      }
    },
    "SetCompanyFeatureCustomisationSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Update operation status message.",
          "type": "string"
        }
      }
    },
    "GetDefaultCompanySuccess": {
      "required": [
        "id",
        "creationDate",
        "statusUpdatedDate",
        "lastAvatarUpdateDate",
        "name",
        "status",
        "visibility",
        "visibleBy",
        "userSelfRegisterEnabled",
        "userSelfRegisterAllowedDomains",
        "size",
        "organisationId",
        "catalogId",
        "bpId",
        "isBP",
        "offerType"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last company status update (Read only)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last company avatar update (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "country": {
          "description": "Company country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "street": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "city": {
          "description": "Company city",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state should be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "postalCode": {
          "description": "Company postal code",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "currency": {
          "description": "Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "enum": [
            "initializing",
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company)",
          "enum": [
            "public",
            "private",
            "organisation"
          ],
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private, list of companyIds for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminEmail": {
          "description": "Company contact person email",
          "type": "string"
        },
        "supportEmail": {
          "description": "Company support email",
          "type": "string"
        },
        "companyContactId": {
          "description": "User Id of a Rainbow user which is the contact for this company",
          "type": "string"
        },
        "userSelfRegisterEnabled": {
          "description": "Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process",
          "type": "boolean"
        },
        "userSelfRegisterAllowedDomains": {
          "description": "Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slogan": {
          "description": "A free string corresponding to the slogan of the company (255 char length)",
          "type": "string"
        },
        "description": {
          "description": "A free string that describes the company (2000 char length)",
          "type": "string"
        },
        "size": {
          "description": " An overview of the number of employees",
          "enum": [
            "self-employed",
            "1-10 employees",
            "11-50 employees",
            "51-200 employees",
            "201-500 employees",
            "501-1000 employees",
            "1001-5000 employees",
            "5001-10,000 employees",
            "10,001+ employees"
          ],
          "type": "string"
        },
        "economicActivityClassification": {
          "description": "* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n",
          "enum": [
            "NONE",
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U"
          ],
          "type": "string"
        },
        "giphyEnabled": {
          "description": "Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)",
          "type": "boolean"
        },
        "website": {
          "description": "Company website URL",
          "type": "string"
        },
        "organisationId": {
          "description": "Optional identifier to indicate the company belongs to an organisation",
          "type": "string"
        },
        "catalogId": {
          "description": "Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe.",
          "type": "string"
        },
        "bpId": {
          "description": "Optional identifier which links the company to the corresponding Business partner company",
          "type": "string"
        },
        "adminHasRightToUpdateSubscriptions": {
          "description": "In the case the company is linked to a Business Partner company, indicates if the `bp_admin` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.",
          "type": "boolean"
        },
        "adminAllowedUpdateSubscriptionsOps": {
          "description": "In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_admin` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n",
          "enum": [
            "all",
            "increase_only"
          ],
          "type": "string"
        },
        "isBP": {
          "description": "Indicates if the company is a Business partner company",
          "default": "false",
          "type": "boolean"
        },
        "bpType": {
          "description": "Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n",
          "enum": [
            "IR",
            "VAD",
            "DR"
          ],
          "type": "string"
        },
        "bpBusinessModel": {
          "description": "Indicates BP business model",
          "type": "string"
        },
        "bpApplicantNumber": {
          "description": "Reference of the Business Partner in ALE Finance tools (SAP)",
          "type": "string"
        },
        "bpCRDid": {
          "description": "Reference of the Business Partner in CDR",
          "type": "string"
        },
        "bpHasRightToSell": {
          "description": "Indicates if the Business has the right to sell",
          "type": "boolean"
        },
        "bpHasRightToConnect": {
          "description": "When True, the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI",
          "type": "boolean"
        },
        "bpIsContractAccepted": {
          "description": "Indicates if the Business has accepted the contract and can sell Rainbow offers",
          "type": "boolean"
        },
        "bpContractAcceptationInfo": {
          "required": [
            "acceptationDate",
            "bpAdminId",
            "bpAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "acceptationDate": {
              "format": "date-time",
              "description": "Date of contract acceptation by the BP admin",
              "type": "string"
            },
            "bpAdminId": {
              "description": "User Id of the BP admin who accepted the contract",
              "type": "string"
            },
            "bpAdminLoginEmail": {
              "description": "User loginEmail of the BP admin who accepted the contract",
              "type": "string"
            }
          }
        },
        "offerType": {
          "description": "Allowed company offer types",
          "enum": [
            "freemium",
            "premium"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "When the customer has subscribed to specific business offers, this field is set to the associated specific business (ex: HDS for HealthCare business specific)",
          "enum": [
            "HDS"
          ],
          "type": "string"
        },
        "externalReference": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "externalReference2": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "avatarShape": {
          "description": "Company's avatar customization",
          "enum": [
            "square",
            "circle"
          ],
          "type": "string"
        },
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.",
              "type": "string"
            }
          }
        }
      }
    },
    "PutCompanySSOSettings": {
      "type": "object",
      "properties": {
        "loginUrl": {
          "description": "Identity provider URL to perform a login (SAML)",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "logoutUrl": {
          "description": "Identity provider URL to perform a logout (SAML)",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "certificates": {
          "description": "List of strings containing Identity provider certificates in a PEM format (SAML)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "uidAttribute": {
          "description": "Attribute name provided by the identity provider to identify a user (SAML)",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "enabled": {
          "description": "Enable or disable the use of these single-sign-on settings",
          "type": "boolean"
        }
      }
    },
    "GetCompanySSOSettingsSuccess": {
      "required": [
        "data"
      ],
      "type": "object",
      "properties": {
        "data": {
          "description": "",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetCompanySSOSettingsSuccess_data"
          }
        }
      }
    },
    "GetCompanySSOSettingsSuccess_data": {
      "required": [
        "type",
        "loginUrl",
        "logoutUrl",
        "certificates",
        "uidAttribute",
        "enabled"
      ],
      "type": "object",
      "properties": {
        "type": {
          "description": "Authentication server type",
          "type": "string"
        },
        "loginUrl": {
          "description": "Identity provider URL to perform a login (SAML)",
          "type": "string"
        },
        "logoutUrl": {
          "description": "Identity provider URL to perform a logout (SAML)",
          "type": "string"
        },
        "certificates": {
          "description": "List of strings containing Identity provider certificates in a PEM format (SAML)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "uidAttribute": {
          "description": "Attribute name provided by the identity provider to identify a user (SAML)",
          "type": "string"
        },
        "enabled": {
          "description": "Enable or disable the use of these single-sign-on settings",
          "type": "boolean"
        }
      }
    },
    "PostCompanySSOSettings": {
      "required": [
        "type",
        "loginUrl"
      ],
      "type": "object",
      "properties": {
        "type": {
          "description": "Authentication server type",
          "enum": [
            "SAML"
          ],
          "type": "string"
        },
        "loginUrl": {
          "description": "Identity provider URL to perform a login (SAML)",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "logoutUrl": {
          "description": "Identity provider URL to perform a logout (SAML)",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "certificates": {
          "description": "List of strings containing Identity provider certificates in a PEM format (SAML)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "uidAttribute": {
          "description": "Attribute name provided by the identity provider to identify a user (SAML)",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "enabled": {
          "description": "Enable or disable the use of these single-sign-on settings",
          "default": "true",
          "type": "boolean"
        }
      }
    },
    "admin_companies_deleteAvatarSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Avatar delete status message.",
          "type": "string"
        }
      }
    },
    "admin_companies_postAvatar": {
      "required": [
        "Content"
      ],
      "type": "object",
      "properties": {
        "Content": {
          "format": "binary",
          "description": "File to be sent",
          "type": "string"
        }
      }
    },
    "admin_companies_postAvatarSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Avatar upload status message.",
          "type": "string"
        }
      }
    },
    "admin_companies_getAvatarSuccess": {
      "required": [
        "Content-Type",
        "Dims-cached",
        "Last-Modified",
        "Date",
        "Content"
      ],
      "type": "object",
      "properties": {
        "Content-Type": {
          "description": "Avatar content-type.",
          "enum": [
            "image/jpeg",
            "image/png"
          ],
          "type": "string"
        },
        "Dims-cached": {
          "description": "Whether or not the resize avatar file has been cached by nginx.",
          "type": "string"
        },
        "Last-Modified": {
          "format": "date-time",
          "description": "Last avatar update date.",
          "type": "string"
        },
        "Date": {
          "format": "date-time",
          "description": "Request date.",
          "type": "string"
        },
        "Content": {
          "format": "binary",
          "description": "File to be received",
          "type": "string"
        }
      }
    },
    "admin_companies_deleteBannerSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Banner delete status message.",
          "type": "string"
        }
      }
    },
    "admin_companies_postBanner": {
      "required": [
        "Content"
      ],
      "type": "object",
      "properties": {
        "Content": {
          "format": "binary",
          "description": "File to be sent",
          "type": "string"
        }
      }
    },
    "admin_companies_postBannerSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Avatar upload status message.",
          "type": "string"
        }
      }
    },
    "admin_companies_getBannerSuccess": {
      "required": [
        "Content-Type",
        "Dims-cached",
        "Last-Modified",
        "Date",
        "Content"
      ],
      "type": "object",
      "properties": {
        "Content-Type": {
          "description": "Avatar content-type.",
          "enum": [
            "image/jpeg",
            "image/png"
          ],
          "type": "string"
        },
        "Dims-cached": {
          "description": "Whether or not the resize avatar file has been cached by nginx.",
          "type": "string"
        },
        "Last-Modified": {
          "format": "date-time",
          "description": "Last avatar update date.",
          "type": "string"
        },
        "Date": {
          "format": "date-time",
          "description": "Request date.",
          "type": "string"
        },
        "Content": {
          "format": "binary",
          "description": "File to be received",
          "type": "string"
        }
      }
    },
    "PutCompaniesCustomData": {
      "required": [
        "data"
      ],
      "type": "object",
      "properties": {
        "data": {
          "description": "",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutCompaniesCustomData_data"
          }
        }
      }
    },
    "PutCompaniesCustomData_data": {
      "required": [
        "key1",
        "key2"
      ],
      "type": "object",
      "properties": {
        "key1": {
          "description": "Company's custom data key1.",
          "type": "string"
        },
        "key2": {
          "description": "Company's custom data key2.",
          "type": "string"
        }
      }
    },
    "PutCompaniesCustomDataSuccess": {
      "required": [
        "customData"
      ],
      "type": "object",
      "properties": {
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.",
              "type": "string"
            }
          }
        }
      }
    },
    "DeleteCompanyIceServersSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "PutCompanyIceServers": {
      "required": [
        "urls"
      ],
      "type": "object",
      "properties": {
        "urls": {
          "description": "ICE server url",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminUrl": {
          "description": "Admin URL for COTURN management",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminLogin": {
          "description": "Admin login for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminPassword": {
          "description": "Admin password for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "dc": {
          "description": "Data Center identifier where the iceServer is hosted",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "PutCompanyIceServersSuccess": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "GetCompanyIceServers": {
      "type": "object",
      "properties": {
        "adminUrl": {
          "description": "Admin URL for COTURN management",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminLogin": {
          "description": "Admin login for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminPassword": {
          "description": "Admin password for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "dc": {
          "description": "Data Center identifier where the iceServer is hosted",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "GetCompanyIceServersSuccess": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "PostCompanyIceServers": {
      "required": [
        "urls"
      ],
      "type": "object",
      "properties": {
        "urls": {
          "description": "ICE server url",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminUrl": {
          "description": "Admin URL for COTURN management",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminLogin": {
          "description": "Admin login for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminPassword": {
          "description": "Admin password for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "dc": {
          "description": "Data Center identifier where the iceServer is hosted",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "PostCompanyIceServersSuccess": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "GetCompanyConferenceSettingsSuccess": {
      "required": [
        "confDialOutDisabled"
      ],
      "type": "object",
      "properties": {
        "confDialOutDisabled": {
          "description": "indicates if conferences can be joined using dialout method",
          "type": "boolean"
        }
      }
    },
    "PutCompanyConferenceSettings": {
      "required": [
        "confDialOutDisabled"
      ],
      "type": "object",
      "properties": {
        "confDialOutDisabled": {
          "description": "indicates if conferences can be joined using dialout method",
          "type": "boolean"
        }
      }
    },
    "PutCompanyConferenceSettingsSuccess": {
      "required": [
        "confDialOutDisabled"
      ],
      "type": "object",
      "properties": {
        "confDialOutDisabled": {
          "description": "indicates if conferences can be joined using dialout method",
          "type": "boolean"
        }
      }
    },
    "GetCompanySitesSuccess": {
      "required": [
        "name",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        }
      }
    },
    "DeleteCompaniesVisibilitySuccess": {
      "required": [
        "id",
        "creationDate",
        "statusUpdatedDate",
        "lastAvatarUpdateDate",
        "name",
        "status",
        "visibility",
        "visibleBy",
        "userSelfRegisterEnabled",
        "userSelfRegisterAllowedDomains",
        "size",
        "organisationId",
        "catalogId",
        "bpId",
        "isBP",
        "offerType"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last company status update (Read only)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last company avatar update (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "country": {
          "description": "Company country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "street": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "city": {
          "description": "Company city",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state should be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "postalCode": {
          "description": "Company postal code",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "currency": {
          "description": "Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "enum": [
            "initializing",
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company)",
          "enum": [
            "public",
            "private",
            "organisation"
          ],
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private, list of companyIds for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminEmail": {
          "description": "Company contact person email",
          "type": "string"
        },
        "supportEmail": {
          "description": "Company support email",
          "type": "string"
        },
        "companyContactId": {
          "description": "User Id of a Rainbow user which is the contact for this company",
          "type": "string"
        },
        "userSelfRegisterEnabled": {
          "description": "Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process",
          "type": "boolean"
        },
        "userSelfRegisterAllowedDomains": {
          "description": "Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slogan": {
          "description": "A free string corresponding to the slogan of the company (255 char length)",
          "type": "string"
        },
        "description": {
          "description": "A free string that describes the company (2000 char length)",
          "type": "string"
        },
        "size": {
          "description": " An overview of the number of employees",
          "enum": [
            "self-employed",
            "1-10 employees",
            "11-50 employees",
            "51-200 employees",
            "201-500 employees",
            "501-1000 employees",
            "1001-5000 employees",
            "5001-10,000 employees",
            "10,001+ employees"
          ],
          "type": "string"
        },
        "economicActivityClassification": {
          "description": "* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n",
          "enum": [
            "NONE",
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U"
          ],
          "type": "string"
        },
        "giphyEnabled": {
          "description": "Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)",
          "type": "boolean"
        },
        "website": {
          "description": "Company website URL",
          "type": "string"
        },
        "organisationId": {
          "description": "Optional identifier to indicate the company belongs to an organisation",
          "type": "string"
        },
        "catalogId": {
          "description": "Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe.",
          "type": "string"
        },
        "bpId": {
          "description": "Optional identifier which links the company to the corresponding Business partner company",
          "type": "string"
        },
        "adminHasRightToUpdateSubscriptions": {
          "description": "In the case the company is linked to a Business Partner company, indicates if the `bp_admin` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.",
          "type": "boolean"
        },
        "adminAllowedUpdateSubscriptionsOps": {
          "description": "In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_admin` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n",
          "enum": [
            "all",
            "increase_only"
          ],
          "type": "string"
        },
        "isBP": {
          "description": "Indicates if the company is a Business partner company",
          "default": "false",
          "type": "boolean"
        },
        "bpType": {
          "description": "Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n",
          "enum": [
            "IR",
            "VAD",
            "DR"
          ],
          "type": "string"
        },
        "bpBusinessModel": {
          "description": "Indicates BP business model",
          "type": "string"
        },
        "bpApplicantNumber": {
          "description": "Reference of the Business Partner in ALE Finance tools (SAP)",
          "type": "string"
        },
        "bpCRDid": {
          "description": "Reference of the Business Partner in CDR",
          "type": "string"
        },
        "bpHasRightToSell": {
          "description": "Indicates if the Business has the right to sell",
          "type": "boolean"
        },
        "bpHasRightToConnect": {
          "description": "When True, the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI",
          "type": "boolean"
        },
        "bpIsContractAccepted": {
          "description": "Indicates if the Business has accepted the contract and can sell Rainbow offers",
          "type": "boolean"
        },
        "bpContractAcceptationInfo": {
          "required": [
            "acceptationDate",
            "bpAdminId",
            "bpAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "acceptationDate": {
              "format": "date-time",
              "description": "Date of contract acceptation by the BP admin",
              "type": "string"
            },
            "bpAdminId": {
              "description": "User Id of the BP admin who accepted the contract",
              "type": "string"
            },
            "bpAdminLoginEmail": {
              "description": "User loginEmail of the BP admin who accepted the contract",
              "type": "string"
            }
          }
        },
        "offerType": {
          "description": "Allowed company offer types",
          "enum": [
            "freemium",
            "premium"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "When the customer has subscribed to specific business offers, this field is set to the associated specific business (ex: HDS for HealthCare business specific)",
          "enum": [
            "HDS"
          ],
          "type": "string"
        },
        "externalReference": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "externalReference2": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "avatarShape": {
          "description": "Company's avatar customization",
          "enum": [
            "square",
            "circle"
          ],
          "type": "string"
        },
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.",
              "type": "string"
            }
          }
        }
      }
    },
    "PostCompaniesVisibilitySuccess": {
      "required": [
        "id",
        "creationDate",
        "statusUpdatedDate",
        "lastAvatarUpdateDate",
        "name",
        "status",
        "visibility",
        "visibleBy",
        "userSelfRegisterEnabled",
        "userSelfRegisterAllowedDomains",
        "size",
        "organisationId",
        "catalogId",
        "bpId",
        "isBP",
        "offerType"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last company status update (Read only)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last company avatar update (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "country": {
          "description": "Company country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "street": {
          "description": "Company street",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "city": {
          "description": "Company city",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state should be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "postalCode": {
          "description": "Company postal code",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "currency": {
          "description": "Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "enum": [
            "initializing",
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company)",
          "enum": [
            "public",
            "private",
            "organisation"
          ],
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private, list of companyIds for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminEmail": {
          "description": "Company contact person email",
          "type": "string"
        },
        "supportEmail": {
          "description": "Company support email",
          "type": "string"
        },
        "companyContactId": {
          "description": "User Id of a Rainbow user which is the contact for this company",
          "type": "string"
        },
        "userSelfRegisterEnabled": {
          "description": "Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process",
          "type": "boolean"
        },
        "userSelfRegisterAllowedDomains": {
          "description": "Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slogan": {
          "description": "A free string corresponding to the slogan of the company (255 char length)",
          "type": "string"
        },
        "description": {
          "description": "A free string that describes the company (2000 char length)",
          "type": "string"
        },
        "size": {
          "description": " An overview of the number of employees",
          "enum": [
            "self-employed",
            "1-10 employees",
            "11-50 employees",
            "51-200 employees",
            "201-500 employees",
            "501-1000 employees",
            "1001-5000 employees",
            "5001-10,000 employees",
            "10,001+ employees"
          ],
          "type": "string"
        },
        "economicActivityClassification": {
          "description": "* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n",
          "enum": [
            "NONE",
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U"
          ],
          "type": "string"
        },
        "giphyEnabled": {
          "description": "Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)",
          "type": "boolean"
        },
        "website": {
          "description": "Company website URL",
          "type": "string"
        },
        "organisationId": {
          "description": "Optional identifier to indicate the company belongs to an organisation",
          "type": "string"
        },
        "catalogId": {
          "description": "Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe.",
          "type": "string"
        },
        "bpId": {
          "description": "Optional identifier which links the company to the corresponding Business partner company",
          "type": "string"
        },
        "adminHasRightToUpdateSubscriptions": {
          "description": "In the case the company is linked to a Business Partner company, indicates if the `bp_admin` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.",
          "type": "boolean"
        },
        "adminAllowedUpdateSubscriptionsOps": {
          "description": "In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_admin` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n",
          "enum": [
            "all",
            "increase_only"
          ],
          "type": "string"
        },
        "isBP": {
          "description": "Indicates if the company is a Business partner company",
          "default": "false",
          "type": "boolean"
        },
        "bpType": {
          "description": "Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n",
          "enum": [
            "IR",
            "VAD",
            "DR"
          ],
          "type": "string"
        },
        "bpBusinessModel": {
          "description": "Indicates BP business model",
          "type": "string"
        },
        "bpApplicantNumber": {
          "description": "Reference of the Business Partner in ALE Finance tools (SAP)",
          "type": "string"
        },
        "bpCRDid": {
          "description": "Reference of the Business Partner in CDR",
          "type": "string"
        },
        "bpHasRightToSell": {
          "description": "Indicates if the Business has the right to sell",
          "type": "boolean"
        },
        "bpHasRightToConnect": {
          "description": "When True, the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI",
          "type": "boolean"
        },
        "bpIsContractAccepted": {
          "description": "Indicates if the Business has accepted the contract and can sell Rainbow offers",
          "type": "boolean"
        },
        "bpContractAcceptationInfo": {
          "required": [
            "acceptationDate",
            "bpAdminId",
            "bpAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "acceptationDate": {
              "format": "date-time",
              "description": "Date of contract acceptation by the BP admin",
              "type": "string"
            },
            "bpAdminId": {
              "description": "User Id of the BP admin who accepted the contract",
              "type": "string"
            },
            "bpAdminLoginEmail": {
              "description": "User loginEmail of the BP admin who accepted the contract",
              "type": "string"
            }
          }
        },
        "offerType": {
          "description": "Allowed company offer types",
          "enum": [
            "freemium",
            "premium"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "When the customer has subscribed to specific business offers, this field is set to the associated specific business (ex: HDS for HealthCare business specific)",
          "enum": [
            "HDS"
          ],
          "type": "string"
        },
        "externalReference": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "externalReference2": {
          "description": "Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "avatarShape": {
          "description": "Company's avatar customization",
          "enum": [
            "square",
            "circle"
          ],
          "type": "string"
        },
        "customData": {
          "required": [
            "key1",
            "key2"
          ],
          "type": "object",
          "properties": {
            "key1": {
              "description": "Company's custom data key1.",
              "type": "string"
            },
            "key2": {
              "description": "Company's custom data key2.",
              "type": "string"
            }
          }
        }
      }
    },
    "DeletePendingCompanyVisibilityReqByIdSuccess": {
      "required": [
        "id",
        "forCompanyId",
        "invitingAdminId",
        "invitingAdminEmail",
        "invitedCompanyId",
        "invitingDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "VisibilityRequest unique identifier (ex: 5762bd90650506b1a7229f63).",
          "type": "string"
        },
        "forCompanyId": {
          "description": "Company unique identifier of the company with which the visibility was requested",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "User unique identifier of the admin user who requested the company visibility",
          "type": "string"
        },
        "invitingAdminEmail": {
          "description": "loginEmail of the admin user who requested the company visibility",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "User unique identifier of the admin user who received the company visibility request email",
          "type": "string"
        },
        "invitingDate": {
          "description": "Date when the company visibility request email was sent",
          "type": "string"
        }
      }
    },
    "GetPendingCompanyVisibilityReqByIdSuccess": {
      "required": [
        "id",
        "forCompanyId",
        "invitingAdminId",
        "invitingAdminEmail",
        "invitedCompanyId",
        "invitingDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "VisibilityRequest unique identifier (ex: 5762bd90650506b1a7229f63).",
          "type": "string"
        },
        "forCompanyId": {
          "description": "Company unique identifier of the company with which the visibility is requested",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "User unique identifier of the admin user who requested the company visibility",
          "type": "string"
        },
        "invitingAdminEmail": {
          "description": "loginEmail of the admin user who requested the company visibility",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "User unique identifier of the admin user who received the company visibility request email",
          "type": "string"
        },
        "invitingDate": {
          "description": "Date when the company visibility request email was sent",
          "type": "string"
        }
      }
    },
    "GetPendingCompanyVisibilityReqSuccess": {
      "required": [
        "id",
        "forCompanyId",
        "invitingAdminId",
        "invitingAdminEmail",
        "invitedCompanyId",
        "invitingDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "VisibilityRequest unique identifier (ex: 5762bd90650506b1a7229f63).",
          "type": "string"
        },
        "forCompanyId": {
          "description": "Company unique identifier of the company with which the visibility is requested",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "User unique identifier of the admin user who requested the company visibility",
          "type": "string"
        },
        "invitingAdminEmail": {
          "description": "loginEmail of the admin user who requested the company visibility",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "User unique identifier of the admin user who received the company visibility request email",
          "type": "string"
        },
        "invitingDate": {
          "description": "Date when the company visibility request email was sent",
          "type": "string"
        }
      }
    },
    "PostAcceptCompanyVisibilityReqSuccess": {
      "required": [
        "status",
        "id",
        "forCompanyId",
        "invitingAdminId",
        "invitingAdminEmail",
        "invitedCompanyId",
        "invitingDate"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Visibility request acceptation status message.",
          "type": "string"
        },
        "id": {
          "description": "VisibilityRequest unique identifier (ex: 5762bd90650506b1a7229f63).",
          "type": "string"
        },
        "forCompanyId": {
          "description": "Company unique identifier of the company with which the visibility is requested",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "User unique identifier of the admin user who requested the company visibility",
          "type": "string"
        },
        "invitingAdminEmail": {
          "description": "loginEmail of the admin user who requested the company visibility",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "User unique identifier of the admin user who received the company visibility request email",
          "type": "string"
        },
        "invitingDate": {
          "description": "Date when the company visibility request email was sent",
          "type": "string"
        }
      }
    },
    "admin_filebackendstorages_GetBackendIdSuccess": {
      "required": [
        "id",
        "endPoint",
        "tenantId",
        "tenantName",
        "userName",
        "password",
        "regionName",
        "hostName",
        "rootStorageURL"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "File backend unique identifier.",
          "type": "string"
        },
        "endPoint": {
          "description": "Backend End-Point. The URL for authentication (ex: http://swift.rainbow.rdna:5000/v3)",
          "type": "string"
        },
        "tenantId": {
          "description": "Authentication",
          "type": "string"
        },
        "tenantName": {
          "description": "Authentication",
          "type": "string"
        },
        "userName": {
          "description": "Authentication",
          "type": "string"
        },
        "password": {
          "description": "Authentication",
          "type": "string"
        },
        "regionName": {
          "description": "Free value",
          "type": "string"
        },
        "hostName": {
          "description": "The endPoint name (ex: swift.rainbow.rdna)",
          "type": "string"
        },
        "rootStorageURL": {
          "description": "The beginning of the path to access to a resource (ex: http://swift.rainbow.rdna:8080/v1/AUTH_a67b0e12592941488a5f53189c61022d)",
          "type": "string"
        }
      }
    },
    "admin_filebackendstorages_deleteBackendsSuccess": {
      "required": [
        "Status"
      ],
      "type": "object",
      "properties": {
        "Status": {
          "description": "Deletion status",
          "type": "string"
        }
      }
    },
    "admin_filebackendstorages_putBots": {
      "type": "object",
      "properties": {
        "endPoint": {
          "description": "Backend End-Point. The URL for authentication (ex: http://swift.rainbow.rdna:5000/v3)",
          "type": "string"
        },
        "tenantId": {
          "description": "Authentication",
          "type": "string"
        },
        "tenantName": {
          "description": "Authentication",
          "type": "string"
        },
        "userName": {
          "description": "Authentication",
          "type": "string"
        },
        "password": {
          "description": "Authentication",
          "type": "string"
        },
        "regionName": {
          "description": "Free value",
          "type": "string"
        },
        "rootStorageURL": {
          "description": "The beginning of the path to access to a resource (ex: http://swift.rainbow.rdna:8080/v1/AUTH_a67b0e12592941488a5f53189c61022d)",
          "type": "string"
        },
        "hostName": {
          "description": "This value has to be used inside the zone.json file managed by Rainbow operation team.",
          "type": "string"
        }
      }
    },
    "admin_filebackendstorages_putBotsSuccess": {
      "required": [
        "id",
        "endPoint",
        "tenantId",
        "tenantName",
        "userName",
        "password",
        "regionName",
        "hostName",
        "rootStorageURL"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "File backend unique identifier.",
          "type": "string"
        },
        "endPoint": {
          "description": "Backend End-Point. The URL for authentication (ex: http://swift.rainbow.rdna:5000/v3)",
          "type": "string"
        },
        "tenantId": {
          "description": "Authentication",
          "type": "string"
        },
        "tenantName": {
          "description": "Authentication",
          "type": "string"
        },
        "userName": {
          "description": "Authentication",
          "type": "string"
        },
        "password": {
          "description": "Authentication",
          "type": "string"
        },
        "regionName": {
          "description": "Free value",
          "type": "string"
        },
        "hostName": {
          "description": "The endPoint name (ex: swift.rainbow.rdna)",
          "type": "string"
        },
        "rootStorageURL": {
          "description": "The beginning of the path to access to a resource (ex: http://swift.rainbow.rdna:8080/v1/AUTH_a67b0e12592941488a5f53189c61022d)",
          "type": "string"
        }
      }
    },
    "admin_filebackendstorages_GetBackendsSuccess": {
      "required": [
        "id",
        "endPoint",
        "tenantId",
        "tenantName",
        "userName",
        "password",
        "regionName",
        "hostName",
        "rootStorageURL"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "File backend unique identifier.",
          "type": "string"
        },
        "endPoint": {
          "description": "Backend End-Point. The URL for authentication (ex: http://swift.rainbow.rdna:5000/v3)",
          "type": "string"
        },
        "tenantId": {
          "description": "Authentication",
          "type": "string"
        },
        "tenantName": {
          "description": "Authentication",
          "type": "string"
        },
        "userName": {
          "description": "Authentication",
          "type": "string"
        },
        "password": {
          "description": "Authentication",
          "type": "string"
        },
        "regionName": {
          "description": "Free value",
          "type": "string"
        },
        "hostName": {
          "description": "The endPoint name (ex: swift.rainbow.rdna)",
          "type": "string"
        },
        "rootStorageURL": {
          "description": "The beginning of the path to access to a resource (ex: http://swift.rainbow.rdna:8080/v1/AUTH_a67b0e12592941488a5f53189c61022d)",
          "type": "string"
        }
      }
    },
    "admin_filebackendstorages_postBackends": {
      "required": [
        "endPoint",
        "tenantId",
        "tenantName",
        "userName",
        "password",
        "regionName",
        "rootStorageURL"
      ],
      "type": "object",
      "properties": {
        "endPoint": {
          "description": "Backend End-Point. The URL for authentication (ex: http://swift.rainbow.rdna:5000/v3)",
          "type": "string"
        },
        "tenantId": {
          "description": "Authentication",
          "type": "string"
        },
        "tenantName": {
          "description": "Authentication",
          "type": "string"
        },
        "userName": {
          "description": "Authentication",
          "type": "string"
        },
        "password": {
          "description": "Authentication",
          "type": "string"
        },
        "regionName": {
          "description": "Free value",
          "type": "string"
        },
        "rootStorageURL": {
          "description": "The beginning of the path to access to a resource (ex: http://swift.rainbow.rdna:8080/v1/AUTH_a67b0e12592941488a5f53189c61022d)",
          "type": "string"
        },
        "hostName": {
          "description": "This value has to be used inside the zone.json file managed by Rainbow operation team. If not set during File Backend creation, the domain name of the endPoint URL is replicated in this field.",
          "default": "domainNameOfTheEndPointURL",
          "type": "string"
        }
      }
    },
    "admin_filebackendstorages_postBackendsSuccess": {
      "required": [
        "id",
        "endPoint",
        "tenantId",
        "tenantName",
        "userName",
        "password",
        "regionName",
        "hostName",
        "rootStorageURL"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "File backend unique identifier.",
          "type": "string"
        },
        "endPoint": {
          "description": "Backend End-Point. The URL for authentication (ex: http://swift.rainbow.rdna:5000/v3)",
          "type": "string"
        },
        "tenantId": {
          "description": "Authentication",
          "type": "string"
        },
        "tenantName": {
          "description": "Authentication",
          "type": "string"
        },
        "userName": {
          "description": "Authentication",
          "type": "string"
        },
        "password": {
          "description": "Authentication",
          "type": "string"
        },
        "regionName": {
          "description": "Free value",
          "type": "string"
        },
        "hostName": {
          "description": "The endPoint name (ex: swift.rainbow.rdna)",
          "type": "string"
        },
        "rootStorageURL": {
          "description": "The beginning of the path to access to a resource (ex: http://swift.rainbow.rdna:8080/v1/AUTH_a67b0e12592941488a5f53189c61022d)",
          "type": "string"
        }
      }
    },
    "DeleteJoinCompaniesLinksByIdSuccess": {
      "required": [
        "Status",
        "id",
        "creationDate",
        "createdByAdminId",
        "createdByAdminLoginEmail",
        "maxNumberUsers",
        "expirationDate"
      ],
      "type": "object",
      "properties": {
        "Status": {
          "description": "Deletion status",
          "type": "string"
        },
        "id": {
          "description": "Join company link unique Id",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Creation date of the join company link",
          "type": "string"
        },
        "createdByAdminId": {
          "description": "Unique Id of the admin who created the join company link",
          "type": "string"
        },
        "createdByAdminLoginEmail": {
          "description": "LoginEmail of the admin who created the join company link",
          "type": "string"
        },
        "maxNumberUsers": {
          "description": "Maximum number of users allowed to send a Join company request using this join company link",
          "type": "number"
        },
        "expirationDate": {
          "format": "date-time",
          "description": "Date of expiration of the Join company link",
          "type": "string"
        }
      }
    },
    "GetJoinCompaniesLinksByIdSuccess": {
      "required": [
        "id",
        "creationDate",
        "createdByAdminId",
        "createdByAdminLoginEmail",
        "maxNumberUsers",
        "expirationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company link unique Id",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Creation date of the join company link",
          "type": "string"
        },
        "createdByAdminId": {
          "description": "Unique Id of the admin who created the join company link",
          "type": "string"
        },
        "createdByAdminLoginEmail": {
          "description": "LoginEmail of the admin who created the join company link",
          "type": "string"
        },
        "maxNumberUsers": {
          "description": "Maximum number of users allowed to send a Join company request using this join company link",
          "type": "number"
        },
        "expirationDate": {
          "format": "date-time",
          "description": "Date of expiration of the Join company link",
          "type": "string"
        }
      }
    },
    "GetJoinCompaniesLinksSuccess": {
      "required": [
        "id",
        "creationDate",
        "createdByAdminId",
        "createdByAdminLoginEmail",
        "maxNumberUsers",
        "expirationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company link unique Id",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Creation date of the join company link",
          "type": "string"
        },
        "createdByAdminId": {
          "description": "Unique Id of the admin who created the join company link",
          "type": "string"
        },
        "createdByAdminLoginEmail": {
          "description": "LoginEmail of the admin who created the join company link",
          "type": "string"
        },
        "maxNumberUsers": {
          "description": "Maximum number of users allowed to send a Join company request using this join company link",
          "type": "number"
        },
        "expirationDate": {
          "format": "date-time",
          "description": "Date of expiration of the Join company link",
          "type": "string"
        }
      }
    },
    "PostJoinCompaniesLinks": {
      "type": "object",
      "properties": {
        "maxNumberUsers": {
          "description": "Maximum number of users allowed to send a Join company request using this join company link",
          "type": "number"
        },
        "expirationDate": {
          "format": "date-time",
          "description": "Date of expiration of the Join company link",
          "type": "string"
        }
      }
    },
    "PostJoinCompaniesLinksSuccess": {
      "required": [
        "id",
        "creationDate",
        "createdByAdminId",
        "createdByAdminLoginEmail",
        "maxNumberUsers",
        "expirationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company link unique Id",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Creation date of the join company link",
          "type": "string"
        },
        "createdByAdminId": {
          "description": "Unique Id of the admin who created the join company link",
          "type": "string"
        },
        "createdByAdminLoginEmail": {
          "description": "LoginEmail of the admin who created the join company link",
          "type": "string"
        },
        "maxNumberUsers": {
          "description": "Maximum number of users allowed to send a Join company request using this join company link",
          "type": "number"
        },
        "expirationDate": {
          "format": "date-time",
          "description": "Date of expiration of the Join company link",
          "type": "string"
        }
      }
    },
    "GetJoinCompanyInvitationsSuccess": {
      "required": [
        "id",
        "companyId",
        "companyName",
        "invitedUserId",
        "invitedUserLoginEmail",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company invitation unique Id",
          "type": "string"
        },
        "companyId": {
          "description": "Id of the company for which the join company invitation is",
          "type": "string"
        },
        "companyName": {
          "description": "Name of the company for which the join company invitation is (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedUserId": {
          "description": "Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)",
          "type": "string"
        },
        "invitedUserLoginEmail": {
          "description": "Email of the Rainbow user invited to join the company",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the join company invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been accepted by the user (if applicable)",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been declined by the user (if applicable)",
          "type": "string"
        }
      }
    },
    "admin_PostJoinCompanyInvite": {
      "type": "object",
      "properties": {
        "email": {
          "description": "Email of the Rainbow user the company admin invite in his company   \n  \nOne of `email` or `invitedUserId` is mandatory.",
          "maxLength": 255,
          "minLength": 3,
          "pattern": "/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/",
          "type": "string"
        },
        "invitedUserId": {
          "description": "Id of the Rainbow user the company admin invite in his company   \n  \nOne of `email` or `invitedUserId` is mandatory.",
          "type": "string"
        },
        "lang": {
          "description": "Force language of the email notification if not available.   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].   \n  \nAlgorithm for choosing language of email: \n\n* invited user language is used if email matches an existing Rainbow user and his language is available,\n* else provided language in parameter `lang` is used if provided,\n* else inviting company admin language is used if language is available,\n* otherwise English is used.\n\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes",
          "pattern": "/^([a-z]{2})(?:(?:(-)[A-Z]{2}))?$/",
          "type": "string"
        },
        "customMessage": {
          "description": "Custom message that inviting user can add in email body",
          "maxLength": 10000,
          "minLength": 0,
          "type": "string"
        },
        "customDisplayName": {
          "description": "Custom admin display name to use in the email sent to the user invited to join the company.   \nThe admin display name is used as the email sender (from:), in the email subject and in the email body ({{admin_displayname}} invites you to join his company {{company_name}}.)   \nIf `customDisplayName` is not provided, the display name of the logged in admin who calls this API is used.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        "invitedToBeCompanyAdmin": {
          "description": "If invitedToBeCompanyAdmin is set to true, when user accepts the join company invitation he will be company_admin of this company.",
          "type": "boolean"
        },
        "invitedToBeBpAdmin": {
          "description": "If invitedToBeBpAdmin is set to true, when user accepts the join company invitation he will be bp_admin and bp_finance. This flag can only be set by `superadmin`, `bp_admin` and `bp_finance`.   \nFor bp_admin and bp_finance, only bp_admin/bp_finance of BP company with bpType VAD can invite bp_admins/bp_finances in other companies, bp_admin/bp_finance of BP company with bpType DR and IR can only invite bp_admin/bp_finance in their own company.",
          "type": "boolean"
        }
      }
    },
    "admin_PostJoinCompanyInviteSuccess": {
      "required": [
        "id",
        "companyId",
        "companyName",
        "invitedUserId",
        "invitedUserLoginEmail",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company invitation unique Id",
          "type": "string"
        },
        "companyId": {
          "description": "Id of the company for which the join company invitation is",
          "type": "string"
        },
        "companyName": {
          "description": "Name of the company for which the join company invitation is (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedUserId": {
          "description": "Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)",
          "type": "string"
        },
        "invitedUserLoginEmail": {
          "description": "Email of the Rainbow user invited to join the company",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the join company invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been accepted by the user (if applicable)",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been declined by the user (if applicable)",
          "type": "string"
        }
      }
    },
    "GetJoinCompanyInviteByIdSuccess": {
      "required": [
        "id",
        "companyId",
        "companyName",
        "invitedUserId",
        "invitedUserLoginEmail",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company invitation unique Id",
          "type": "string"
        },
        "companyId": {
          "description": "Id of the company for which the join company invitation is",
          "type": "string"
        },
        "companyName": {
          "description": "Name of the company for which the join company invitation is (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedUserId": {
          "description": "Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)",
          "type": "string"
        },
        "invitedUserLoginEmail": {
          "description": "Email of the Rainbow user invited to join the company",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the join company invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been accepted by the user (if applicable)",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been declined by the user (if applicable)",
          "type": "string"
        }
      }
    },
    "PutCancelJoinCompanyInviteById": {
      "type": "object",
      "properties": {
        "customDisplayName": {
          "description": "Custom admin display name to use in the email sent to the user invited to join the company.   \nThe admin display name is used as the email sender (from:), in the email subject and in the email body ({{admin_displayname}} is cancelling his invitation to join his company {{company_name}}.)   \nIf `customDisplayName` is not provided, the display name of the logged in admin who calls this API is used.",
          "maxLength": 512,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "PutCancelJoinCompanyInviteByIdSuccess": {
      "required": [
        "id",
        "companyId",
        "companyName",
        "invitedUserId",
        "invitedUserLoginEmail",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company invitation unique Id",
          "type": "string"
        },
        "companyId": {
          "description": "Id of the company for which the join company invitation is",
          "type": "string"
        },
        "companyName": {
          "description": "Name of the company for which the join company invitation is (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedUserId": {
          "description": "Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)",
          "type": "string"
        },
        "invitedUserLoginEmail": {
          "description": "Email of the Rainbow user invited to join the company",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the join company invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been accepted by the user (if applicable)",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been declined by the user (if applicable)",
          "type": "string"
        }
      }
    },
    "PutFailedJoinCompanyInviteByIdSuccess": {
      "required": [
        "id",
        "companyId",
        "companyName",
        "invitedUserId",
        "invitedUserLoginEmail",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company invitation unique Id",
          "type": "string"
        },
        "companyId": {
          "description": "Id of the company for which the join company invitation is",
          "type": "string"
        },
        "companyName": {
          "description": "Name of the company for which the join company invitation is (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedUserId": {
          "description": "Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)",
          "type": "string"
        },
        "invitedUserLoginEmail": {
          "description": "Email of the Rainbow user invited to join the company",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the join company invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been accepted by the user (if applicable)",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been declined by the user (if applicable)",
          "type": "string"
        }
      }
    },
    "ResendJoinCompanyInviteById": {
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Custom message that inviting user can add in email body",
          "maxLength": 10000,
          "minLength": 0,
          "type": "string"
        },
        "customDisplayName": {
          "description": "Custom admin display name to use in the email sent to the user invited to join the company.   \nThe admin display name is used as the email sender (from:), in the email subject and in the email body ({{admin_displayname}} invites you to join his company {{company_name}}.)   \nIf `customDisplayName` is not provided, the display name of the logged in admin who calls this API is used.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "ResendJoinCompanyInviteByIdSuccess": {
      "required": [
        "id",
        "companyId",
        "companyName",
        "invitedUserId",
        "invitedUserLoginEmail",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company invitation unique Id",
          "type": "string"
        },
        "companyId": {
          "description": "Id of the company for which the join company invitation is",
          "type": "string"
        },
        "companyName": {
          "description": "Name of the company for which the join company invitation is (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedUserId": {
          "description": "Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)",
          "type": "string"
        },
        "invitedUserLoginEmail": {
          "description": "Email of the Rainbow user invited to join the company",
          "type": "string"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the join company invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been accepted by the user (if applicable)",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the join company invitation has been declined by the user (if applicable)",
          "type": "string"
        }
      }
    },
    "GetJoinCompanyRequestByIdSuccess": {
      "required": [
        "id",
        "requestingUserId",
        "requestingUserLoginEmail",
        "requestedCompanyId",
        "requestedCompanyName",
        "status",
        "requestingDate",
        "requestedNotificationLanguage",
        "lastNotificationDate",
        "requestedCompanyInvitationId"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company request unique Id",
          "type": "string"
        },
        "requestingUserId": {
          "description": "Requesting user unique Rainbow Id",
          "type": "string"
        },
        "requestingUserLoginEmail": {
          "description": "Requesting user email",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the company the requesting user wants to join",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the company the requesting user wants to join",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `declined`, `canceled`",
          "type": "string"
        },
        "requestingDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedToCompanyAdmin": {
          "required": [
            "companyAdminId",
            "companyAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "companyAdminId": {
              "description": "",
              "type": "string"
            },
            "companyAdminLoginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "requestedCompanyInvitationId": {
          "description": "If the request was sent using a JoinCompanyInvite id, this field is set with this Id",
          "type": "string"
        }
      }
    },
    "GetJoinCompanyRequestsSuccess": {
      "required": [
        "data",
        "limit",
        "offset",
        "total"
      ],
      "type": "object",
      "properties": {
        "data": {
          "description": "",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetJoinCompanyRequestsSuccess_data"
          }
        },
        "limit": {
          "description": "",
          "type": "number"
        },
        "offset": {
          "description": "",
          "type": "number"
        },
        "total": {
          "description": "",
          "type": "number"
        }
      }
    },
    "GetJoinCompanyRequestsSuccess_data": {
      "required": [
        "id",
        "requestingUserId",
        "requestingUserLoginEmail",
        "requestedCompanyId",
        "requestedCompanyName",
        "status",
        "requestingDate",
        "requestedNotificationLanguage",
        "lastNotificationDate",
        "requestedCompanyInvitationId"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Join company request unique Id",
          "type": "string"
        },
        "requestingUserId": {
          "description": "Requesting user unique Rainbow Id",
          "type": "string"
        },
        "requestingUserLoginEmail": {
          "description": "Requesting user email",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the company the requesting user wants to join",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the company the requesting user wants to join",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `declined`, `canceled`",
          "type": "string"
        },
        "requestingDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedToCompanyAdmin": {
          "required": [
            "companyAdminId",
            "companyAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "companyAdminId": {
              "description": "",
              "type": "string"
            },
            "companyAdminLoginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "requestedCompanyInvitationId": {
          "description": "If the request was sent using a JoinCompanyInvite id, this field is set with this Id",
          "type": "string"
        }
      }
    },
    "PostAcceptJoinCompanyReqSuccess": {
      "required": [
        "acceptationInfo",
        "id",
        "requestingUserId",
        "requestingUserLoginEmail",
        "requestedCompanyId",
        "requestedCompanyName",
        "status",
        "requestingDate",
        "requestedNotificationLanguage",
        "lastNotificationDate",
        "requestedCompanyInvitationId"
      ],
      "type": "object",
      "properties": {
        "acceptationInfo": {
          "required": [
            "acceptationDate",
            "acceptedByAdminId",
            "requestingDate"
          ],
          "type": "object",
          "properties": {
            "acceptationDate": {
              "format": "date-time",
              "description": "",
              "type": "string"
            },
            "acceptedByAdminId": {
              "description": "",
              "type": "string"
            },
            "requestingDate": {
              "format": "date-time",
              "description": "",
              "type": "string"
            }
          }
        },
        "id": {
          "description": "Join company request unique Id",
          "type": "string"
        },
        "requestingUserId": {
          "description": "Requesting user unique Rainbow Id",
          "type": "string"
        },
        "requestingUserLoginEmail": {
          "description": "Requesting user email",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the company the requesting user wants to join",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the company the requesting user wants to join",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `declined`, `canceled`",
          "type": "string"
        },
        "requestingDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedToCompanyAdmin": {
          "required": [
            "companyAdminId",
            "companyAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "companyAdminId": {
              "description": "",
              "type": "string"
            },
            "companyAdminLoginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "requestedCompanyInvitationId": {
          "description": "If the request was sent using a JoinCompanyInvite id, this field is set with this Id",
          "type": "string"
        }
      }
    },
    "PostDeclineJoinCompanyReqSuccess": {
      "required": [
        "declinationInfo",
        "id",
        "requestingUserId",
        "requestingUserLoginEmail",
        "requestedCompanyId",
        "requestedCompanyName",
        "status",
        "requestingDate",
        "requestedNotificationLanguage",
        "lastNotificationDate",
        "requestedCompanyInvitationId"
      ],
      "type": "object",
      "properties": {
        "declinationInfo": {
          "required": [
            "declinationDate",
            "declinedByAdminId",
            "declinedByAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "declinationDate": {
              "format": "date-time",
              "description": "",
              "type": "string"
            },
            "declinedByAdminId": {
              "description": "",
              "type": "string"
            },
            "declinedByAdminLoginEmail": {
              "format": "date-time",
              "description": "",
              "type": "string"
            }
          }
        },
        "id": {
          "description": "Join company request unique Id",
          "type": "string"
        },
        "requestingUserId": {
          "description": "Requesting user unique Rainbow Id",
          "type": "string"
        },
        "requestingUserLoginEmail": {
          "description": "Requesting user email",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the company the requesting user wants to join",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the company the requesting user wants to join",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `declined`, `canceled`",
          "type": "string"
        },
        "requestingDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedToCompanyAdmin": {
          "required": [
            "companyAdminId",
            "companyAdminLoginEmail"
          ],
          "type": "object",
          "properties": {
            "companyAdminId": {
              "description": "",
              "type": "string"
            },
            "companyAdminLoginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "requestedCompanyInvitationId": {
          "description": "If the request was sent using a JoinCompanyInvite id, this field is set with this Id",
          "type": "string"
        }
      }
    },
    "GetLinkECToBPInvitationsSuccess": {
      "required": [
        "id",
        "invitingCompanyId",
        "invitingCompanyName",
        "invitedCompanyId",
        "invitedCompanyName",
        "invitedToBeBpIr",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP invitation unique Id",
          "type": "string"
        },
        "invitingCompanyId": {
          "description": "Id of the BP company for which the link invitation is sent",
          "type": "string"
        },
        "invitingCompanyName": {
          "description": "Name of the BP company for which the invitation is sent (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "Unique Id of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedCompanyName": {
          "description": "Name of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedToBeBpIr": {
          "description": "Boolean indicating if invitation was sent to invite EC company to become BP IR company",
          "type": "boolean"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been accepted by the end customer company_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been declined by the end customer company_admin",
          "type": "string"
        }
      }
    },
    "admin_PostLinkEcToBpInvite": {
      "required": [
        "invitedCompanyId"
      ],
      "type": "object",
      "properties": {
        "invitedCompanyId": {
          "description": "Id of the end customer company to link to BP company",
          "type": "string"
        },
        "lang": {
          "description": "Force language of the email notification if not available.   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].   \n  \nAlgorithm for choosing language of email: \n\n* provided language in parameter `lang` is used if provided,\n* else inviting company admin language is used if language is available,\n* otherwise English is used.\n\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes",
          "pattern": "/^([a-z]{2})(?:(?:(-)[A-Z]{2}))?$/",
          "type": "string"
        },
        "invitedToBeBpIr": {
          "description": "if invitedToBeBpIr is set to true, when accepting invitation, the invited end customer company will become a BP company with type `IR`.   \nNote : To use invitedToBeBpIr, the inviting company should be a BP company with type `VAD`.",
          "type": "boolean"
        },
        "customMessage": {
          "description": "Custom message that inviting admin can add in email body",
          "maxLength": 100000,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "admin_PostLinkEcToBpInviteSuccess": {
      "required": [
        "id",
        "invitingCompanyId",
        "invitingCompanyName",
        "invitedCompanyId",
        "invitedCompanyName",
        "invitedToBeBpIr",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP invitation unique Id",
          "type": "string"
        },
        "invitingCompanyId": {
          "description": "Id of the BP company for which the link invitation is sent",
          "type": "string"
        },
        "invitingCompanyName": {
          "description": "Name of the BP company for which the invitation is sent (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "Unique Id of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedCompanyName": {
          "description": "Name of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedToBeBpIr": {
          "description": "Boolean indicating if invitation was sent to invite EC company to become BP IR company",
          "type": "boolean"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been accepted by the end customer company_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been declined by the end customer company_admin",
          "type": "string"
        }
      }
    },
    "GetLinkECToBPInviteByIdSuccess": {
      "required": [
        "id",
        "invitingCompanyId",
        "invitingCompanyName",
        "invitedCompanyId",
        "invitedCompanyName",
        "invitedToBeBpIr",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP invitation unique Id",
          "type": "string"
        },
        "invitingCompanyId": {
          "description": "Id of the BP company for which the link invitation is sent",
          "type": "string"
        },
        "invitingCompanyName": {
          "description": "Name of the BP company for which the invitation is sent (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "Unique Id of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedCompanyName": {
          "description": "Name of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedToBeBpIr": {
          "description": "Boolean indicating if invitation was sent to invite EC company to become BP IR company",
          "type": "boolean"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been accepted by the end customer company_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been declined by the end customer company_admin",
          "type": "string"
        }
      }
    },
    "PutCancelLinkEcToBpInviteByIdSuccess": {
      "required": [
        "id",
        "invitingCompanyId",
        "invitingCompanyName",
        "invitedCompanyId",
        "invitedCompanyName",
        "invitedToBeBpIr",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP invitation unique Id",
          "type": "string"
        },
        "invitingCompanyId": {
          "description": "Id of the BP company for which the link invitation is sent",
          "type": "string"
        },
        "invitingCompanyName": {
          "description": "Name of the BP company for which the invitation is sent (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "Unique Id of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedCompanyName": {
          "description": "Name of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedToBeBpIr": {
          "description": "Boolean indicating if invitation was sent to invite EC company to become BP IR company",
          "type": "boolean"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been accepted by the end customer company_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been declined by the end customer company_admin",
          "type": "string"
        }
      }
    },
    "ResendLinkEcToBpInviteById": {
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Custom message that inviting admin can add in email body",
          "maxLength": 100000,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "ResendLinkEcToBpInviteByIdSuccess": {
      "required": [
        "id",
        "invitingCompanyId",
        "invitingCompanyName",
        "invitedCompanyId",
        "invitedCompanyName",
        "invitedToBeBpIr",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP invitation unique Id",
          "type": "string"
        },
        "invitingCompanyId": {
          "description": "Id of the BP company for which the link invitation is sent",
          "type": "string"
        },
        "invitingCompanyName": {
          "description": "Name of the BP company for which the invitation is sent (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "Unique Id of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedCompanyName": {
          "description": "Name of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedToBeBpIr": {
          "description": "Boolean indicating if invitation was sent to invite EC company to become BP IR company",
          "type": "boolean"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been accepted by the end customer company_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been declined by the end customer company_admin",
          "type": "string"
        }
      }
    },
    "admin_PostAcceptLinkEcToBpInvitationSuccess": {
      "required": [
        "id",
        "invitingCompanyId",
        "invitingCompanyName",
        "invitedCompanyId",
        "invitedCompanyName",
        "invitedToBeBpIr",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP invitation unique Id",
          "type": "string"
        },
        "invitingCompanyId": {
          "description": "Id of the BP company for which the link invitation is sent",
          "type": "string"
        },
        "invitingCompanyName": {
          "description": "Name of the BP company for which the invitation is sent (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "Unique Id of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedCompanyName": {
          "description": "Name of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedToBeBpIr": {
          "description": "Boolean indicating if invitation was sent to invite EC company to become BP IR company",
          "type": "boolean"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been accepted by the end customer company_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been declined by the end customer company_admin",
          "type": "string"
        }
      }
    },
    "admin_PostDeclineLinkEcToBpInvitationSuccess": {
      "required": [
        "id",
        "invitingCompanyId",
        "invitingCompanyName",
        "invitedCompanyId",
        "invitedCompanyName",
        "invitedToBeBpIr",
        "invitingAdminId",
        "invitingAdminLoginEmail",
        "invitationDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP invitation unique Id",
          "type": "string"
        },
        "invitingCompanyId": {
          "description": "Id of the BP company for which the link invitation is sent",
          "type": "string"
        },
        "invitingCompanyName": {
          "description": "Name of the BP company for which the invitation is sent (not updated if company name change after invitation creation)",
          "type": "string"
        },
        "invitedCompanyId": {
          "description": "Unique Id of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedCompanyName": {
          "description": "Name of the End customer company invited to be linked to BP company",
          "type": "string"
        },
        "invitedToBeBpIr": {
          "description": "Boolean indicating if invitation was sent to invite EC company to become BP IR company",
          "type": "boolean"
        },
        "invitingAdminId": {
          "description": "Inviting company admin unique Rainbow Id",
          "type": "string"
        },
        "invitingAdminLoginEmail": {
          "description": "Inviting company admin loginEmail",
          "type": "string"
        },
        "invitationDate": {
          "format": "date-time",
          "description": "Date the invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been accepted by the end customer company_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the invitation has been declined by the end customer company_admin",
          "type": "string"
        }
      }
    },
    "GetLinkECToBPRequestByIdSuccess": {
      "required": [
        "id",
        "requestingCompanyId",
        "requestingCompanyName",
        "requestedCompanyId",
        "requestedCompanyName",
        "requestedToBeBpIr",
        "requestingAdminId",
        "requestingAdminLoginEmail",
        "requestDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP request unique Id",
          "type": "string"
        },
        "requestingCompanyId": {
          "description": "Id of the EC company for which the link request is sent",
          "type": "string"
        },
        "requestingCompanyName": {
          "description": "Name of the EC company for which the request is sent (not updated if company name change after request creation)",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedToBeBpIr": {
          "description": "Boolean indicating if request was sent to become BP IR company",
          "type": "boolean"
        },
        "requestingAdminId": {
          "description": "Requesting company admin unique Rainbow Id",
          "type": "string"
        },
        "requestingAdminLoginEmail": {
          "description": "Requesting company admin loginEmail",
          "type": "string"
        },
        "requestDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the request has been accepted by the bp_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the request has been declined by the bp_admin",
          "type": "string"
        }
      }
    },
    "GetLinkECToBPRequestsSuccess": {
      "required": [
        "id",
        "requestingCompanyId",
        "requestingCompanyName",
        "requestedCompanyId",
        "requestedCompanyName",
        "requestedToBeBpIr",
        "requestingAdminId",
        "requestingAdminLoginEmail",
        "requestDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP request unique Id",
          "type": "string"
        },
        "requestingCompanyId": {
          "description": "Id of the EC company for which the link request is sent",
          "type": "string"
        },
        "requestingCompanyName": {
          "description": "Name of the EC company for which the request is sent (not updated if company name change after request creation)",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedToBeBpIr": {
          "description": "Boolean indicating if request was sent to become BP IR company",
          "type": "boolean"
        },
        "requestingAdminId": {
          "description": "Requesting company admin unique Rainbow Id",
          "type": "string"
        },
        "requestingAdminLoginEmail": {
          "description": "Requesting company admin loginEmail",
          "type": "string"
        },
        "requestDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the request has been accepted by the bp_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the request has been declined by the bp_admin",
          "type": "string"
        }
      }
    },
    "admin_PostLinkEcToBpRequest": {
      "required": [
        "requestedCompanyId"
      ],
      "type": "object",
      "properties": {
        "requestedCompanyId": {
          "description": "Id of the BP company to link End Customer company to.",
          "type": "string"
        },
        "lang": {
          "description": "Force language of the email notification if not available. Language format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen). Locale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ... More information about the format can be found on this [link][0]. Algorithm for choosing language of email: \n\n* provided language in parameter `lang` is used if provided,\n* else requesting company admin language is used if language is available,\n* otherwise English is used.\n\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes",
          "pattern": "/^([a-z]{2})(?:(?:(-)[A-Z]{2}))?$/",
          "type": "string"
        },
        "customMessage": {
          "description": "Custom message that requesting admin can add in email body",
          "maxLength": 100000,
          "minLength": 0,
          "type": "string"
        },
        "requestedToBeBpIr": {
          "description": "if requestedToBeBpIr is set to true, when accepting request, the requesting end customer company will become a BP company with type `IR`. Note : To use requestedToBeBpIr, the requested company should be a BP company with type `VAD`.",
          "type": "boolean"
        }
      }
    },
    "admin_PostLinkEcToBpRequestSuccess": {
      "required": [
        "id",
        "requestingCompanyId",
        "requestingCompanyName",
        "requestedCompanyId",
        "requestedCompanyName",
        "requestedToBeBpIr",
        "requestingAdminId",
        "requestingAdminLoginEmail",
        "requestDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP request unique Id",
          "type": "string"
        },
        "requestingCompanyId": {
          "description": "Id of the EC company for which the link request is sent",
          "type": "string"
        },
        "requestingCompanyName": {
          "description": "Name of the EC company for which the request is sent (not updated if company name change after request creation)",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedToBeBpIr": {
          "description": "Boolean indicating if request was sent to become BP IR company",
          "type": "boolean"
        },
        "requestingAdminId": {
          "description": "Requesting company admin unique Rainbow Id",
          "type": "string"
        },
        "requestingAdminLoginEmail": {
          "description": "Requesting company admin loginEmail",
          "type": "string"
        },
        "requestDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the request has been accepted by the bp_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the request has been declined by the bp_admin",
          "type": "string"
        }
      }
    },
    "PostCancelLinkEcToBpRequestByIdSuccess": {
      "required": [
        "id",
        "requestingCompanyId",
        "requestingCompanyName",
        "requestedCompanyId",
        "requestedCompanyName",
        "requestedToBeBpIr",
        "requestingAdminId",
        "requestingAdminLoginEmail",
        "requestDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP request unique Id",
          "type": "string"
        },
        "requestingCompanyId": {
          "description": "Id of the EC company for which the link request is sent",
          "type": "string"
        },
        "requestingCompanyName": {
          "description": "Name of the EC company for which the request is sent (not updated if company name change after request creation)",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedToBeBpIr": {
          "description": "Boolean indicating if request was sent to become BP IR company",
          "type": "boolean"
        },
        "requestingAdminId": {
          "description": "Requesting company admin unique Rainbow Id",
          "type": "string"
        },
        "requestingAdminLoginEmail": {
          "description": "Requesting company admin loginEmail",
          "type": "string"
        },
        "requestDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the request has been accepted by the bp_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the request has been declined by the bp_admin",
          "type": "string"
        }
      }
    },
    "ResendLinkEcToBpRequestById": {
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Custom message that requesting admin can add in email body",
          "maxLength": 100000,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "ResendLinkEcToBpRequestByIdSuccess": {
      "required": [
        "id",
        "requestingCompanyId",
        "requestingCompanyName",
        "requestedCompanyId",
        "requestedCompanyName",
        "requestedToBeBpIr",
        "requestingAdminId",
        "requestingAdminLoginEmail",
        "requestDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP request unique Id",
          "type": "string"
        },
        "requestingCompanyId": {
          "description": "Id of the EC company for which the link request is sent",
          "type": "string"
        },
        "requestingCompanyName": {
          "description": "Name of the EC company for which the request is sent (not updated if company name change after request creation)",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedToBeBpIr": {
          "description": "Boolean indicating if request was sent to become BP IR company",
          "type": "boolean"
        },
        "requestingAdminId": {
          "description": "Requesting company admin unique Rainbow Id",
          "type": "string"
        },
        "requestingAdminLoginEmail": {
          "description": "Requesting company admin loginEmail",
          "type": "string"
        },
        "requestDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the request has been accepted by the bp_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the request has been declined by the bp_admin",
          "type": "string"
        }
      }
    },
    "admin_PostAcceptLinkEcToBpRequestSuccess": {
      "required": [
        "id",
        "requestingCompanyId",
        "requestingCompanyName",
        "requestedCompanyId",
        "requestedCompanyName",
        "requestedToBeBpIr",
        "requestingAdminId",
        "requestingAdminLoginEmail",
        "requestDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP request unique Id",
          "type": "string"
        },
        "requestingCompanyId": {
          "description": "Id of the EC company for which the link request is sent",
          "type": "string"
        },
        "requestingCompanyName": {
          "description": "Name of the EC company for which the request is sent (not updated if company name change after request creation)",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedToBeBpIr": {
          "description": "Boolean indicating if request was sent to become BP IR company",
          "type": "boolean"
        },
        "requestingAdminId": {
          "description": "Requesting company admin unique Rainbow Id",
          "type": "string"
        },
        "requestingAdminLoginEmail": {
          "description": "Requesting company admin loginEmail",
          "type": "string"
        },
        "requestDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the request has been accepted by the bp_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the request has been declined by the bp_admin",
          "type": "string"
        }
      }
    },
    "admin_PostDeclineLinkEcToBpRequestSuccess": {
      "required": [
        "id",
        "requestingCompanyId",
        "requestingCompanyName",
        "requestedCompanyId",
        "requestedCompanyName",
        "requestedToBeBpIr",
        "requestingAdminId",
        "requestingAdminLoginEmail",
        "requestDate",
        "lastNotificationDate",
        "requestedNotificationLanguage",
        "status",
        "acceptationDate",
        "declinationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Link End customer to BP request unique Id",
          "type": "string"
        },
        "requestingCompanyId": {
          "description": "Id of the EC company for which the link request is sent",
          "type": "string"
        },
        "requestingCompanyName": {
          "description": "Name of the EC company for which the request is sent (not updated if company name change after request creation)",
          "type": "string"
        },
        "requestedCompanyId": {
          "description": "Unique Id of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedCompanyName": {
          "description": "Name of the BP company requested to be linked to EC company",
          "type": "string"
        },
        "requestedToBeBpIr": {
          "description": "Boolean indicating if request was sent to become BP IR company",
          "type": "boolean"
        },
        "requestingAdminId": {
          "description": "Requesting company admin unique Rainbow Id",
          "type": "string"
        },
        "requestingAdminLoginEmail": {
          "description": "Requesting company admin loginEmail",
          "type": "string"
        },
        "requestDate": {
          "format": "date-time",
          "description": "Date the request was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "status": {
          "description": "Request status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`",
          "type": "string"
        },
        "acceptationDate": {
          "format": "date-time",
          "description": "Date when the request has been accepted by the bp_admin",
          "type": "string"
        },
        "declinationDate": {
          "format": "date-time",
          "description": "Date when the request has been declined by the bp_admin",
          "type": "string"
        }
      }
    },
    "NotificationsIM": {
      "required": [
        "fromUserId",
        "toUserId"
      ],
      "type": "object",
      "properties": {
        "fromUserId": {
          "description": "IM sender user unique identifier (like 56c5cb38e8078d7512c43985)",
          "type": "string"
        },
        "toUserId": {
          "description": "IM recipient user unique identifier (like 56c5c19f94141765119f896c)",
          "type": "string"
        },
        "imSubject": {
          "description": "IM subject",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "imBody": {
          "description": "IM body",
          "maxLength": 100000,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "NotificationsIMSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Status message.",
          "type": "string"
        }
      }
    },
    "NotificationsIMBot": {
      "required": [
        "fromBotId",
        "toUserId"
      ],
      "type": "object",
      "properties": {
        "fromBotId": {
          "description": "IM sender bot unique identifier (like 56c5cb38e8078d7512c43985)",
          "type": "string"
        },
        "toUserId": {
          "description": "IM recipient user unique identifier (like 56c5c19f94141765119f896c)",
          "type": "string"
        },
        "imSubject": {
          "description": "IM subject",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "imBody": {
          "description": "IM body",
          "maxLength": 100000,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "NotificationsIMBotSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Status message.",
          "type": "string"
        }
      }
    },
    "admin_RequestCompanyVisibility": {
      "required": [
        "email"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "Email address of the company administrator for which the visibility request is sent.   \nThis email must match a Rainbow company administrator, otherwise a 403 error is returned and the email is not sent.",
          "maxLength": 255,
          "minLength": 3,
          "pattern": "/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/",
          "type": "string"
        },
        "lang": {
          "description": "Language of the email notification.   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes",
          "default": "en",
          "maxLength": 5,
          "minLength": 2,
          "type": "string"
        }
      }
    },
    "admin_RequestCompanyVisibilitySuccess": {
      "required": [
        "email"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "Email address of the company administrator for which the visibility request is sent.",
          "type": "string"
        }
      }
    },
    "GetOperationLogSuccess": {
      "required": [
        "id",
        "operationDate",
        "operationType",
        "doneBy",
        "resourceType",
        "resourceId",
        "resourceContext",
        "previousData",
        "newData"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Operation log unique identifier",
          "type": "string"
        },
        "operationDate": {
          "format": "date-time",
          "description": "Date when the operation has been performed by the administrator",
          "type": "string"
        },
        "operationType": {
          "description": "Type of performed operation",
          "enum": [
            "create",
            "update",
            "delete"
          ],
          "type": "string"
        },
        "operationMessage": {
          "description": "Optional string which can be used to describe the operation",
          "type": "string"
        },
        "doneBy": {
          "required": [
            "userId",
            "loginEmail",
            "displayName",
            "companyId",
            "companyName"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "Unique identifier of the user who performed the operation",
              "type": "string"
            },
            "loginEmail": {
              "description": "loginEmail of the user who performed the operation",
              "type": "string"
            },
            "displayName": {
              "description": "displayName of the user who performed the operation",
              "type": "string"
            },
            "companyId": {
              "description": "Unique identifier of the company of the user who performed the operation",
              "type": "string"
            },
            "companyName": {
              "description": "Name of the company of the user who performed the operation",
              "type": "string"
            }
          }
        },
        "resourceType": {
          "description": "Type of the resource on which the operation has been performed",
          "enum": [
            "subscription",
            "profile"
          ],
          "type": "string"
        },
        "resourceId": {
          "description": "Unique identifier of the resource on which the operation has been performed",
          "type": "string"
        },
        "resourceContext": {
          "required": [
            "companyId",
            "companyName"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "Operation performed on a resource regarding this user (profile creation/deletion, ...)   \nFor now, only set for resourceType=`profile`.",
              "type": "string"
            },
            "loginEmail": {
              "description": "Operation performed on a resource regarding this user (profile creation/deletion, ...)   \nFor now, only set for resourceType=`profile`.",
              "type": "string"
            },
            "companyId": {
              "description": "Operation performed on a resource regarding this company (company subscription creation/update/deletion, company of user's profile creation/deletion, ...)   \nThis field allows to filter on the companies for which the operation has been done.",
              "type": "string"
            },
            "companyName": {
              "description": "Operation performed on a resource regarding this company (company subscription creation/update/deletion, company of user's profile creation/deletion, ...)",
              "type": "string"
            }
          }
        },
        "previousData": {
          "type": "object"
        },
        "newData": {
          "type": "object"
        }
      }
    },
    "DeleteOrganisationsSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetOrganisationsIdSuccess": {
      "required": [
        "companies",
        "id",
        "creationDate",
        "name",
        "visibility"
      ],
      "type": "object",
      "properties": {
        "companies": {
          "description": "Array of company identifiers belonging to this organisation",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "id": {
          "description": "Organisation unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Organisation creation date (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Organisation name",
          "type": "string"
        },
        "visibility": {
          "description": "Organisation visibility (define if users being in this organisation can be searched by users being in other organisations)",
          "type": "string"
        }
      }
    },
    "PutOrganisations": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Organisation name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "visibility": {
          "description": "Organisation visibility (define if users being in this organisation can be searched by users being in other organisations)",
          "default": "private",
          "enum": [
            "public",
            "private"
          ],
          "type": "string"
        }
      }
    },
    "PutOrganisationsSuccess": {
      "required": [
        "id",
        "creationDate",
        "name",
        "visibility"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Organisation unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Organisation creation date (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Organisation name",
          "type": "string"
        },
        "visibility": {
          "description": "Organisation visibility (define if users being in this organisation can be searched by users being in other organisations)",
          "type": "string"
        }
      }
    },
    "GetOrganisationsSuccess": {
      "required": [
        "name",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Organisation name",
          "type": "string"
        },
        "id": {
          "description": "Organisation unique identifier",
          "type": "string"
        }
      }
    },
    "PostOrganisations": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Organisation name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "visibility": {
          "description": "Organisation visibility (define if users being in this organisation can be searched by users being in other organisations)",
          "default": "private",
          "enum": [
            "public",
            "private"
          ],
          "type": "string"
        }
      }
    },
    "PostOrganisationsSuccess": {
      "required": [
        "id",
        "creationDate",
        "name",
        "visibility"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Organisation unique identifier",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Organisation creation date (Read only)",
          "type": "string"
        },
        "name": {
          "description": "Organisation name",
          "type": "string"
        },
        "visibility": {
          "description": "Organisation visibility (define if users being in this organisation can be searched by users being in other organisations)",
          "type": "string"
        }
      }
    },
    "DeleteOrganisationCompaniesSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetOrganisationCompaniesSuccess": {
      "required": [
        "name",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        }
      }
    },
    "PostOrganisationCompanies": {
      "required": [
        "companyId"
      ],
      "type": "object",
      "properties": {
        "companyId": {
          "description": "Company unique identifier { \"companyId\": \"5749ab92245015fe0d36e96a\" }",
          "type": "string"
        }
      }
    },
    "PostOrganisationCompaniesSuccess": {
      "required": [
        "name",
        "latin_name",
        "creationDate",
        "statusUpdatedDate",
        "settings",
        "forceHandshake",
        "status",
        "visibility",
        "visibleBy",
        "organisationId",
        "offerType",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "latin_name": {
          "description": "Company name format for search purpose",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last company status update",
          "type": "string"
        },
        "settings": {
          "type": "object"
        },
        "forceHandshake": {
          "description": "Precondition - Several companies under an organization - Users under one company doesn't have to acknowledge when they are added to the network of another user belonging to the other company(ies) of the same organization",
          "type": "boolean"
        },
        "status": {
          "description": "Company status",
          "type": "string"
        },
        "visibility": {
          "description": "Company visibility (define if users being in this company can be searched by users being in other company)",
          "type": "string"
        },
        "visibleBy": {
          "description": "If visibility is private, list of companyIds for which visibility is allowed",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "organisationId": {
          "description": "Organization from which the company is linked in",
          "type": "string"
        },
        "offerType": {
          "description": "Allowed company offer types (lead - opportunity to become freemium or premium)",
          "enum": [
            "lead",
            "freemium",
            "premium"
          ],
          "type": "string"
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        }
      }
    },
    "GetPbxIdSuccess": {
      "required": [
        "country",
        "pbxGroup",
        "id",
        "name",
        "pbxId",
        "siteId",
        "type",
        "version",
        "jid_pbxagent",
        "jid_pbxagent_password",
        "jid_pbxpcg",
        "jid_pbxpcg_password",
        "status",
        "serverPingTimeout",
        "pbxMainBundlePrefix",
        "pbxNumberingTranslator",
        "pbxNationalPrefix",
        "pbxInternationalPrefix",
        "creationDate",
        "statusUpdatedDate",
        "searchResultOrder",
        "isShared",
        "isCentrex",
        "bpId"
      ],
      "type": "object",
      "properties": {
        "country": {
          "description": "System country (ISO 3166-1 alpha2 format)",
          "type": "string"
        },
        "pbxGroup": {
          "description": "Set of pabx sharing the same unified dial plan. List of object (systemId, pbxId)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetPbxIdSuccess_pbxGroup"
          }
        },
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) login.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "description": "CCA type",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "jid_pbxagent": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. > - `created, activating`: This is the public access code. The code must be used by the CCA for the first connection. > - `activated`: This is an Hash code of the private access code, reduced to the last eight digits",
          "type": "string"
        },
        "jid_pbxpcg": {
          "description": "PCG Jabber Id for this system",
          "type": "string"
        },
        "jid_pbxpcg_password": {
          "description": "PCG CCA Jabber Id password for this system",
          "type": "string"
        },
        "status": {
          "description": "CCA status report. (read only) > - `created`: CCA uses a public access code to join rainbow infrastructure (see jid_pbxagent_password field) > - `activating`: Rainbow infrastructure has proposed a private access code to replace the former public access code > - `activated`: CCA has accepted the new access code, that will be used for the next initialization.",
          "default": "created",
          "enum": [
            "created",
            "activating",
            "activated"
          ],
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pbxNumberingTranslator": {
          "description": "list of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetPbxIdSuccess_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "System creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last system status update (Read only)",
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies)",
          "type": "boolean"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**",
          "type": "boolean"
        },
        "bpId": {
          "description": "Identifier which links the system to the corresponding Business partner company. Obligatory when a BP admin creates a isCentrex or isShared system not yet used by a company",
          "default": "null",
          "type": "string"
        }
      }
    },
    "GetPbxIdSuccess_pbxGroup": {
      "required": [
        "systemId",
        "pbxId"
      ],
      "type": "object",
      "properties": {
        "systemId": {
          "description": "",
          "type": "string"
        },
        "pbxId": {
          "description": "",
          "type": "string"
        }
      }
    },
    "GetPbxIdSuccess_pbxNumberingTranslator": {
      "required": [
        "regexpMatch",
        "regexpReplace",
        "description"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule * @apiSuccess {Boolean} usePbxMainBundlePrefix Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "string"
        }
      }
    },
    "GetPbxsSuccess": {
      "required": [
        "id",
        "name",
        "pbxId",
        "siteId",
        "type",
        "country",
        "version",
        "jid_pbxagent",
        "jid_pbxagent_password",
        "jid_pbxpcg",
        "jid_pbxpcg_password",
        "status",
        "serverPingTimeout",
        "pbxMainBundlePrefix",
        "pbxNumberingTranslator",
        "pbxNationalPrefix",
        "pbxInternationalPrefix",
        "creationDate",
        "statusUpdatedDate",
        "searchResultOrder",
        "isShared",
        "isCentrex",
        "bpId"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) login.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "description": "CCA type",
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "jid_pbxagent": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. > - `created, activating`: This is the public access code. The code must be used by the CCA for the first connection. > - `activated`: This is an Hash code of the private access code, reduced to the last eight digits",
          "type": "string"
        },
        "jid_pbxpcg": {
          "description": "PCG Jabber Id for this system",
          "type": "string"
        },
        "jid_pbxpcg_password": {
          "description": "PCG CCA Jabber Id password for this system",
          "type": "string"
        },
        "status": {
          "description": "CCA status report. (read only) > - `created`: CCA uses a public access code to join rainbow infrastructure (see jid_pbxagent_password field) > - `activating`: Rainbow infrastructure has proposed a private access code to replace the former public access code > - `activated`: CCA has accepted the new access code, that will be used for the next initialization.",
          "default": "created",
          "enum": [
            "created",
            "activating",
            "activated"
          ],
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pbxNumberingTranslator": {
          "description": "list of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetPbxsSuccess_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "System creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last system status update (Read only)",
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies)",
          "type": "boolean"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**",
          "type": "boolean"
        },
        "bpId": {
          "description": "Identifier which links the system to the corresponding Business partner company. Obligatory when a BP admin creates a isCentrex or isShared system not yet used by a company",
          "default": "null",
          "type": "string"
        }
      }
    },
    "GetPbxsSuccess_pbxNumberingTranslator": {
      "required": [
        "regexpMatch",
        "regexpReplace",
        "description"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule * @apiSuccess {Boolean} usePbxMainBundlePrefix Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "string"
        }
      }
    },
    "DeletePcgPbxPhoneNbShortNbSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetPcgPbxPhoneNbShortNbSuccess": {
      "required": [
        "country",
        "id",
        "shortNumber",
        "internalNumber",
        "voiceMailNumber",
        "number",
        "numberE164",
        "pbxUserId",
        "userId",
        "jid_im",
        "jid_tel",
        "jid_password",
        "type",
        "deviceType",
        "isFromSystem",
        "pbxId",
        "firstName",
        "lastName",
        "deviceName",
        "systemId",
        "isMonitored",
        "isNomadic"
      ],
      "type": "object",
      "properties": {
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha2 format)",
          "type": "string"
        },
        "id": {
          "description": "Phone number unique identifier",
          "type": "string"
        },
        "shortNumber": {
          "description": "Short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number.   \nUsable within a PBX group.",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "number": {
          "description": "DDI phone number",
          "type": "string"
        },
        "numberE164": {
          "description": "E.164 phone number (computed by server if number is set)",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "userId": {
          "description": "Rainbow userId to which the phone number is linked",
          "type": "string"
        },
        "jid_im": {
          "description": "jid_im of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_tel": {
          "description": "jid_tel of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_password": {
          "description": "jid_password of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if the phoneNumber is linked to a system (pbx)",
          "type": "string"
        },
        "pbxId": {
          "description": "pbx unique identifier",
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "devicename",
          "type": "string"
        },
        "systemId": {
          "description": "System unique identifier",
          "type": "string"
        },
        "isMonitored": {
          "description": "Specifies if the PhoneNumber is monitored by agent (i.e. telephony events are notified to Rainbow user through XMPP)",
          "type": "boolean"
        },
        "isNomadic": {
          "description": "Specifies if Nomadic set is selected.",
          "type": "boolean"
        }
      }
    },
    "PutPcgPbxPhoneNbShortNb": {
      "type": "object",
      "properties": {
        "shortNumber": {
          "description": "Short phone number",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "companyPrefix": {
          "description": "When a multi-tenant system is connected, this is the company access number [multi-company call + company Area, ex: 8210, 8211]",
          "type": "string"
        },
        "companyName": {
          "description": "When a multi-tenant system is connected, this is the company name",
          "type": "string"
        },
        "number": {
          "description": "Raw phone number (DDI) _Note:_ If numberE164 can't be computed from number and country fields, an error 400 is returned (ex: wrong phone number, phone number not matching country code, ...)",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number",
          "type": "string"
        },
        "type": {
          "description": "Phone number type",
          "default": "work",
          "enum": [
            "home",
            "work",
            "other"
          ],
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type",
          "default": "landline",
          "enum": [
            "landline",
            "mobile",
            "fax",
            "other"
          ],
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "device name",
          "type": "string"
        }
      }
    },
    "PutPcgPbxPhoneNbShortNbSuccess": {
      "required": [
        "country",
        "id",
        "shortNumber",
        "internalNumber",
        "voiceMailNumber",
        "number",
        "numberE164",
        "pbxUserId",
        "userId",
        "jid_im",
        "jid_tel",
        "jid_password",
        "type",
        "deviceType",
        "isFromSystem",
        "pbxId",
        "firstName",
        "lastName",
        "deviceName",
        "systemId",
        "isMonitored",
        "isNomadic"
      ],
      "type": "object",
      "properties": {
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha2 format)",
          "type": "string"
        },
        "id": {
          "description": "Phone number unique identifier",
          "type": "string"
        },
        "shortNumber": {
          "description": "Short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number.   \nUsable within a PBX group.",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "number": {
          "description": "DDI phone number",
          "type": "string"
        },
        "numberE164": {
          "description": "E.164 phone number (computed by server if number is set)",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "userId": {
          "description": "Rainbow userId to which the phone number is linked",
          "type": "string"
        },
        "jid_im": {
          "description": "jid_im of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_tel": {
          "description": "jid_tel of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_password": {
          "description": "jid_password of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if the phoneNumber is linked to a system (pbx)",
          "type": "string"
        },
        "pbxId": {
          "description": "pbx unique identifier",
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "devicename",
          "type": "string"
        },
        "systemId": {
          "description": "System unique identifier",
          "type": "string"
        },
        "isMonitored": {
          "description": "Specifies if the PhoneNumber is monitored by agent (i.e. telephony events are notified to Rainbow user through XMPP)",
          "type": "boolean"
        },
        "isNomadic": {
          "description": "Specifies if Nomadic set is selected.",
          "type": "boolean"
        }
      }
    },
    "GetPcgPbxPhoneNbSuccess": {
      "required": [
        "country",
        "id",
        "shortNumber",
        "internalNumber",
        "voiceMailNumber",
        "number",
        "numberE164",
        "pbxUserId",
        "userId",
        "jid_im",
        "jid_tel",
        "jid_password",
        "type",
        "deviceType",
        "isFromSystem",
        "pbxId",
        "firstName",
        "lastName",
        "deviceName",
        "systemId",
        "isMonitored",
        "isNomadic"
      ],
      "type": "object",
      "properties": {
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha2 format)",
          "type": "string"
        },
        "id": {
          "description": "Phone number unique identifier",
          "type": "string"
        },
        "shortNumber": {
          "description": "Short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number.   \nUsable within a PBX group.",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "number": {
          "description": "DDI phone number",
          "type": "string"
        },
        "numberE164": {
          "description": "E.164 phone number (computed by server if number is set)",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "userId": {
          "description": "Rainbow userId to which the phone number is linked",
          "type": "string"
        },
        "jid_im": {
          "description": "jid_im of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_tel": {
          "description": "jid_tel of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_password": {
          "description": "jid_password of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if the phoneNumber is linked to a system (pbx)",
          "type": "string"
        },
        "pbxId": {
          "description": "pbx unique identifier",
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "devicename",
          "type": "string"
        },
        "systemId": {
          "description": "System unique identifier",
          "type": "string"
        },
        "isMonitored": {
          "description": "Specifies if the PhoneNumber is monitored by agent (i.e. telephony events are notified to Rainbow user through XMPP)",
          "type": "boolean"
        },
        "isNomadic": {
          "description": "Specifies if Nomadic set is selected.",
          "type": "boolean"
        }
      }
    },
    "PostPcgPbxPhoneNb": {
      "required": [
        "shortNumber"
      ],
      "type": "object",
      "properties": {
        "shortNumber": {
          "description": "Short phone number",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "companyPrefix": {
          "description": "When a multi-tenant system is connected, this is the company access number [multi-company call + company Area, ex: 8210, 8211]",
          "type": "string"
        },
        "number": {
          "description": "Raw phone number (DDI) _Note:_ If numberE164 can't be computed from number and country fields, an error 400 is returned (ex: wrong phone number, phone number not matching country code, ...)",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number",
          "type": "string"
        },
        "type": {
          "description": "Phone number type",
          "default": "work",
          "enum": [
            "home",
            "work",
            "other"
          ],
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type",
          "default": "landline",
          "enum": [
            "landline",
            "mobile",
            "fax",
            "other"
          ],
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "device name",
          "type": "string"
        }
      }
    },
    "PostPcgPbxPhoneNbSuccess": {
      "required": [
        "country",
        "id",
        "shortNumber",
        "internalNumber",
        "voiceMailNumber",
        "number",
        "numberE164",
        "pbxUserId",
        "userId",
        "jid_im",
        "jid_tel",
        "jid_password",
        "type",
        "deviceType",
        "isFromSystem",
        "pbxId",
        "firstName",
        "lastName",
        "deviceName",
        "systemId",
        "isMonitored",
        "isNomadic"
      ],
      "type": "object",
      "properties": {
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha2 format)",
          "type": "string"
        },
        "id": {
          "description": "Phone number unique identifier",
          "type": "string"
        },
        "shortNumber": {
          "description": "Short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number.   \nUsable within a PBX group.",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "number": {
          "description": "DDI phone number",
          "type": "string"
        },
        "numberE164": {
          "description": "E.164 phone number (computed by server if number is set)",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "userId": {
          "description": "Rainbow userId to which the phone number is linked",
          "type": "string"
        },
        "jid_im": {
          "description": "jid_im of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_tel": {
          "description": "jid_tel of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_password": {
          "description": "jid_password of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if the phoneNumber is linked to a system (pbx)",
          "type": "string"
        },
        "pbxId": {
          "description": "pbx unique identifier",
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "devicename",
          "type": "string"
        },
        "systemId": {
          "description": "System unique identifier",
          "type": "string"
        },
        "isMonitored": {
          "description": "Specifies if the PhoneNumber is monitored by agent (i.e. telephony events are notified to Rainbow user through XMPP)",
          "type": "boolean"
        },
        "isNomadic": {
          "description": "Specifies if Nomadic set is selected.",
          "type": "boolean"
        }
      }
    },
    "PhoneNumbersAnalyze": {
      "required": [
        "number"
      ],
      "type": "object",
      "properties": {
        "number": {
          "description": "Phone number to analyze",
          "type": "string"
        },
        "country": {
          "description": "Country of the phone number to analyze (ISO 3166-1 alpha2 or ISO 3166-1 alpha3 format).   \nOptional if the provided phone number is in E164 or International format.",
          "type": "string"
        }
      }
    },
    "PhoneNumbersAnalyzeSuccess": {
      "required": [
        "inputPhoneNumber",
        "inputCountryCode",
        "checkedCountryCode",
        "parseAndKeepRawInput",
        "isPossibleNumber",
        "isPossibleNumberWithReason",
        "isValidNumber",
        "isValidNumberForRegion",
        "getRegionCodeForNumber",
        "getNumberType",
        "e164",
        "international",
        "national",
        "rfc3966",
        "canBeInternationallyDialled",
        "getLengthOfGeographicalAreaCode",
        "getLengthOfNationalDestinationCode",
        "isNumberGeographical",
        "getNationalSignificantNumber",
        "getCountryCodeForRegion",
        "getRegionCodeForCountryCode",
        "getRegionCodesForCountryCode",
        "isAlphaNumber",
        "maybeStripExtension",
        "hasNationalNumber",
        "nationalNumberCount",
        "getNationalNumber",
        "hasCountryCode",
        "countryCodeCount",
        "getCountryCode",
        "hasExtension",
        "hasItalianLeadingZero",
        "hasNumberOfLeadingZeros",
        "hasRawInput",
        "hasCountryCodeSource",
        "hasPreferredDomesticCarrierCode"
      ],
      "type": "object",
      "properties": {
        "inputPhoneNumber": {
          "description": "Input phone number",
          "type": "string"
        },
        "inputCountryCode": {
          "description": "Input country code",
          "type": "string"
        },
        "checkedCountryCode": {
          "description": "Country code sent to google libphonenumber (computed from inputCountryCode)",
          "type": "string"
        },
        "parseAndKeepRawInput": {
          "required": [
            "country_code",
            "national_number",
            "raw_input",
            "country_code_source"
          ],
          "type": "object",
          "properties": {
            "country_code": {
              "description": "Field country_code from parseAndKeepRawInput result",
              "type": "string"
            },
            "national_number": {
              "description": "Field national_number from parseAndKeepRawInput result",
              "type": "string"
            },
            "raw_input": {
              "description": "Field raw_input from parseAndKeepRawInput result",
              "type": "string"
            },
            "country_code_source": {
              "description": "Field country_code_source from parseAndKeepRawInput result",
              "type": "string"
            }
          }
        },
        "isPossibleNumber": {
          "description": "Result of isPossibleNumber method",
          "type": "string"
        },
        "isPossibleNumberWithReason": {
          "description": "Result of isPossibleNumberWithReason method",
          "type": "string"
        },
        "isValidNumber": {
          "description": "Result of isValidNumber method",
          "type": "string"
        },
        "isValidNumberForRegion": {
          "description": "Result of isValidNumberForRegion method",
          "type": "string"
        },
        "getRegionCodeForNumber": {
          "description": "Result of getRegionCodeForNumber method",
          "type": "string"
        },
        "getNumberType": {
          "description": "Result of getNumberType method",
          "type": "string"
        },
        "e164": {
          "description": "Result of format method with E164 format",
          "type": "string"
        },
        "international": {
          "description": "Result of format method with INTERNATIONAL format",
          "type": "string"
        },
        "national": {
          "description": "Result of format method with NATIONAL format",
          "type": "string"
        },
        "rfc3966": {
          "description": "Result of format method with RFC3966 format",
          "type": "string"
        },
        "canBeInternationallyDialled": {
          "description": "Result of canBeInternationallyDialled method",
          "type": "string"
        },
        "getLengthOfGeographicalAreaCode": {
          "description": "Result of getLengthOfGeographicalAreaCode method",
          "type": "string"
        },
        "getLengthOfNationalDestinationCode": {
          "description": "Result of getLengthOfNationalDestinationCode method",
          "type": "string"
        },
        "isNumberGeographical": {
          "description": "Result of isNumberGeographical method",
          "type": "string"
        },
        "getNationalSignificantNumber": {
          "description": "Result of getNationalSignificantNumber method",
          "type": "string"
        },
        "getCountryCodeForRegion": {
          "description": "Result of getCountryCodeForRegion method",
          "type": "string"
        },
        "getRegionCodeForCountryCode": {
          "description": "Result of getRegionCodeForCountryCode method",
          "type": "string"
        },
        "getRegionCodesForCountryCode": {
          "description": "Result of getRegionCodesForCountryCode method",
          "type": "string"
        },
        "isAlphaNumber": {
          "description": "Result of isAlphaNumber method",
          "type": "string"
        },
        "maybeStripExtension": {
          "description": "Result of maybeStripExtension method",
          "type": "string"
        },
        "hasNationalNumber": {
          "description": "Result of hasNationalNumber method",
          "type": "string"
        },
        "nationalNumberCount": {
          "description": "Result of nationalNumberCount method",
          "type": "string"
        },
        "getNationalNumber": {
          "description": "Result of getNationalNumber method",
          "type": "string"
        },
        "hasCountryCode": {
          "description": "Result of hasCountryCode method",
          "type": "string"
        },
        "countryCodeCount": {
          "description": "Result of countryCodeCount method",
          "type": "string"
        },
        "getCountryCode": {
          "description": "Result of getCountryCode method",
          "type": "string"
        },
        "hasExtension": {
          "description": "Result of hasExtension method",
          "type": "string"
        },
        "hasItalianLeadingZero": {
          "description": "Result of hasItalianLeadingZero method",
          "type": "string"
        },
        "hasNumberOfLeadingZeros": {
          "description": "Result of hasNumberOfLeadingZeros method",
          "type": "string"
        },
        "hasRawInput": {
          "description": "Result of hasRawInput method",
          "type": "string"
        },
        "hasCountryCodeSource": {
          "description": "Result of hasCountryCodeSource method",
          "type": "string"
        },
        "hasPreferredDomesticCarrierCode": {
          "description": "Result of hasPreferredDomesticCarrierCode method",
          "type": "string"
        }
      }
    },
    "admin_DeleteRainbowCatalogsSuccess": {
      "required": [
        "Status"
      ],
      "type": "object",
      "properties": {
        "Status": {
          "description": "Deletion status",
          "type": "string"
        }
      }
    },
    "admin_PutRainbowCatalogs": {
      "type": "object",
      "properties": {
        "name": {
          "description": "Catalog name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "description": {
          "description": "Catalog description.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "admin_PutRainbowCatalogsSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "isDefault",
        "creationDate",
        "offersList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Catalog unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Catalog name",
          "type": "string"
        },
        "description": {
          "description": "Catalog description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow catalog. Only one catalog can be the default one.   \nDefault catalog is the catalog which automatically assigned to newly created companies.   \nOnly superadmin can specify a different catalog for a given company.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Catalog creation date",
          "type": "string"
        },
        "offersList": {
          "description": "List of offerIds the catalog contains",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "admin_DeleteRainbowCatalogsFeaturesSuccess": {
      "required": [
        "Status",
        "id",
        "name",
        "description",
        "isDefault",
        "creationDate",
        "offersList"
      ],
      "type": "object",
      "properties": {
        "Status": {
          "description": "Deletion status",
          "type": "string"
        },
        "id": {
          "description": "Catalog unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Catalog name",
          "type": "string"
        },
        "description": {
          "description": "Catalog description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow catalog. Only one catalog can be the default one.   \nDefault catalog is the catalog which automatically assigned to newly created companies.   \nOnly superadmin can specify a different catalog for a given company.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Catalog creation date",
          "type": "string"
        },
        "offersList": {
          "description": "List of offerIds the catalog contains",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "admin_PostRainbowCatalogsFeaturesSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "isDefault",
        "creationDate",
        "offersList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Catalog unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Catalog name",
          "type": "string"
        },
        "description": {
          "description": "Catalog description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow catalog. Only one catalog can be the default one.   \nDefault catalog is the catalog which automatically assigned to newly created companies.   \nOnly superadmin can specify a different catalog for a given company.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Catalog creation date",
          "type": "string"
        },
        "offersList": {
          "description": "List of offerIds the catalog contains",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "admin_DeleteRainbowCatalogsServiceDescriptionSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Status of the delete",
          "type": "string"
        }
      }
    },
    "admin_GetRainbowCatalogsServiceDescriptionSuccess": {
      "required": [
        "Content-Type",
        "Content-disposition",
        "pdf"
      ],
      "type": "object",
      "properties": {
        "Content-Type": {
          "description": "pdf content-type.",
          "enum": [
            "application/pdf"
          ],
          "type": "string"
        },
        "Content-disposition": {
          "description": "attachment; filename=RainbowServiceDescription-59de6b18d4dfb727e6750954.pdf",
          "type": "string"
        },
        "pdf": {
          "description": "Service description pdf file",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_GetRainbowCatalogsServiceDescriptionSuccess_pdf"
          }
        }
      }
    },
    "admin_GetRainbowCatalogsServiceDescriptionSuccess_pdf": {
      "type": "object"
    },
    "admin_PostRainbowCatalogsServiceDescriptionSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Status of the upload",
          "type": "string"
        }
      }
    },
    "admin_GetDefaultRainbowCatalogSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "isDefault",
        "creationDate",
        "offersList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Catalog unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Catalog name",
          "type": "string"
        },
        "description": {
          "description": "Catalog description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow catalog. Only one catalog can be the default one.   \nDefault catalog is the catalog which automatically assigned to newly created companies.   \nOnly superadmin can specify a different catalog for a given company.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Catalog creation date",
          "type": "string"
        },
        "offersList": {
          "description": "List of offerIds the catalog contains",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "admin_GetRainbowCatalogByIdSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "isDefault",
        "creationDate",
        "offersList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Catalog unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Catalog name",
          "type": "string"
        },
        "description": {
          "description": "Catalog description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow catalog. Only one catalog can be the default one.   \nDefault catalog is the catalog which automatically assigned to newly created companies.   \nOnly superadmin can specify a different catalog for a given company.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Catalog creation date",
          "type": "string"
        },
        "offersList": {
          "description": "List of offerIds the catalog contains",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "admin_GetRainbowCatalogsSuccess": {
      "required": [
        "data",
        "limit",
        "offset",
        "total"
      ],
      "type": "object",
      "properties": {
        "data": {
          "required": [
            "id",
            "name",
            "description",
            "isDefault",
            "creationDate",
            "offersList"
          ],
          "type": "object",
          "properties": {
            "id": {
              "description": "Catalog unique identifier",
              "type": "string"
            },
            "name": {
              "description": "Catalog name",
              "type": "string"
            },
            "description": {
              "description": "Catalog description",
              "type": "string"
            },
            "isDefault": {
              "description": "Indicates if it is the default Rainbow catalog. Only one catalog can be the default one.   \nDefault catalog is the catalog which automatically assigned to newly created companies.   \nOnly superadmin can specify a different catalog for a given company.",
              "type": "boolean"
            },
            "creationDate": {
              "format": "date-time",
              "description": "Catalog creation date",
              "type": "string"
            },
            "offersList": {
              "description": "List of offerIds the catalog contains",
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "limit": {
          "description": "",
          "type": "number"
        },
        "offset": {
          "description": "",
          "type": "number"
        },
        "total": {
          "description": "",
          "type": "number"
        }
      }
    },
    "admin_PostRainbowCatalogs": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Catalog name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "description": {
          "description": "Catalog description.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "admin_PostRainbowCatalogsSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "isDefault",
        "creationDate",
        "offersList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Catalog unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Catalog name",
          "type": "string"
        },
        "description": {
          "description": "Catalog description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow catalog. Only one catalog can be the default one.   \nDefault catalog is the catalog which automatically assigned to newly created companies.   \nOnly superadmin can specify a different catalog for a given company.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Catalog creation date",
          "type": "string"
        },
        "offersList": {
          "description": "List of offerIds the catalog contains",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "admin_PutRainbowCatalogsDefaultSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "isDefault",
        "creationDate",
        "offersList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Catalog unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Catalog name",
          "type": "string"
        },
        "description": {
          "description": "Catalog description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow catalog. Only one catalog can be the default one.   \nDefault catalog is the catalog which automatically assigned to newly created companies.   \nOnly superadmin can specify a different catalog for a given company.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Catalog creation date",
          "type": "string"
        },
        "offersList": {
          "description": "List of offerIds the catalog contains",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "admin_DeleteRainbowFeaturesSuccess": {
      "required": [
        "Status"
      ],
      "type": "object",
      "properties": {
        "Status": {
          "description": "Deletion status",
          "type": "string"
        }
      }
    },
    "admin_GetRainbowFeatureByIdSuccess": {
      "required": [
        "id",
        "name",
        "uniqueRef",
        "description",
        "type",
        "creationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Feature unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Feature name",
          "type": "string"
        },
        "uniqueRef": {
          "description": "Feature unique reference (to be used for controls on limitations linked to this feature in server/client code)",
          "type": "string"
        },
        "description": {
          "description": "Feature description",
          "type": "string"
        },
        "type": {
          "description": "Feature limitation type (`boolean`, `number`, `string`, `undefined`)",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Feature creation date",
          "type": "string"
        }
      }
    },
    "admin_PutRainbowFeatures": {
      "type": "object",
      "properties": {
        "name": {
          "description": "Feature name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "description": {
          "description": "Feature description.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "admin_PutRainbowFeaturesSuccess": {
      "required": [
        "id",
        "name",
        "uniqueRef",
        "description",
        "type",
        "creationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Feature unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Feature name",
          "type": "string"
        },
        "uniqueRef": {
          "description": "Feature unique reference (to be used for controls on limitations linked to this feature in server/client code)",
          "type": "string"
        },
        "description": {
          "description": "Feature description",
          "type": "string"
        },
        "type": {
          "description": "Feature limitation type (`boolean`, `number`, `string`, `undefined`)",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Feature creation date",
          "type": "string"
        }
      }
    },
    "admin_GetRainbowFeaturesSuccess": {
      "required": [
        "id",
        "name",
        "uniqueRef",
        "description",
        "type",
        "creationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Feature unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Feature name",
          "type": "string"
        },
        "uniqueRef": {
          "description": "Feature unique reference (to be used for controls on limitations linked to this feature in server/client code)",
          "type": "string"
        },
        "description": {
          "description": "Feature description",
          "type": "string"
        },
        "type": {
          "description": "Feature limitation type (`boolean`, `number`, `string`, `undefined`)",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Feature creation date",
          "type": "string"
        }
      }
    },
    "admin_PostRainbowFeatures": {
      "required": [
        "name",
        "uniqueRef",
        "type"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Feature name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "uniqueRef": {
          "description": "Feature unique reference (to be used for controls on limitations linked to this feature in server/client code)   \nCan only be set during feature creation",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "type": {
          "description": "Feature type.   \nUsed in offers APIs to check if a limitation value is allowed for a given feature.   \nIt won't be possible to set limitMin=5 in an offer for a feature having type=boolean (only true/false are allowed).",
          "enum": [
            "boolean",
            "number",
            "string",
            "undefined"
          ],
          "type": "string"
        },
        "description": {
          "description": "Feature description.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "admin_PostRainbowFeaturesSuccess": {
      "required": [
        "id",
        "name",
        "uniqueRef",
        "description",
        "type",
        "creationDate"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Feature unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Feature name",
          "type": "string"
        },
        "uniqueRef": {
          "description": "Feature unique reference (to be used for controls on limitations linked to this feature in server/client code)",
          "type": "string"
        },
        "description": {
          "description": "Feature description",
          "type": "string"
        },
        "type": {
          "description": "Feature limitation type (`boolean`, `number`, `string`, `undefined`)",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Feature creation date",
          "type": "string"
        }
      }
    },
    "GetApiRainbowAdminV10OffersSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "technicalDescription",
        "isDefault",
        "creationDate",
        "profileId",
        "canBeSold",
        "businessModel",
        "autoSubscribe",
        "isExclusive",
        "isPrepaid",
        "prepaidDuration",
        "zuoraOfferId",
        "zuoraProductRatePlanId",
        "zuoraProductRatePlanChargeId",
        "hasConference",
        "isDemo"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Offer unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Offer name",
          "type": "string"
        },
        "description": {
          "description": "Offer description",
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow offer. Only one offer can be the default one (i.e. Essential)   \nDefault offer is the offer which related profile is automatically assigned to newly created companies and users.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Offer creation date",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer",
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, flat fee...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n* If offer has no businessSpecific field (existing offers, as no migration scripts has been written), the offer is considered like if it has businessSpecific equal to [\"NONE\"].\n\n",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the offer has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month).   \nOnly set if `isPrepaid` is true.",
          "type": "number"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetApiRainbowAdminV10OffersSuccess_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "hasConference": {
          "description": "Indicates if the offer contains conference services",
          "type": "boolean"
        },
        "isDemo": {
          "description": "Indicates if the offer is a demo offer",
          "type": "boolean"
        }
      }
    },
    "GetApiRainbowAdminV10OffersSuccess_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "admin_PostRainbowOffers": {
      "required": [
        "name",
        "profileId"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Offer name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer.",
          "type": "string"
        },
        "description": {
          "description": "Offer description.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description.   \n`technicalDescription` must be unique.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "default": "false",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, ...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "default": "none",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n\n",
          "default": "[\"NONE",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "default": "false",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).",
          "default": "false",
          "type": "boolean"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "default": "undefined",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_PostRainbowOffers_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "sapReference": {
          "description": "Reference of the offer on SAP side.",
          "type": "string"
        },
        "offerReference": {
          "description": "Key used for referencing the offer. Well know offer References are: RB-Essential, RB-Business, RB-Enterprise, RB-Conference.",
          "type": "string"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month). Mandatory if isPrepaid has been set",
          "type": "number"
        }
      }
    },
    "admin_PostRainbowOffers_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Required only if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Required only if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "admin_PostRainbowOffersSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "technicalDescription",
        "isDefault",
        "creationDate",
        "profileId",
        "canBeSold",
        "businessModel",
        "autoSubscribe",
        "isExclusive",
        "isPrepaid",
        "prepaidDuration",
        "zuoraOfferId",
        "zuoraProductRatePlanId",
        "zuoraProductRatePlanChargeId",
        "hasConference",
        "isDemo"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Offer unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Offer name",
          "type": "string"
        },
        "description": {
          "description": "Offer description",
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow offer. Only one offer can be the default one (i.e. Essential)   \nDefault offer is the offer which related profile is automatically assigned to newly created companies and users.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Offer creation date",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer",
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, flat fee...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n* If offer has no businessSpecific field (existing offers, as no migration scripts has been written), the offer is considered like if it has businessSpecific equal to [\"NONE\"].\n\n",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the offer has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month).   \nOnly set if `isPrepaid` is true.",
          "type": "number"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_PostRainbowOffersSuccess_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "hasConference": {
          "description": "Indicates if the offer contains conference services",
          "type": "boolean"
        },
        "isDemo": {
          "description": "Indicates if the offer is a demo offer",
          "type": "boolean"
        }
      }
    },
    "admin_PostRainbowOffersSuccess_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "admin_DeleteRainbowOffersSuccess": {
      "required": [
        "Status"
      ],
      "type": "object",
      "properties": {
        "Status": {
          "description": "Deletion status",
          "type": "string"
        }
      }
    },
    "admin_GetRainbowOfferByIdSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "technicalDescription",
        "isDefault",
        "creationDate",
        "profileId",
        "canBeSold",
        "businessModel",
        "autoSubscribe",
        "isExclusive",
        "isPrepaid",
        "prepaidDuration",
        "zuoraOfferId",
        "zuoraProductRatePlanId",
        "zuoraProductRatePlanChargeId",
        "hasConference",
        "isDemo"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Offer unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Offer name",
          "type": "string"
        },
        "description": {
          "description": "Offer description",
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow offer. Only one offer can be the default one (i.e. Essential)   \nDefault offer is the offer which related profile is automatically assigned to newly created companies and users.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Offer creation date",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer",
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, flat fee...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n* If offer has no businessSpecific field (existing offers, as no migration scripts has been written), the offer is considered like if it has businessSpecific equal to [\"NONE\"].\n\n",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the offer has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month).   \nOnly set if `isPrepaid` is true.",
          "type": "number"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_GetRainbowOfferByIdSuccess_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "hasConference": {
          "description": "Indicates if the offer contains conference services",
          "type": "boolean"
        },
        "isDemo": {
          "description": "Indicates if the offer is a demo offer",
          "type": "boolean"
        }
      }
    },
    "admin_GetRainbowOfferByIdSuccess_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "admin_PutRainbowOffers": {
      "required": [
        "profileId"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Offer name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "description": {
          "description": "Offer description.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description.   \n`technicalDescription` must be unique.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer.",
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "default": "false",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, ...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "default": "none",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n\n",
          "default": "[\"NONE",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "default": "false",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).",
          "default": "false",
          "type": "boolean"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "default": "undefined",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_PutRainbowOffers_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "sapReference": {
          "description": "Reference of the offer on SAP side.",
          "type": "string"
        },
        "offerReference": {
          "description": "Key used for referencing the offer. Well know offer References are: RB-Essential, RB-Business, RB-Enterprise, RB-Conference.",
          "type": "string"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month). Mandatory if isPrepaid has been set",
          "type": "number"
        }
      }
    },
    "admin_PutRainbowOffers_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Required only if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Required only if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "admin_PutRainbowOffersSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "technicalDescription",
        "isDefault",
        "creationDate",
        "profileId",
        "canBeSold",
        "businessModel",
        "autoSubscribe",
        "isExclusive",
        "isPrepaid",
        "prepaidDuration",
        "zuoraOfferId",
        "zuoraProductRatePlanId",
        "zuoraProductRatePlanChargeId",
        "hasConference",
        "isDemo"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Offer unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Offer name",
          "type": "string"
        },
        "description": {
          "description": "Offer description",
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow offer. Only one offer can be the default one (i.e. Essential)   \nDefault offer is the offer which related profile is automatically assigned to newly created companies and users.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Offer creation date",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer",
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, flat fee...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n* If offer has no businessSpecific field (existing offers, as no migration scripts has been written), the offer is considered like if it has businessSpecific equal to [\"NONE\"].\n\n",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the offer has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month).   \nOnly set if `isPrepaid` is true.",
          "type": "number"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_PutRainbowOffersSuccess_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "hasConference": {
          "description": "Indicates if the offer contains conference services",
          "type": "boolean"
        },
        "isDemo": {
          "description": "Indicates if the offer is a demo offer",
          "type": "boolean"
        }
      }
    },
    "admin_PutRainbowOffersSuccess_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "admin_GetRainbowOffersSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "technicalDescription",
        "isDefault",
        "creationDate",
        "profileId",
        "canBeSold",
        "businessModel",
        "autoSubscribe",
        "isExclusive",
        "isPrepaid",
        "prepaidDuration",
        "zuoraOfferId",
        "zuoraProductRatePlanId",
        "zuoraProductRatePlanChargeId",
        "hasConference",
        "isDemo"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Offer unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Offer name",
          "type": "string"
        },
        "description": {
          "description": "Offer description",
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow offer. Only one offer can be the default one (i.e. Essential)   \nDefault offer is the offer which related profile is automatically assigned to newly created companies and users.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Offer creation date",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer",
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, flat fee...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n* If offer has no businessSpecific field (existing offers, as no migration scripts has been written), the offer is considered like if it has businessSpecific equal to [\"NONE\"].\n\n",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the offer has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month).   \nOnly set if `isPrepaid` is true.",
          "type": "number"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_GetRainbowOffersSuccess_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "hasConference": {
          "description": "Indicates if the offer contains conference services",
          "type": "boolean"
        },
        "isDemo": {
          "description": "Indicates if the offer is a demo offer",
          "type": "boolean"
        }
      }
    },
    "admin_GetRainbowOffersSuccess_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "admin_PutRainbowOffersDefault": {
      "required": [
        "profileId"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Offer name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "description": {
          "description": "Offer description.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description.   \n`technicalDescription` must be unique.",
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer.",
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "default": "false",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, ...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "default": "none",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n\n",
          "default": "[\"NONE",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "default": "false",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).",
          "default": "false",
          "type": "boolean"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "default": "undefined",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_PutRainbowOffersDefault_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "sapReference": {
          "description": "Reference of the offer on SAP side.",
          "type": "string"
        },
        "offerReference": {
          "description": "Key used for referencing the offer. Well know offer References are: RB-Essential, RB-Business, RB-Enterprise, RB-Conference.",
          "type": "string"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month). Mandatory if isPrepaid has been set",
          "type": "number"
        }
      }
    },
    "admin_PutRainbowOffersDefault_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Required only if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Required only if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "admin_PutRainbowOffersDefaultSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "technicalDescription",
        "isDefault",
        "creationDate",
        "profileId",
        "canBeSold",
        "businessModel",
        "autoSubscribe",
        "isExclusive",
        "isPrepaid",
        "prepaidDuration",
        "zuoraOfferId",
        "zuoraProductRatePlanId",
        "zuoraProductRatePlanChargeId",
        "hasConference",
        "isDemo"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Offer unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Offer name",
          "type": "string"
        },
        "description": {
          "description": "Offer description",
          "type": "string"
        },
        "technicalDescription": {
          "description": "Offer technical description",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if it is the default Rainbow offer. Only one offer can be the default one (i.e. Essential)   \nDefault offer is the offer which related profile is automatically assigned to newly created companies and users.",
          "type": "boolean"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Offer creation date",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile linked to this offer",
          "type": "string"
        },
        "canBeSold": {
          "description": "Indicates if the offer can be sold to customers.   \nSome offers will not be sold (Essential, Beta, ...).   \nIf canBeSold is true, zuoraOfferId, zuoraProductRatePlanId and zuoraProductRatePlanChargeId have to be set.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to this offer (number of users, usage, flat fee...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `flat_fee`: Offers having this business model are billed based on a flat fee (same price each month for the company which subscribe to this offer). This should be the business model for some specific business offers like HDS.\n* `none`: no business model. Should be used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "flat_fee",
            "none"
          ],
          "type": "string"
        },
        "businessSpecific": {
          "description": "Indicates if the offer is related to specific(s) business (for verticals like HDS) \n\n* `NONE`: This offer can be used if the company does not have a businessSpecific field.\n* `HDS`: This offer can only used if the company have a businessSpecific HDS (HealthCare).\n* If offer has no businessSpecific field (existing offers, as no migration scripts has been written), the offer is considered like if it has businessSpecific equal to [\"NONE\"].\n\n",
          "enum": [
            "NONE",
            "HDS"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoSubscribe": {
          "description": "Indicates if the offer has to be automatically subscribed at company creation.",
          "type": "boolean"
        },
        "isExclusive": {
          "description": "Indicates if the offer is exclusive for assignation to a user profile (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the offer has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if the offer is a prepaid offer",
          "type": "boolean"
        },
        "prepaidDuration": {
          "description": "Prepaid offer duration (in month).   \nOnly set if `isPrepaid` is true.",
          "type": "number"
        },
        "provisioningNeeded": {
          "description": "Array of Objects which indicates if account must be provisioned on other components when subscribing to this offer.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_PutRainbowOffersDefaultSuccess_provisioningNeeded"
          }
        },
        "zuoraOfferId": {
          "description": "ID of the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanId": {
          "description": "ID of the ProductRatePlanId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "zuoraProductRatePlanChargeId": {
          "description": "ID of the ProductRatePlanChargeId to use when creating a subscription for the related offer in Zuora (if offer can be sold)",
          "type": "string"
        },
        "hasConference": {
          "description": "Indicates if the offer contains conference services",
          "type": "boolean"
        },
        "isDemo": {
          "description": "Indicates if the offer is a demo offer",
          "type": "boolean"
        }
      }
    },
    "admin_PutRainbowOffersDefaultSuccess_provisioningNeeded": {
      "required": [
        "providerType"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "pgiEnterpriseId": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `PGI`. Corresponds to an enterpriseId to use when provisioning the company account on PGI component.",
          "enum": [
            "testEnterpriseId",
            "internalEnterpriseId",
            "genericEnterpriseId"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        }
      }
    },
    "GetApiRainbowAdminV10ProfilesSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "creationDate",
        "featuresList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Profile unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Profile name",
          "type": "string"
        },
        "description": {
          "description": "Profile description",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Profile creation date",
          "type": "string"
        },
        "featuresList": {
          "format": "date-time",
          "description": "List of features associated to this profile, with the associated restriction (if any):   \n`featureId`: Feature unique identified   \n`featureName`: Feature name (automatically filled by server based on name of Feature having provided featureId)   \n`featureUniqueRef`: Feature unique reference (to be used for controls on limitations linked to this feature in server/client code) (automatically filled by server based on uniqueRef of Feature having provided featureId)   \n`featureType`: Feature limitation type (automatically filled by server based on name of Feature having provided featureId)   \n`addedDate`: Date when the feature was updated for the profile   \n`lastUpdateDate`: Date when the feature was updated for the profile   \n`isEnabled`: In case feature has type boolean (on/off), is the feature enabled   \n`limitMin`: In case feature has type number, limit min of the feature (if applicable)   \n`limitMax`: In case feature has type number, limit max of the feature (if applicable)",
          "type": "string"
        }
      }
    },
    "admin_PostRainbowProfiles": {
      "required": [
        "name",
        "isCpaasProfile"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Profile name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "description": {
          "description": "Profile description.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "isCpaasProfile": {
          "description": "In case profile is used in CPAAS context.",
          "type": "boolean"
        }
      }
    },
    "admin_PostRainbowProfilesSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "creationDate",
        "featuresList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Profile unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Profile name",
          "type": "string"
        },
        "description": {
          "description": "Profile description",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Profile creation date",
          "type": "string"
        },
        "featuresList": {
          "format": "date-time",
          "description": "List of features associated to this profile, with the associated restriction (if any):   \n`featureId`: Feature unique identified   \n`featureName`: Feature name (automatically filled by server based on name of Feature having provided featureId)   \n`featureUniqueRef`: Feature unique reference (to be used for controls on limitations linked to this feature in server/client code) (automatically filled by server based on uniqueRef of Feature having provided featureId)   \n`featureType`: Feature limitation type (automatically filled by server based on name of Feature having provided featureId)   \n`addedDate`: Date when the feature was updated for the profile   \n`lastUpdateDate`: Date when the feature was updated for the profile   \n`isEnabled`: In case feature has type boolean (on/off), is the feature enabled   \n`limitMin`: In case feature has type number, limit min of the feature (if applicable)   \n`limitMax`: In case feature has type number, limit max of the feature (if applicable)",
          "type": "string"
        }
      }
    },
    "admin_DeleteRainbowProfilesSuccess": {
      "required": [
        "Status"
      ],
      "type": "object",
      "properties": {
        "Status": {
          "description": "Deletion status",
          "type": "string"
        }
      }
    },
    "admin_GetRainbowProfileByIdSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "creationDate",
        "featuresList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Profile unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Profile name",
          "type": "string"
        },
        "description": {
          "description": "Profile description",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Profile creation date",
          "type": "string"
        },
        "featuresList": {
          "format": "date-time",
          "description": "List of features associated to this profile, with the associated restriction (if any):   \n`featureId`: Feature unique identified   \n`featureName`: Feature name (automatically filled by server based on name of Feature having provided featureId)   \n`featureUniqueRef`: Feature unique reference (to be used for controls on limitations linked to this feature in server/client code) (automatically filled by server based on uniqueRef of Feature having provided featureId)   \n`featureType`: Feature limitation type (automatically filled by server based on name of Feature having provided featureId)   \n`addedDate`: Date when the feature was updated for the profile   \n`lastUpdateDate`: Date when the feature was updated for the profile   \n`isEnabled`: In case feature has type boolean (on/off), is the feature enabled   \n`limitMin`: In case feature has type number, limit min of the feature (if applicable)   \n`limitMax`: In case feature has type number, limit max of the feature (if applicable)",
          "type": "string"
        }
      }
    },
    "admin_PutRainbowProfiles": {
      "required": [
        "isCpaasProfile"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Profile name.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "description": {
          "description": "Profile description.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "isCpaasProfile": {
          "description": "In case profile is used in CPAAS context.",
          "type": "boolean"
        }
      }
    },
    "admin_PutRainbowProfilesSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "creationDate",
        "featuresList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Profile unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Profile name",
          "type": "string"
        },
        "description": {
          "description": "Profile description",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Profile creation date",
          "type": "string"
        },
        "featuresList": {
          "format": "date-time",
          "description": "List of features associated to this profile, with the associated restriction (if any):   \n`featureId`: Feature unique identified   \n`featureName`: Feature name (automatically filled by server based on name of Feature having provided featureId)   \n`featureUniqueRef`: Feature unique reference (to be used for controls on limitations linked to this feature in server/client code) (automatically filled by server based on uniqueRef of Feature having provided featureId)   \n`featureType`: Feature limitation type (automatically filled by server based on name of Feature having provided featureId)   \n`addedDate`: Date when the feature was updated for the profile   \n`lastUpdateDate`: Date when the feature was updated for the profile   \n`isEnabled`: In case feature has type boolean (on/off), is the feature enabled   \n`limitMin`: In case feature has type number, limit min of the feature (if applicable)   \n`limitMax`: In case feature has type number, limit max of the feature (if applicable)",
          "type": "string"
        }
      }
    },
    "admin_DeleteRainbowProfilesFeaturesSuccess": {
      "required": [
        "id",
        "name",
        "description",
        "creationDate",
        "featuresList"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Profile unique identifier",
          "type": "string"
        },
        "name": {
          "description": "Profile name",
          "type": "string"
        },
        "description": {
          "description": "Profile description",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Profile creation date",
          "type": "string"
        },
        "featuresList": {
          "format": "date-time",
          "description": "List of features associated to this profile, with the associated restriction (if any):   \n`featureId`: Feature unique identified   \n`featureName`: Feature name (automatically filled by server based on name of Feature having provided featureId)   \n`featureUniqueRef`: Feature unique reference (to be used for controls on limitations linked to this feature in server/client code) (automatically filled by server based on uniqueRef of Feature having provided featureId)   \n`featureType`: Feature limitation type (automatically filled by server based on name of Feature having provided featureId)   \n`addedDate`: Date when the feature was updated for the profile   \n`lastUpdateDate`: Date when the feature was updated for the profile   \n`isEnabled`: In case feature has type boolean (on/off), is the feature enabled   \n`limitMin`: In case feature has type number, limit min of the feature (if applicable)   \n`limitMax`: In case feature has type number, limit max of the feature (if applicable)",
          "type": "string"
        }
      }
    },
    "admin_PostRainbowProfilesFeatures": {
      "type": "object",
      "properties": {
        "isEnabled": {
          "description": "In case feature has type boolean (on/off), indicates if the feature enabled.",
          "type": "boolean"
        },
        "limitMin": {
          "description": "In case feature has type number, limit min of the feature (if applicable).",
          "type": "number"
        },
        "limitMax": {
          "description": "In case feature has type number, limit max of the feature (if applicable).",
          "type": "number"
        }
      }
    },
    "admin_PostRainbowProfilesFeaturesSuccess": {
      "required": [
        "featureId",
        "featureName",
        "featureUniqueRef",
        "featureType",
        "addedDate",
        "lastUpdateDate"
      ],
      "type": "object",
      "properties": {
        "featureId": {
          "description": "Feature unique identifier",
          "type": "string"
        },
        "featureName": {
          "description": "Feature name",
          "type": "string"
        },
        "featureUniqueRef": {
          "description": "Feature unique reference (to be used for controls on limitations linked to this feature in server/client code)",
          "type": "string"
        },
        "featureType": {
          "description": "Feature limitation type (`boolean`, `number`, `string`, `undefined`)",
          "type": "string"
        },
        "addedDate": {
          "format": "date-time",
          "description": "Date when the feature was updated for the profile",
          "type": "string"
        },
        "lastUpdateDate": {
          "format": "date-time",
          "description": "Date when the feature was updated for the profile",
          "type": "string"
        },
        "isEnabled": {
          "description": "In case feature has type boolean (on/off), is the feature enabled",
          "type": "boolean"
        },
        "limitMin": {
          "description": "In case feature has type number, limit min of the feature (if applicable)",
          "type": "number"
        },
        "limitMax": {
          "description": "In case feature has type number, limit max of the feature (if applicable)",
          "type": "number"
        }
      }
    },
    "admin_PutRainbowProfilesFeatures": {
      "type": "object",
      "properties": {
        "isEnabled": {
          "description": "In case feature has type boolean (on/off), indicates if the feature enabled.",
          "type": "boolean"
        },
        "limitMin": {
          "description": "In case feature has type number, limit min of the feature (if applicable).",
          "type": "number"
        },
        "limitMax": {
          "description": "In case feature has type number, limit max of the feature (if applicable).",
          "type": "number"
        }
      }
    },
    "admin_PutRainbowProfilesFeaturesSuccess": {
      "required": [
        "featureId",
        "featureName",
        "featureUniqueRef",
        "featureType",
        "addedDate",
        "lastUpdateDate"
      ],
      "type": "object",
      "properties": {
        "featureId": {
          "description": "Feature unique identifier",
          "type": "string"
        },
        "featureName": {
          "description": "Feature name",
          "type": "string"
        },
        "featureUniqueRef": {
          "description": "Feature unique reference (to be used for controls on limitations linked to this feature in server/client code)",
          "type": "string"
        },
        "featureType": {
          "description": "Feature limitation type (`boolean`, `number`, `string`, `undefined`)",
          "type": "string"
        },
        "addedDate": {
          "format": "date-time",
          "description": "Date when the feature was updated for the profile",
          "type": "string"
        },
        "lastUpdateDate": {
          "format": "date-time",
          "description": "Date when the feature was updated for the profile",
          "type": "string"
        },
        "isEnabled": {
          "description": "In case feature has type boolean (on/off), is the feature enabled",
          "type": "boolean"
        },
        "limitMin": {
          "description": "In case feature has type number, limit min of the feature (if applicable)",
          "type": "number"
        },
        "limitMax": {
          "description": "In case feature has type number, limit max of the feature (if applicable)",
          "type": "number"
        }
      }
    },
    "GetApiRainbowAdminV10RoomsSuccess": {
      "required": [
        "limit",
        "offset",
        "total",
        "data"
      ],
      "type": "object",
      "properties": {
        "limit": {
          "description": "",
          "type": "number"
        },
        "offset": {
          "description": "",
          "type": "number"
        },
        "total": {
          "description": "",
          "type": "number"
        },
        "data": {
          "description": "",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetApiRainbowAdminV10RoomsSuccess_data"
          }
        }
      }
    },
    "GetApiRainbowAdminV10RoomsSuccess_data": {
      "required": [
        "name",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "",
          "type": "string"
        },
        "id": {
          "description": "",
          "type": "string"
        }
      }
    },
    "GetRainbowChangeLogSuccess": {
      "required": [
        "GetRainbowChangeLogResponse"
      ],
      "type": "object",
      "properties": {
        "GetRainbowChangeLogResponse": {
          "required": [
            "data"
          ],
          "type": "object",
          "properties": {
            "data": {
              "required": [
                "changeLog"
              ],
              "type": "object",
              "properties": {
                "changeLog": {
                  "description": "",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "PutRainbowChange": {
      "required": [
        "changeLog"
      ],
      "type": "object",
      "properties": {
        "changeLog": {
          "description": "The content of a change log   \nMax number of characters for the changelog is configurable in the portal's configuration (default: 50000 characters)",
          "type": "string"
        }
      }
    },
    "PutRainbowChangeSuccess": {
      "required": [
        "changes"
      ],
      "type": "object",
      "properties": {
        "changes": {
          "description": "TBC",
          "type": "string"
        }
      }
    },
    "DeleteIceServersSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "PutIceServers": {
      "required": [
        "urls"
      ],
      "type": "object",
      "properties": {
        "urls": {
          "description": "ICE server url",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminUrl": {
          "description": "Admin URL for COTURN management",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminLogin": {
          "description": "Admin login for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminPassword": {
          "description": "Admin password for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "dc": {
          "description": "Data Center identifier where the iceServer is hosted",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "PutIceServersSuccess": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "GetIceServersSuccess": {
      "required": [
        "GetIceServersResponse"
      ],
      "type": "object",
      "properties": {
        "GetIceServersResponse": {
          "required": [
            "data"
          ],
          "type": "object",
          "properties": {
            "data": {
              "description": "Data",
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "PostIceServers": {
      "required": [
        "urls"
      ],
      "type": "object",
      "properties": {
        "urls": {
          "description": "ICE server url",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminUrl": {
          "description": "Admin URL for COTURN management",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminLogin": {
          "description": "Admin login for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminPassword": {
          "description": "Admin password for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "dc": {
          "description": "Data Center identifier where the iceServer is hosted",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "PostIceServersSuccess": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "DeleteSitesSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetSitesIdSuccess": {
      "required": [
        "name",
        "settings",
        "id",
        "status",
        "creationDate",
        "statusUpdatedDate"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "settings": {
          "required": [
            "iceServers"
          ],
          "type": "object",
          "properties": {
            "iceServers": {
              "description": "",
              "type": "array",
              "items": {
                "$ref": "#/definitions/GetSitesIdSuccess_iceServers"
              }
            }
          }
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last site status update (Read only)",
          "type": "string"
        }
      }
    },
    "GetSitesIdSuccess_iceServers": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "PutSites": {
      "required": [
        "companyId"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Site name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "status": {
          "description": "Site status",
          "maxLength": 255,
          "minLength": 3,
          "enum": [
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "companyId": {
          "description": "Id of the company from which the site is linked.",
          "type": "string"
        }
      }
    },
    "PutSitesSuccess": {
      "required": [
        "name",
        "settings",
        "id",
        "status",
        "creationDate",
        "statusUpdatedDate"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "settings": {
          "required": [
            "iceServers"
          ],
          "type": "object",
          "properties": {
            "iceServers": {
              "description": "",
              "type": "array",
              "items": {
                "$ref": "#/definitions/PutSitesSuccess_iceServers"
              }
            }
          }
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last site status update (Read only)",
          "type": "string"
        }
      }
    },
    "PutSitesSuccess_iceServers": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "GetSitesSuccess": {
      "required": [
        "name",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        }
      }
    },
    "PostSites": {
      "required": [
        "name",
        "status",
        "companyId"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Site name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "status": {
          "description": "Site status",
          "enum": [
            "active",
            "alerting",
            "hold",
            "terminated"
          ],
          "type": "string"
        },
        "companyId": {
          "description": "Id of the company from which the site is linked.",
          "type": "string"
        }
      }
    },
    "PostSitesSuccess": {
      "required": [
        "name",
        "settings",
        "id",
        "status",
        "creationDate",
        "statusUpdatedDate"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "settings": {
          "required": [
            "iceServers"
          ],
          "type": "object",
          "properties": {
            "iceServers": {
              "description": "",
              "type": "array",
              "items": {
                "$ref": "#/definitions/PostSitesSuccess_iceServers"
              }
            }
          }
        },
        "id": {
          "description": "Company unique identifier",
          "type": "string"
        },
        "status": {
          "description": "Company status",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "Company creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last site status update (Read only)",
          "type": "string"
        }
      }
    },
    "PostSitesSuccess_iceServers": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "DeleteSiteIceServersSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "PutSiteIceServers": {
      "required": [
        "urls"
      ],
      "type": "object",
      "properties": {
        "urls": {
          "description": "ICE server url",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminUrl": {
          "description": "Admin URL for COTURN management",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminLogin": {
          "description": "Admin login for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminPassword": {
          "description": "Admin password for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "dc": {
          "description": "Data Center identifier where the iceServer is hosted",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "PutSiteIceServersSuccess": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "PostSiteIceServers": {
      "required": [
        "urls"
      ],
      "type": "object",
      "properties": {
        "urls": {
          "description": "ICE server url",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminUrl": {
          "description": "Admin URL for COTURN management",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminLogin": {
          "description": "Admin login for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "adminPassword": {
          "description": "Admin password for COTURN access",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "dc": {
          "description": "Data Center identifier where the iceServer is hosted",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "PostSiteIceServersSuccess": {
      "required": [
        "id",
        "urls"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "ICE server unique identifier",
          "type": "string"
        },
        "urls": {
          "description": "ICE server url",
          "type": "string"
        },
        "username": {
          "description": "ICE server user login",
          "type": "string"
        },
        "credential": {
          "description": "ICE server user password",
          "type": "string"
        }
      }
    },
    "DeleteSiteSystemsSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetSiteSystemsSuccess": {
      "required": [
        "id",
        "pbxId",
        "version"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) identifier ( This is the login to access to XMPP server).",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        }
      }
    },
    "PostSiteSystems": {
      "required": [
        "systemId"
      ],
      "type": "object",
      "properties": {
        "systemId": {
          "description": "System unique identifier { \"systemId\": \"5749ab92245015fe0d36e96a\" }",
          "type": "string"
        }
      }
    },
    "PostSiteSystemsSuccess": {
      "required": [
        "id",
        "name",
        "pbxId",
        "siteId",
        "type",
        "country",
        "version",
        "jid_pbxagent",
        "jid_pbxagent_password",
        "jid_pbxpcg",
        "jid_pbxpcg_password",
        "status",
        "serverPingTimeout",
        "pbxMainBundlePrefix",
        "pbxNumberingTranslator",
        "pbxNationalPrefix",
        "pbxInternationalPrefix",
        "creationDate",
        "statusUpdatedDate",
        "searchResultOrder",
        "isShared",
        "isCentrex",
        "bpId"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) login.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "description": "CCA type",
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "jid_pbxagent": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. > - `created, activating`: This is the public access code. The code must be used by the CCA for the first connection. > - `activated`: This is an Hash code of the private access code, reduced to the last eight digits",
          "type": "string"
        },
        "jid_pbxpcg": {
          "description": "PCG Jabber Id for this system",
          "type": "string"
        },
        "jid_pbxpcg_password": {
          "description": "PCG CCA Jabber Id password for this system",
          "type": "string"
        },
        "status": {
          "description": "CCA status report. (read only) > - `created`: CCA uses a public access code to join rainbow infrastructure (see jid_pbxagent_password field) > - `activating`: Rainbow infrastructure has proposed a private access code to replace the former public access code > - `activated`: CCA has accepted the new access code, that will be used for the next initialization.",
          "default": "created",
          "enum": [
            "created",
            "activating",
            "activated"
          ],
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pbxNumberingTranslator": {
          "description": "list of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostSiteSystemsSuccess_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "System creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last system status update (Read only)",
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies)",
          "type": "boolean"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**",
          "type": "boolean"
        },
        "bpId": {
          "description": "Identifier which links the system to the corresponding Business partner company. Obligatory when a BP admin creates a isCentrex or isShared system not yet used by a company",
          "default": "null",
          "type": "string"
        }
      }
    },
    "PostSiteSystemsSuccess_pbxNumberingTranslator": {
      "required": [
        "regexpMatch",
        "regexpReplace",
        "description"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule * @apiSuccess {Boolean} usePbxMainBundlePrefix Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "string"
        }
      }
    },
    "DeleteSystemsSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetSystemsIdSuccess": {
      "required": [
        "activatingTransactionId",
        "jid_pbxagent_password_activating",
        "id",
        "name",
        "pbxId",
        "siteId",
        "type",
        "country",
        "version",
        "jid_pbxagent",
        "jid_pbxagent_password",
        "jid_pbxpcg",
        "jid_pbxpcg_password",
        "status",
        "serverPingTimeout",
        "pbxMainBundlePrefix",
        "pbxNumberingTranslator",
        "pbxNationalPrefix",
        "pbxInternationalPrefix",
        "creationDate",
        "statusUpdatedDate",
        "searchResultOrder",
        "isShared",
        "isCentrex",
        "bpId"
      ],
      "type": "object",
      "properties": {
        "activatingTransactionId": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password_activating": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. The value of this field is depending on 'status' field.   \n- `activating`: This is a proposal of private access code sent to CCA and not yet acknowledged.   \n- `created, activated`: Empty string",
          "type": "string"
        },
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) login.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "description": "CCA type",
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "jid_pbxagent": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. > - `created, activating`: This is the public access code. The code must be used by the CCA for the first connection. > - `activated`: This is an Hash code of the private access code, reduced to the last eight digits",
          "type": "string"
        },
        "jid_pbxpcg": {
          "description": "PCG Jabber Id for this system",
          "type": "string"
        },
        "jid_pbxpcg_password": {
          "description": "PCG CCA Jabber Id password for this system",
          "type": "string"
        },
        "status": {
          "description": "CCA status report. (read only) > - `created`: CCA uses a public access code to join rainbow infrastructure (see jid_pbxagent_password field) > - `activating`: Rainbow infrastructure has proposed a private access code to replace the former public access code > - `activated`: CCA has accepted the new access code, that will be used for the next initialization.",
          "default": "created",
          "enum": [
            "created",
            "activating",
            "activated"
          ],
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pbxNumberingTranslator": {
          "description": "list of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetSystemsIdSuccess_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "System creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last system status update (Read only)",
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies)",
          "type": "boolean"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**",
          "type": "boolean"
        },
        "bpId": {
          "description": "Identifier which links the system to the corresponding Business partner company. Obligatory when a BP admin creates a isCentrex or isShared system not yet used by a company",
          "default": "null",
          "type": "string"
        }
      }
    },
    "GetSystemsIdSuccess_pbxNumberingTranslator": {
      "required": [
        "regexpMatch",
        "regexpReplace",
        "description"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule * @apiSuccess {Boolean} usePbxMainBundlePrefix Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "string"
        }
      }
    },
    "PutSystems": {
      "type": "object",
      "properties": {
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "string"
        },
        "type": {
          "description": "CCA type (Call Control Agent).",
          "enum": [
            "oxo",
            "oxe",
            "third_party",
            "undefined"
          ],
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "default": "120",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "string"
        },
        "usePbxMainBundlePrefix": {
          "description": "Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "boolean"
        },
        "pbxNumberingTranslator": {
          "description": "List of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutSystems_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "maxLength": 32,
          "minLength": 0,
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "maxLength": 32,
          "minLength": 0,
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies). \n\n* isShared flag can't be set to true if isCentrex flag is true (these settings are exclusives).\n* Shared systems can be linked to several sites from different companies.\n* Several shared PBX can be attached to a same Rainbow company, as well as \"standard\" systems (i.e. systems without isShared flag, and so being linked only to this company).\n* Companies being linked to shared PBX can't be attached to centrex systems.\n* It is understood that this approach exposes all users of the shared PBX to all companies that have users on this PBX (for association, for dial by name).   \nAnyway it seats on a PBX infra where all PBX users can directly dial (by short num and DBN) any other users of the network from their deskphones.\n* In cases the underlying infra is an homogeneous network of PBX, PBX grouping has to be managed.\n* isShared flag can be updated to true only if the system has `isCentrex`=false and is linked to at least one site or if a bpId is set.\n* isShared flag can be updated to false only if the system is linked to one site (exactly). In that case, bpId field is automatically reset to null.\n\n",
          "type": "boolean"
        },
        "bpId": {
          "description": "Link the system to the corresponding Business partner company.   \n`bpId` must correspond to a valid company having `isBP` equal to true.   \nOnly directly settable by `superadmin`.",
          "type": "string"
        }
      }
    },
    "PutSystems_pbxNumberingTranslator": {
      "required": [
        "regexpMatch"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "PutSystemsSuccess": {
      "required": [
        "id",
        "name",
        "pbxId",
        "siteId",
        "type",
        "country",
        "version",
        "jid_pbxagent",
        "jid_pbxagent_password",
        "jid_pbxpcg",
        "jid_pbxpcg_password",
        "status",
        "serverPingTimeout",
        "pbxMainBundlePrefix",
        "pbxNumberingTranslator",
        "pbxNationalPrefix",
        "pbxInternationalPrefix",
        "creationDate",
        "statusUpdatedDate",
        "searchResultOrder",
        "isShared",
        "isCentrex",
        "bpId"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) login.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "description": "CCA type",
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "jid_pbxagent": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. > - `created, activating`: This is the public access code. The code must be used by the CCA for the first connection. > - `activated`: This is an Hash code of the private access code, reduced to the last eight digits",
          "type": "string"
        },
        "jid_pbxpcg": {
          "description": "PCG Jabber Id for this system",
          "type": "string"
        },
        "jid_pbxpcg_password": {
          "description": "PCG CCA Jabber Id password for this system",
          "type": "string"
        },
        "status": {
          "description": "CCA status report. (read only) > - `created`: CCA uses a public access code to join rainbow infrastructure (see jid_pbxagent_password field) > - `activating`: Rainbow infrastructure has proposed a private access code to replace the former public access code > - `activated`: CCA has accepted the new access code, that will be used for the next initialization.",
          "default": "created",
          "enum": [
            "created",
            "activating",
            "activated"
          ],
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pbxNumberingTranslator": {
          "description": "list of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutSystemsSuccess_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "System creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last system status update (Read only)",
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies)",
          "type": "boolean"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**",
          "type": "boolean"
        },
        "bpId": {
          "description": "Identifier which links the system to the corresponding Business partner company. Obligatory when a BP admin creates a isCentrex or isShared system not yet used by a company",
          "default": "null",
          "type": "string"
        }
      }
    },
    "PutSystemsSuccess_pbxNumberingTranslator": {
      "required": [
        "regexpMatch",
        "regexpReplace",
        "description"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule * @apiSuccess {Boolean} usePbxMainBundlePrefix Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "string"
        }
      }
    },
    "GetSystemsSuccess": {
      "required": [
        "id",
        "pbxId",
        "version"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) identifier ( This is the login to access to XMPP server).",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        }
      }
    },
    "PostSystems": {
      "required": [
        "name",
        "siteId",
        "type",
        "country"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "CCA (Call Control Agent) hosted by a System needs an account to XMPP. This is the login to access to XMPP server. **It should be given during system creation or automatically generated**.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "string"
        },
        "type": {
          "description": "CCA type.",
          "enum": [
            "oxo",
            "oxe",
            "third party",
            "undefined"
          ],
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "default": "120",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data: array of String",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "usePbxMainBundlePrefix": {
          "description": "Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "boolean"
        },
        "pbxNumberingTranslator": {
          "description": "List of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostSystems_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "maxLength": 32,
          "minLength": 0,
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "maxLength": 32,
          "minLength": 0,
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "activationCode": {
          "description": "Currently, the activation code is a random 4 digits value (between 1000 and 9999) generated by the admin portal. With activationCode field, it's possible to set a custom value. In the Http success response the value is available in the 'jid_pbxagent_password' field. **activationCode is only taken in account during a system creation.**",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**. \n\n* isCentrex flag can't be set to true if isShared flag is true (these settings are exclusives).\n\n",
          "default": "false",
          "type": "boolean"
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies). \n\n* isShared flag can't be set to true if isCentrex flag is true (these settings are exclusives).\n* Shared systems can be linked to several sites from different companies.\n* Several shared PBX can be attached to a same Rainbow company, as well as \"standard\" systems (i.e. systems without isShared flag, and so being linked only to this company).\n* Companies being linked to shared PBX can't be attached to centrex systems.\n* It is understood that this approach exposes all users of the shared PBX to all companies that have users on this PBX (for association, for dial by name).   \nAnyway it seats on a PBX infra where all PBX users can directly dial (by short num and DBN) any other users of the network from their deskphones.\n* In cases the underlying infra is an homogeneous network of PBX, PBX grouping has to be managed.\n\n",
          "default": "false",
          "type": "boolean"
        },
        "bpId": {
          "description": "Link the system to the corresponding Business partner company.   \n`bpId` must correspond to a valid company having `isBP` equal to true.   \nOnly directly settable by `superadmin`.   \nIf the system is **created** by a `bp_admin`, `bpId` is automatically set to bp_admin's system `id`.",
          "type": "string"
        }
      }
    },
    "PostSystems_pbxNumberingTranslator": {
      "required": [
        "regexpMatch"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "maxLength": 64,
          "minLength": 0,
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "PostSystemsSuccess": {
      "required": [
        "id",
        "name",
        "pbxId",
        "siteId",
        "type",
        "country",
        "version",
        "jid_pbxagent",
        "jid_pbxagent_password",
        "jid_pbxpcg",
        "jid_pbxpcg_password",
        "status",
        "serverPingTimeout",
        "pbxMainBundlePrefix",
        "pbxNumberingTranslator",
        "pbxNationalPrefix",
        "pbxInternationalPrefix",
        "creationDate",
        "statusUpdatedDate",
        "searchResultOrder",
        "isShared",
        "isCentrex",
        "bpId"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) login.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "description": "CCA type",
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "jid_pbxagent": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. > - `created, activating`: This is the public access code. The code must be used by the CCA for the first connection. > - `activated`: This is an Hash code of the private access code, reduced to the last eight digits",
          "type": "string"
        },
        "jid_pbxpcg": {
          "description": "PCG Jabber Id for this system",
          "type": "string"
        },
        "jid_pbxpcg_password": {
          "description": "PCG CCA Jabber Id password for this system",
          "type": "string"
        },
        "status": {
          "description": "CCA status report. (read only) > - `created`: CCA uses a public access code to join rainbow infrastructure (see jid_pbxagent_password field) > - `activating`: Rainbow infrastructure has proposed a private access code to replace the former public access code > - `activated`: CCA has accepted the new access code, that will be used for the next initialization.",
          "default": "created",
          "enum": [
            "created",
            "activating",
            "activated"
          ],
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pbxNumberingTranslator": {
          "description": "list of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostSystemsSuccess_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "System creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last system status update (Read only)",
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies)",
          "type": "boolean"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**",
          "type": "boolean"
        },
        "bpId": {
          "description": "Identifier which links the system to the corresponding Business partner company. Obligatory when a BP admin creates a isCentrex or isShared system not yet used by a company",
          "default": "null",
          "type": "string"
        }
      }
    },
    "PostSystemsSuccess_pbxNumberingTranslator": {
      "required": [
        "regexpMatch",
        "regexpReplace",
        "description"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule * @apiSuccess {Boolean} usePbxMainBundlePrefix Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "string"
        }
      }
    },
    "GetSystemsIdByPbxIdSuccess": {
      "required": [
        "activatingTransactionId",
        "jid_pbxagent_password_activating",
        "id",
        "name",
        "pbxId",
        "siteId",
        "type",
        "country",
        "version",
        "jid_pbxagent",
        "jid_pbxagent_password",
        "jid_pbxpcg",
        "jid_pbxpcg_password",
        "status",
        "serverPingTimeout",
        "pbxMainBundlePrefix",
        "pbxNumberingTranslator",
        "pbxNationalPrefix",
        "pbxInternationalPrefix",
        "creationDate",
        "statusUpdatedDate",
        "searchResultOrder",
        "isShared",
        "isCentrex",
        "bpId"
      ],
      "type": "object",
      "properties": {
        "activatingTransactionId": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password_activating": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. The value of this field is depending on 'status' field.   \n- `activating`: This is a proposal of private access code sent to CCA and not yet acknowledged.   \n- `created, activated`: Empty string",
          "type": "string"
        },
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) login.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "description": "CCA type",
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "jid_pbxagent": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. > - `created, activating`: This is the public access code. The code must be used by the CCA for the first connection. > - `activated`: This is an Hash code of the private access code, reduced to the last eight digits",
          "type": "string"
        },
        "jid_pbxpcg": {
          "description": "PCG Jabber Id for this system",
          "type": "string"
        },
        "jid_pbxpcg_password": {
          "description": "PCG CCA Jabber Id password for this system",
          "type": "string"
        },
        "status": {
          "description": "CCA status report. (read only) > - `created`: CCA uses a public access code to join rainbow infrastructure (see jid_pbxagent_password field) > - `activating`: Rainbow infrastructure has proposed a private access code to replace the former public access code > - `activated`: CCA has accepted the new access code, that will be used for the next initialization.",
          "default": "created",
          "enum": [
            "created",
            "activating",
            "activated"
          ],
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pbxNumberingTranslator": {
          "description": "list of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetSystemsIdByPbxIdSuccess_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "System creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last system status update (Read only)",
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies)",
          "type": "boolean"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**",
          "type": "boolean"
        },
        "bpId": {
          "description": "Identifier which links the system to the corresponding Business partner company. Obligatory when a BP admin creates a isCentrex or isShared system not yet used by a company",
          "default": "null",
          "type": "string"
        }
      }
    },
    "GetSystemsIdByPbxIdSuccess_pbxNumberingTranslator": {
      "required": [
        "regexpMatch",
        "regexpReplace",
        "description"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule * @apiSuccess {Boolean} usePbxMainBundlePrefix Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "string"
        }
      }
    },
    "DeleteSystemsFromGroupIdSuccess": {
      "required": [
        "name",
        "companies",
        "systems",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Group name describing a private network of pabx",
          "type": "string"
        },
        "companies": {
          "description": "List of Company unique identifier.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "systems": {
          "description": "List of Objects (systemId : Systems unique identifier, pbxId : Call Control Agent (CCA) login)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DeleteSystemsFromGroupIdSuccess_systems"
          }
        },
        "id": {
          "description": "SystemsGroup unique identifier",
          "type": "string"
        }
      }
    },
    "DeleteSystemsFromGroupIdSuccess_systems": {
      "required": [
        "systemId",
        "pbxId"
      ],
      "type": "object",
      "properties": {
        "systemId": {
          "description": "",
          "type": "string"
        },
        "pbxId": {
          "description": "",
          "type": "string"
        }
      }
    },
    "PutSystemsGroupIdSuccess": {
      "required": [
        "name",
        "companies",
        "systems",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Group name describing a private network of pabx",
          "type": "string"
        },
        "companies": {
          "description": "List of Company unique identifier.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "systems": {
          "description": "List of Objects (systemId : Systems unique identifier, pbxId : Call Control Agent (CCA) login)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutSystemsGroupIdSuccess_systems"
          }
        },
        "id": {
          "description": "SystemsGroup unique identifier",
          "type": "string"
        }
      }
    },
    "PutSystemsGroupIdSuccess_systems": {
      "required": [
        "systemId",
        "pbxId"
      ],
      "type": "object",
      "properties": {
        "systemId": {
          "description": "",
          "type": "string"
        },
        "pbxId": {
          "description": "",
          "type": "string"
        }
      }
    },
    "DeleteSystemsGroupIdSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetSystemsGroupIdSuccess": {
      "required": [
        "name",
        "companies",
        "systems",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Group name describing a private network of pabx",
          "type": "string"
        },
        "companies": {
          "description": "List of Company unique identifier.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "systems": {
          "description": "List of Objects (systemId : Systems unique identifier, pbxId : Call Control Agent (CCA) login)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetSystemsGroupIdSuccess_systems"
          }
        },
        "id": {
          "description": "SystemsGroup unique identifier",
          "type": "string"
        }
      }
    },
    "GetSystemsGroupIdSuccess_systems": {
      "required": [
        "systemId",
        "pbxId"
      ],
      "type": "object",
      "properties": {
        "systemId": {
          "description": "",
          "type": "string"
        },
        "pbxId": {
          "description": "",
          "type": "string"
        }
      }
    },
    "PutSystemsGroupNameId": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Group name describing a private network of pabx",
          "type": "string"
        }
      }
    },
    "PutSystemsGroupNameIdSuccess": {
      "required": [
        "name",
        "companies",
        "systems",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Group name describing a private network of pabx",
          "type": "string"
        },
        "companies": {
          "description": "List of Company unique identifier.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "systems": {
          "description": "List of Objects (systemId : Systems unique identifier, pbxId : Call Control Agent (CCA) login)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutSystemsGroupNameIdSuccess_systems"
          }
        },
        "id": {
          "description": "SystemsGroup unique identifier",
          "type": "string"
        }
      }
    },
    "PutSystemsGroupNameIdSuccess_systems": {
      "required": [
        "systemId",
        "pbxId"
      ],
      "type": "object",
      "properties": {
        "systemId": {
          "description": "",
          "type": "string"
        },
        "pbxId": {
          "description": "",
          "type": "string"
        }
      }
    },
    "GetSystemsGroupsSuccess": {
      "required": [
        "name",
        "companies",
        "systems",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Group name describing a private network of pabx",
          "type": "string"
        },
        "companies": {
          "description": "List of Company unique identifier.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "systems": {
          "description": "List of Objects (systemId : Systems unique identifier, pbxId : Call Control Agent (CCA) login)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetSystemsGroupsSuccess_systems"
          }
        },
        "id": {
          "description": "SystemsGroup unique identifier",
          "type": "string"
        }
      }
    },
    "GetSystemsGroupsSuccess_systems": {
      "required": [
        "systemId",
        "pbxId"
      ],
      "type": "object",
      "properties": {
        "systemId": {
          "description": "",
          "type": "string"
        },
        "pbxId": {
          "description": "",
          "type": "string"
        }
      }
    },
    "PostSystemsGroups": {
      "required": [
        "name",
        "companies"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Group name describing a private network of pabx",
          "type": "string"
        },
        "companies": {
          "description": "List of Company unique identifier. A least one Id. This field is wanted to classify SystemsGroups inside the rainbow infrastructure.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "systems": {
          "description": "List of Systems unique identifier. May be empty. Several checks were done. Possible error cases are: (404 not found), (409 conflict - Systems already belongs to another group), (403 forbidden - one of the systems mustn't be administrated by the administrator)",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "PostSystemsGroupsSuccess": {
      "required": [
        "name",
        "companies",
        "systems",
        "id"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Group name describing a private network of pabx",
          "type": "string"
        },
        "companies": {
          "description": "List of Company unique identifier.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "systems": {
          "description": "List of Objects (systemId : Systems unique identifier, pbxId : Call Control Agent (CCA) login)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostSystemsGroupsSuccess_systems"
          }
        },
        "id": {
          "description": "SystemsGroup unique identifier",
          "type": "string"
        }
      }
    },
    "PostSystemsGroupsSuccess_systems": {
      "required": [
        "systemId",
        "pbxId"
      ],
      "type": "object",
      "properties": {
        "systemId": {
          "description": "",
          "type": "string"
        },
        "pbxId": {
          "description": "",
          "type": "string"
        }
      }
    },
    "GetSystemPhoneNumbersSuccess": {
      "required": [
        "id",
        "shortNumber",
        "internalNumber",
        "voiceMailNumber",
        "number",
        "numberE164",
        "pbxUserId",
        "userId",
        "jid_im",
        "jid_tel",
        "jid_password",
        "country",
        "type",
        "deviceType",
        "isFromSystem",
        "pbxId",
        "firstName",
        "lastName",
        "deviceName",
        "systemId",
        "isMonitored",
        "isNomadic"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Phone number unique identifier",
          "type": "string"
        },
        "shortNumber": {
          "description": "Short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number.   \nUsable within a PBX group.",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "number": {
          "description": "DDI phone number",
          "type": "string"
        },
        "numberE164": {
          "description": "E.164 phone number (computed by server if number is set)",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "userId": {
          "description": "Rainbow userId to which the phone number is linked",
          "type": "string"
        },
        "jid_im": {
          "description": "jid_im of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_tel": {
          "description": "jid_tel of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_password": {
          "description": "jid_password of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if the phoneNumber is linked to a system (pbx)",
          "type": "string"
        },
        "pbxId": {
          "description": "pbx unique identifier",
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "devicename",
          "type": "string"
        },
        "systemId": {
          "description": "System unique identifier",
          "type": "string"
        },
        "isMonitored": {
          "description": "Specifies if the PhoneNumber is monitored by agent (i.e. telephony events are notified to Rainbow user through XMPP)",
          "type": "boolean"
        },
        "isNomadic": {
          "description": "Specifies if Nomadic set is selected.",
          "type": "boolean"
        }
      }
    },
    "GetSystemPhoneNumbersIdSuccess": {
      "required": [
        "id",
        "shortNumber",
        "internalNumber",
        "voiceMailNumber",
        "number",
        "numberE164",
        "pbxUserId",
        "userId",
        "jid_im",
        "jid_tel",
        "jid_password",
        "country",
        "type",
        "deviceType",
        "isFromSystem",
        "pbxId",
        "firstName",
        "lastName",
        "deviceName",
        "systemId",
        "isMonitored",
        "isNomadic"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Phone number unique identifier",
          "type": "string"
        },
        "shortNumber": {
          "description": "Short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number.   \nUsable within a PBX group.",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "number": {
          "description": "DDI phone number",
          "type": "string"
        },
        "numberE164": {
          "description": "E.164 phone number (computed by server if number is set)",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "userId": {
          "description": "Rainbow userId to which the phone number is linked",
          "type": "string"
        },
        "jid_im": {
          "description": "jid_im of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_tel": {
          "description": "jid_tel of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_password": {
          "description": "jid_password of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if the phoneNumber is linked to a system (pbx)",
          "type": "string"
        },
        "pbxId": {
          "description": "pbx unique identifier",
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "devicename",
          "type": "string"
        },
        "systemId": {
          "description": "System unique identifier",
          "type": "string"
        },
        "isMonitored": {
          "description": "Specifies if the PhoneNumber is monitored by agent (i.e. telephony events are notified to Rainbow user through XMPP)",
          "type": "boolean"
        },
        "isNomadic": {
          "description": "Specifies if Nomadic set is selected.",
          "type": "boolean"
        }
      }
    },
    "PutSystemPhoneNumbers": {
      "type": "object",
      "properties": {
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format)",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "isMonitored": {
          "description": "Specifies if the PhoneNumber is monitored by agent (i.e. telephony events are notified to Rainbow user through XMPP)",
          "type": "boolean"
        },
        "userId": {
          "description": "Rainbow userId to which is linked the phoneNumber",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number. Usable within a PBX group. By default, it is equal to `shortNumber`.   \n`internalNumber` must be unique in the whole system group to which the related PhoneNumber belong (an error 409 is raised if someone tries to update internalNumber to a number already used by another PhoneNumber in the same system group).",
          "type": "string"
        },
        "number": {
          "description": "Raw phone number (DDI) _Note:_ If numberE164 can't be computed from number and country fields, an error 400 is returned (ex: wrong phone number, phone number not matching country code, ...)",
          "type": "string"
        },
        "type": {
          "description": "Phone number type",
          "default": "work",
          "enum": [
            "home",
            "work",
            "other"
          ],
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type",
          "default": "landline",
          "enum": [
            "landline",
            "mobile",
            "fax",
            "other"
          ],
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "device name",
          "type": "string"
        }
      }
    },
    "PutSystemPhoneNumbersSuccess": {
      "required": [
        "id",
        "shortNumber",
        "internalNumber",
        "voiceMailNumber",
        "number",
        "numberE164",
        "pbxUserId",
        "userId",
        "jid_im",
        "jid_tel",
        "jid_password",
        "country",
        "type",
        "deviceType",
        "isFromSystem",
        "pbxId",
        "firstName",
        "lastName",
        "deviceName",
        "systemId",
        "isMonitored",
        "isNomadic"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Phone number unique identifier",
          "type": "string"
        },
        "shortNumber": {
          "description": "Short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.",
          "type": "string"
        },
        "internalNumber": {
          "description": "Internal phone number.   \nUsable within a PBX group.",
          "type": "string"
        },
        "voiceMailNumber": {
          "description": "Voice mail phone number",
          "type": "string"
        },
        "number": {
          "description": "DDI phone number",
          "type": "string"
        },
        "numberE164": {
          "description": "E.164 phone number (computed by server if number is set)",
          "type": "string"
        },
        "pbxUserId": {
          "description": "Pbx's user Id",
          "type": "string"
        },
        "userId": {
          "description": "Rainbow userId to which the phone number is linked",
          "type": "string"
        },
        "jid_im": {
          "description": "jid_im of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_tel": {
          "description": "jid_tel of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "jid_password": {
          "description": "jid_password of the Rainbow user to which the phone number is linked",
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if the phoneNumber is linked to a system (pbx)",
          "type": "string"
        },
        "pbxId": {
          "description": "pbx unique identifier",
          "type": "string"
        },
        "firstName": {
          "description": "firstname",
          "type": "string"
        },
        "lastName": {
          "description": "lastname",
          "type": "string"
        },
        "deviceName": {
          "description": "devicename",
          "type": "string"
        },
        "systemId": {
          "description": "System unique identifier",
          "type": "string"
        },
        "isMonitored": {
          "description": "Specifies if the PhoneNumber is monitored by agent (i.e. telephony events are notified to Rainbow user through XMPP)",
          "type": "boolean"
        },
        "isNomadic": {
          "description": "Specifies if Nomadic set is selected.",
          "type": "boolean"
        }
      }
    },
    "PostSystemsRestPasswordSuccess": {
      "required": [
        "id",
        "name",
        "pbxId",
        "siteId",
        "type",
        "country",
        "version",
        "jid_pbxagent",
        "jid_pbxagent_password",
        "jid_pbxpcg",
        "jid_pbxpcg_password",
        "status",
        "serverPingTimeout",
        "pbxMainBundlePrefix",
        "pbxNumberingTranslator",
        "pbxNationalPrefix",
        "pbxInternationalPrefix",
        "creationDate",
        "statusUpdatedDate",
        "searchResultOrder",
        "isShared",
        "isCentrex",
        "bpId"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "System unique identifier",
          "type": "string"
        },
        "name": {
          "description": "System name/description",
          "type": "string"
        },
        "pbxId": {
          "description": "Call Control Agent (CCA) login.",
          "type": "string"
        },
        "siteId": {
          "description": "Site from which the system is linked with.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "description": "CCA type",
          "type": "string"
        },
        "country": {
          "description": "System country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "version": {
          "description": "CCA software version",
          "type": "string"
        },
        "jid_pbxagent": {
          "description": "CCA Jabber Id",
          "type": "string"
        },
        "jid_pbxagent_password": {
          "description": "CCA Jabber Id access code. The value of this field is depending on status field. > - `created, activating`: This is the public access code. The code must be used by the CCA for the first connection. > - `activated`: This is an Hash code of the private access code, reduced to the last eight digits",
          "type": "string"
        },
        "jid_pbxpcg": {
          "description": "PCG Jabber Id for this system",
          "type": "string"
        },
        "jid_pbxpcg_password": {
          "description": "PCG CCA Jabber Id password for this system",
          "type": "string"
        },
        "status": {
          "description": "CCA status report. (read only) > - `created`: CCA uses a public access code to join rainbow infrastructure (see jid_pbxagent_password field) > - `activating`: Rainbow infrastructure has proposed a private access code to replace the former public access code > - `activated`: CCA has accepted the new access code, that will be used for the next initialization.",
          "default": "created",
          "enum": [
            "created",
            "activating",
            "activated"
          ],
          "type": "string"
        },
        "serverPingTimeout": {
          "description": "CCA config data",
          "type": "string"
        },
        "pbxMainBundlePrefix": {
          "description": "CCA config data",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pbxNumberingTranslator": {
          "description": "list of several regular expressions used to validate internal or external phone numbers. Up to 100 regular expressions are allowed. (64 max char by regexp). To reset the list, use []",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostSystemsRestPasswordSuccess_pbxNumberingTranslator"
          }
        },
        "pbxNationalPrefix": {
          "description": "National prefix",
          "type": "string"
        },
        "pbxInternationalPrefix": {
          "description": "International prefix",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "System creation date (Read only)",
          "type": "string"
        },
        "statusUpdatedDate": {
          "format": "date-time",
          "description": "Date of last system status update (Read only)",
          "type": "string"
        },
        "searchResultOrder": {
          "description": "List of directory types to order search results",
          "enum": [
            "RAINBOW",
            "LDAP",
            "PBX"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isShared": {
          "description": "Indicates if the system is **multi-company** (shared across multiple companies)",
          "type": "boolean"
        },
        "isCentrex": {
          "description": "Indicates if the system is one tenant or **multi-tenant (OXE - OTEC-S)**",
          "type": "boolean"
        },
        "bpId": {
          "description": "Identifier which links the system to the corresponding Business partner company. Obligatory when a BP admin creates a isCentrex or isShared system not yet used by a company",
          "default": "null",
          "type": "string"
        }
      }
    },
    "PostSystemsRestPasswordSuccess_pbxNumberingTranslator": {
      "required": [
        "regexpMatch",
        "regexpReplace",
        "description"
      ],
      "type": "object",
      "properties": {
        "regexpMatch": {
          "description": "A valid regular expression used to select a translator action. \\d is not supported! Use (0..9) instead.",
          "type": "string"
        },
        "regexpReplace": {
          "description": "A valid dialable number.",
          "type": "string"
        },
        "description": {
          "description": "A short description of the rule * @apiSuccess {Boolean} usePbxMainBundlePrefix Whether or not pbxMainBundlePrefix is used by PCG",
          "type": "string"
        }
      }
    },
    "DeleteUsersSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Delete operation status message.",
          "type": "string"
        }
      }
    },
    "GetUsersIdSuccess": {
      "required": [
        "isInDefaultCompany",
        "calendars",
        "isADSearchAvailable",
        "id",
        "loginEmail",
        "firstName",
        "lastName",
        "displayName",
        "nickName",
        "title",
        "jobTitle",
        "emails",
        "phoneNumbers",
        "country",
        "language",
        "timezone",
        "jid_im",
        "jid_tel",
        "jid_password",
        "roles",
        "adminType",
        "companyId",
        "organisationId",
        "siteId",
        "companyName",
        "isActive",
        "isInitialized",
        "initializationDate",
        "activationDate",
        "creationDate",
        "lastUpdateDate",
        "lastAvatarUpdateDate",
        "createdBySelfRegister",
        "createdByAdmin",
        "invitedBy",
        "firstLoginDate",
        "lastLoginDate",
        "loggedSince",
        "isTerminated",
        "guestMode",
        "timeToLive",
        "authenticationType"
      ],
      "type": "object",
      "properties": {
        "isInDefaultCompany": {
          "description": "Is user in default company   \nOnly returned if retrieved user data corresponds to logged in user or if logged in user is admin of the retrieved user",
          "type": "boolean"
        },
        "calendars": {
          "description": "List of associated calendars from external providers configured by the user (office365, google calendar, ...)   \nOnly returned if the requested user is the logged in user.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetUsersIdSuccess_calendars"
          }
        },
        "isADSearchAvailable": {
          "description": "Is ActiveDirectory (Office365) search available for this user",
          "type": "boolean"
        },
        "id": {
          "description": "User unique identifier",
          "type": "string"
        },
        "loginEmail": {
          "description": "User email address (used for login)",
          "type": "string"
        },
        "firstName": {
          "description": "User first name",
          "type": "string"
        },
        "lastName": {
          "description": "User last name",
          "type": "string"
        },
        "displayName": {
          "description": "User display name (firstName + lastName concatenated on server side)",
          "type": "string"
        },
        "nickName": {
          "description": "User nickName",
          "type": "string"
        },
        "title": {
          "description": "User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)",
          "type": "string"
        },
        "jobTitle": {
          "description": "User job title",
          "type": "string"
        },
        "emails": {
          "description": "Array of user emails addresses objects",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetUsersIdSuccess_emails"
          }
        },
        "phoneNumbers": {
          "description": "Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetUsersIdSuccess_phoneNumbers"
          }
        },
        "country": {
          "description": "User country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "language": {
          "description": "User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)",
          "type": "string"
        },
        "timezone": {
          "description": "User timezone name",
          "type": "string"
        },
        "jid_im": {
          "description": "User Jabber IM identifier",
          "type": "string"
        },
        "jid_tel": {
          "description": "User Jabber TEL identifier",
          "type": "string"
        },
        "jid_password": {
          "description": "User Jabber IM and TEL password",
          "type": "string"
        },
        "roles": {
          "description": "List of user roles (Array of String)   \nNote: `company_support` role is only used for support redirection. If a user writes a #support ticket and have the role `company_support`, the ticket will be sent to ALE's support (otherwise the ticket is sent to user's company's `supportEmail` address is set, ALE otherwise).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminType": {
          "description": "In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)",
          "type": "string"
        },
        "companyId": {
          "description": "User company unique identifier",
          "type": "string"
        },
        "organisationId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to an organization",
          "type": "string"
        },
        "siteId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to a site",
          "type": "string"
        },
        "companyName": {
          "description": "User company name",
          "type": "string"
        },
        "isActive": {
          "description": "Is user active",
          "type": "boolean"
        },
        "isInitialized": {
          "description": "Is user initialized",
          "type": "boolean"
        },
        "initializationDate": {
          "format": "date-time",
          "description": "User initialization date",
          "type": "string"
        },
        "activationDate": {
          "format": "date-time",
          "description": "User activation date",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "User creation date",
          "type": "string"
        },
        "lastUpdateDate": {
          "format": "date-time",
          "description": "Date of last user update (whatever the field updated)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last user avatar create/update, null if no avatar",
          "type": "string"
        },
        "createdBySelfRegister": {
          "description": "true if user has been created using self register",
          "type": "boolean"
        },
        "createdByAdmin": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "invitedBy": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "firstLoginDate": {
          "format": "date-time",
          "description": "Date of first user login (only set the first time user logs in, null if user never logged in)",
          "type": "string"
        },
        "lastLoginDate": {
          "format": "date-time",
          "description": "Date of last user login (defined even if user is logged out)",
          "type": "string"
        },
        "loggedSince": {
          "format": "date-time",
          "description": "Date of last user login (null if user is logged out)",
          "type": "string"
        },
        "isTerminated": {
          "description": "Indicates if the Rainbow account of this user has been deleted",
          "type": "boolean"
        },
        "guestMode": {
          "description": "Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration.",
          "type": "boolean"
        },
        "timeToLive": {
          "description": "Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire).",
          "type": "number"
        },
        "authenticationType": {
          "description": "User authentication type (if not set company default authentication will be used)",
          "type": "string"
        }
      }
    },
    "GetUsersIdSuccess_calendars": {
      "required": [
        "email",
        "enabled"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "Calendar email   \nOnly returned if the requested user is the logged in user.",
          "type": "string"
        },
        "enabled": {
          "description": "Boolean indicating if the calendar synchronisation from external provider to Rainbow is enabled   \nOnly returned if the requested user is the logged in user.",
          "type": "boolean"
        }
      }
    },
    "GetUsersIdSuccess_emails": {
      "required": [
        "email",
        "type"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "User email address",
          "type": "string"
        },
        "type": {
          "description": "Email type, one of `home`, `work`, `other`",
          "type": "string"
        }
      }
    },
    "GetUsersIdSuccess_phoneNumbers": {
      "required": [
        "phoneNumberId",
        "number",
        "numberE164",
        "country",
        "isFromSystem",
        "shortNumber",
        "internalNumber",
        "systemId",
        "pbxId",
        "type",
        "deviceType"
      ],
      "type": "object",
      "properties": {
        "phoneNumberId": {
          "description": "Phone number unique id in directory collection.",
          "type": "string"
        },
        "number": {
          "description": "User phone number (as entered by user)",
          "type": "string"
        },
        "numberE164": {
          "description": "User E.164 phone number, computed by server from number and country fields",
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field.",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if phone is linked to a system (pbx).",
          "type": "boolean"
        },
        "shortNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field.",
          "type": "string"
        },
        "internalNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field.",
          "type": "string"
        },
        "systemId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database.",
          "type": "string"
        },
        "pbxId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx.",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`.",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`.",
          "type": "string"
        }
      }
    },
    "PutUsers": {
      "type": "object",
      "properties": {
        "loginEmail": {
          "description": "User email address (used for login).   \nMust be unique (409 error is returned if a user already exists with the same email address).",
          "maxLength": 255,
          "minLength": 3,
          "type": "string"
        },
        "password": {
          "description": "User password.   \nRules: more than 8 characters, at least 1 capital letter, 1 number, 1 special character.",
          "maxLength": 64,
          "minLength": 8,
          "type": "string"
        },
        "phoneNumbers": {
          "description": "Array of user PhoneNumbers objects   \n  \n_Notes:_* Provided PhoneNumbers data overwrite previous values: \n  * PhoneNumbers which are not known on server side are added,\n  * PhoneNumbers which are changed are updated,\n  * PhoneNumbers which are not provided but existed on server side are deleted.\n  * This does not applies to PhoneNumbers linked to a system(pbx), which can only be updated (addition and deletion of system PhoneNumbers are ignored).\n* When number is present, the server tries to compute the associated E.164 number (`numberE164` field) using provided PhoneNumber country if available, user country otherwise. If `numberE164` can't be computed, an error 400 is returned (ex: wrong phone number, phone number not matching country code, ...)\n* PhoneNumber linked to a system (pbx) can also be updated. In that case, `shortNumber` and `systemId` of the existing system PhoneNumber must be provided with the fields to update (see example bellow).\n* System phoneNumbers can't be created nor deleted using this API, only PCG can create/delete system PhoneNumbers.\n\n",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutUsers_phoneNumbers"
          }
        },
        "firstName": {
          "description": "User first name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "lastName": {
          "description": "User last name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "nickName": {
          "description": "User nickName",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "title": {
          "description": "User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)",
          "maxLength": 40,
          "minLength": 1,
          "type": "string"
        },
        "jobTitle": {
          "description": "User job title",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "emails": {
          "description": "Array of user emails addresses objects",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutUsers_emails"
          }
        },
        "country": {
          "description": "User country (ISO 3166-1 alpha3 format)",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.   \nUSA states code list: `AA`:\"Armed Forces America\",\n`AE`:\"Armed Forces\",\n`AP`:\"Armed Forces Pacific\",\n`AK`:\"Alaska\",\n`AL`:\"Alabama\",\n`AR`:\"Arkansas\",\n`AZ`:\"Arizona\",\n`CA`:\"California\",\n`CO`:\"Colorado\",\n`CT`:\"Connecticut\",\n`DC`:\"Washington DC\",\n`DE`:\"Delaware\",\n`FL`:\"Florida\",\n`GA`:\"Georgia\",\n`GU`:\"Guam\",\n`HI`:\"Hawaii\",\n`IA`:\"Iowa\",\n`ID`:\"Idaho\",\n`IL`:\"Illinois\",\n`IN`:\"Indiana\",\n`KS`:\"Kansas\",\n`KY`:\"Kentucky\",\n`LA`:\"Louisiana\",\n`MA`:\"Massachusetts\",\n`MD`:\"Maryland\",\n`ME`:\"Maine\",\n`MI`:\"Michigan\",\n`MN`:\"Minnesota\",\n`MO`:\"Missouri\",\n`MS`:\"Mississippi\",\n`MT`:\"Montana\",\n`NC`:\"North Carolina\",\n`ND`:\"North Dakota\",\n`NE`:\"Nebraska\",\n`NH`:\"New Hampshire\",\n`NJ`:\"New Jersey\",\n`NM`:\"New Mexico\",\n`NV`:\"Nevada\",\n`NY`:\"New York\",\n`OH`:\"Ohio\",\n`OK`:\"Oklahoma\",\n`OR`:\"Oregon\",\n`PA`:\"Pennsylvania\",\n`PR`:\"Puerto Rico\",\n`RI`:\"Rhode Island\",\n`SC`:\"South Carolina\",\n`SD`:\"South Dakota\",\n`TN`:\"Tennessee\",\n`TX`:\"Texas\",\n`UT`:\"Utah\",\n`VA`:\"Virginia\",\n`VI`:\"Virgin Islands\",\n`VT`:\"Vermont\",\n`WA`:\"Washington\",\n`WI`:\"Wisconsin\",\n`WV`:\"West Virginia\",\n`WY`:\"Wyoming\"   \nCanada states code list:\n`AB`: \"Alberta\",\n`BC`: \"British Columbia\",\n`MB`: \"Manitoba\",\n`NB`: \"New Brunswick\",\n`NL`: \"Newfoundland and Labrador\",\n`NS`: \"Nova Scotia\",\n`NT`: \"Northwest Territories\",\n`NU`: \"Nunavut\",\n`ON`: \"Ontario\",\n`PE`: \"Prince Edward Island\",\n`QC`: \"Quebec\",\n`SK`: \"Saskatchewan\",\n`YT`: \"Yukon\"\n",
          "enum": [
            "null",
            "AA",
            "AE",
            "AP",
            "AK",
            "AL",
            "AR",
            "AZ",
            "CA",
            "CO",
            "CT",
            "DC",
            "DE",
            "FL",
            "GA",
            "GU",
            "HI",
            "IA",
            "ID",
            "IL",
            "IN",
            "KS",
            "KY",
            "LA",
            "MA",
            "MD",
            "ME",
            "MI",
            "MN",
            "MO",
            "MS",
            "MT",
            "NC",
            "ND",
            "NE",
            "NH",
            "NJ",
            "NM",
            "NV",
            "NY",
            "OH",
            "OK",
            "OR",
            "PA",
            "PR",
            "RI",
            "SC",
            "SD",
            "TN",
            "TX",
            "UT",
            "VA",
            "VI",
            "VT",
            "WA",
            "WI",
            "WV",
            "WY",
            "AB",
            "BC",
            "MB",
            "NB",
            "NL",
            "NS",
            "NT",
            "NU",
            "ON",
            "PE",
            "QC",
            "SK",
            "YT"
          ],
          "type": "string"
        },
        "language": {
          "description": "User language   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes",
          "pattern": "/^([a-z]{2})(?:(?:(-)[A-Z]{2}))?$/",
          "type": "string"
        },
        "timezone": {
          "description": "User timezone name   \nAllowed values: one of the timezone names defined in [IANA tz database][0]  \nTimezone name are composed as follow: `Area/Location` (ex: Europe/Paris, America/New_York,...)\n\n[0]: https://www.iana.org/time-zones",
          "type": "string"
        },
        "accountType": {
          "description": "User subscription type",
          "default": "free",
          "enum": [
            "free",
            "basic",
            "advanced"
          ],
          "type": "string"
        },
        "roles": {
          "description": "List of user roles   \n  \nThe general rule is that a user must have the roles that the wants to assign to someone else.   \nExamples: \n\n* an `admin` can add or remove the role `admin` to another user of the company(ies) he manages,\n* an `bp_admin` can add or remove the role `bp_admin` to another user of the company(ies) he manages,\n* an `app_superadmin` can add or remove the role `app_superadmin` to another user...\n\nHere are some explanations regarding the roles available in Rainbow: \n\n* `admin`, `bp_admin` and `bp_finance` roles are related to company management (and resources linked to companies, such as users, systems, subscriptions, ...).\n* `bp_admin` and `bp_finance` roles can only be set to users of a BP company (company with isBP=true).\n* `app_admin`, `app_support` and `app_superadmin` roles are related to application management.\n* `all_company_channels_admin`, `public_channels_admin` and `closed_channels_admin` roles are related to channels management.\n* Only `superadmin` can set `superadmin` and `support` roles to a user.\n* A user with admin rights (admin, bp_admin, superadmin) can't change his own roles, except for roles related to channels (`all_company_channels_admin`, `public_channels_admin` and `closed_channels_admin`).\n\n",
          "default": "[\"user\"]",
          "enum": [
            "guest",
            "user",
            "admin",
            "bp_admin",
            "bp_finance",
            "company_support",
            "all_company_channels_admin",
            "public_channels_admin",
            "closed_channels_admin",
            "app_admin",
            "app_support",
            "app_superadmin",
            "support",
            "superadmin"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminType": {
          "description": "Mandatory if roles array contains `admin` role: specifies at which entity level the administrator has admin rights in the hierarchy ORGANIZATIONS/COMPANIES/SITES/SYSTEMS",
          "enum": [
            "organization_admin",
            "company_admin",
            "site_admin"
          ],
          "type": "string"
        },
        "companyId": {
          "description": "User company unique identifier (like 569ce8c8f9336c471b98eda1)   \ncompanyName field is automatically filled on server side based on companyId.",
          "type": "string"
        },
        "isActive": {
          "description": "Is user active",
          "default": "true",
          "type": "boolean"
        },
        "isInitialized": {
          "description": "Is user initialized",
          "default": "false",
          "type": "boolean"
        },
        "visibility": {
          "description": "User visibility (define if the user can be searched by users being in other company). * private: can be searched by users of his company only\n* public: can be searched by all users\n* none: Default value reserved for guest. Means 'can't be search inside or outside his company'\n\n",
          "enum": [
            "private",
            "public",
            "none"
          ],
          "type": "string"
        },
        "timeToLive": {
          "description": "Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire).   \nIf created user has role `guest` and no timeToLive is provided, a default value of 172800 seconds is set (48 hours).   \nIf created user does not have role `guest` and no timeToLive is provided, a default value of -1 is set (no expiration).",
          "type": "number"
        },
        "authenticationType": {
          "description": "User authentication type (if not set company default authentication will be used)",
          "enum": [
            "DEFAULT",
            "RAINBOW",
            "SAML"
          ],
          "type": "string"
        }
      }
    },
    "PutUsers_phoneNumbers": {
      "required": [
        "number",
        "type",
        "deviceType"
      ],
      "type": "object",
      "properties": {
        "number": {
          "description": "User phone number (as entered by user).   \nNot mandatory if the PhoneNumber to update is a PhoneNumber linked to a system (pbx)",
          "maxLength": 32,
          "minLength": 1,
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format).   \n  \nUsed to compute `numberE164` field from number field. If not provided, user country is used by default.",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "type": {
          "description": "Phone number type",
          "enum": [
            "home",
            "work",
            "other"
          ],
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type",
          "enum": [
            "landline",
            "mobile",
            "fax",
            "other"
          ],
          "type": "string"
        },
        "shortNumber": {
          "description": "**[Only for update of PhoneNumbers linked to a system (pbx)]**  \n  \nShort phone number (corresponds to the number monitored by PCG).   \nRead only field, only used by server to find the related system PhoneNumber to update (couple `shortNumber`/`systemId`).",
          "maxLength": 32,
          "minLength": 1,
          "type": "string"
        },
        "systemId": {
          "description": "**[Only for update of PhoneNumbers linked to a system (pbx)]**  \n  \nUnique identifier of the system in Rainbow database to which the system PhoneNumbers belong.   \nRead only field, only used by server to find the related system PhoneNumber to update (couple `shortNumber`/`systemId`).",
          "maxLength": 32,
          "minLength": 1,
          "type": "string"
        },
        "internalNumber": {
          "description": "**[Only for update of PhoneNumbers linked to a system (pbx)]**  \n  \nInternal phone number. Usable within a PBX group. By default, it is equal to `shortNumber`.   \nAdmins and users can modify this internalNumber field.   \n`internalNumber` must be unique in the whole system group to which the related PhoneNumber belong (an error 409 is raised if someone tries to update internalNumber to a number already used by another PhoneNumber in the same system group).",
          "maxLength": 32,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "PutUsers_emails": {
      "required": [
        "email",
        "type"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "User email address",
          "maxLength": 255,
          "minLength": 3,
          "type": "string"
        },
        "type": {
          "description": "User email type",
          "enum": [
            "home",
            "work",
            "other"
          ],
          "type": "string"
        }
      }
    },
    "PutUsersSuccess": {
      "required": [
        "isInDefaultCompany",
        "id",
        "loginEmail",
        "firstName",
        "lastName",
        "displayName",
        "nickName",
        "title",
        "jobTitle",
        "emails",
        "phoneNumbers",
        "country",
        "language",
        "timezone",
        "jid_im",
        "jid_tel",
        "jid_password",
        "roles",
        "adminType",
        "companyId",
        "organisationId",
        "siteId",
        "companyName",
        "isActive",
        "isInitialized",
        "initializationDate",
        "activationDate",
        "creationDate",
        "lastUpdateDate",
        "lastAvatarUpdateDate",
        "createdBySelfRegister",
        "createdByAdmin",
        "invitedBy",
        "firstLoginDate",
        "lastLoginDate",
        "loggedSince",
        "isTerminated",
        "guestMode",
        "timeToLive",
        "authenticationType"
      ],
      "type": "object",
      "properties": {
        "isInDefaultCompany": {
          "description": "Is user in default company",
          "type": "boolean"
        },
        "id": {
          "description": "User unique identifier",
          "type": "string"
        },
        "loginEmail": {
          "description": "User email address (used for login)",
          "type": "string"
        },
        "firstName": {
          "description": "User first name",
          "type": "string"
        },
        "lastName": {
          "description": "User last name",
          "type": "string"
        },
        "displayName": {
          "description": "User display name (firstName + lastName concatenated on server side)",
          "type": "string"
        },
        "nickName": {
          "description": "User nickName",
          "type": "string"
        },
        "title": {
          "description": "User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)",
          "type": "string"
        },
        "jobTitle": {
          "description": "User job title",
          "type": "string"
        },
        "emails": {
          "description": "Array of user emails addresses objects",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutUsersSuccess_emails"
          }
        },
        "phoneNumbers": {
          "description": "Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PutUsersSuccess_phoneNumbers"
          }
        },
        "country": {
          "description": "User country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "language": {
          "description": "User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)",
          "type": "string"
        },
        "timezone": {
          "description": "User timezone name",
          "type": "string"
        },
        "jid_im": {
          "description": "User Jabber IM identifier",
          "type": "string"
        },
        "jid_tel": {
          "description": "User Jabber TEL identifier",
          "type": "string"
        },
        "jid_password": {
          "description": "User Jabber IM and TEL password",
          "type": "string"
        },
        "roles": {
          "description": "List of user roles (Array of String)   \nNote: `company_support` role is only used for support redirection. If a user writes a #support ticket and have the role `company_support`, the ticket will be sent to ALE's support (otherwise the ticket is sent to user's company's `supportEmail` address is set, ALE otherwise).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminType": {
          "description": "In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)",
          "type": "string"
        },
        "companyId": {
          "description": "User company unique identifier",
          "type": "string"
        },
        "organisationId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to an organization",
          "type": "string"
        },
        "siteId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to a site",
          "type": "string"
        },
        "companyName": {
          "description": "User company name",
          "type": "string"
        },
        "isActive": {
          "description": "Is user active",
          "type": "boolean"
        },
        "isInitialized": {
          "description": "Is user initialized",
          "type": "boolean"
        },
        "initializationDate": {
          "format": "date-time",
          "description": "User initialization date",
          "type": "string"
        },
        "activationDate": {
          "format": "date-time",
          "description": "User activation date",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "User creation date",
          "type": "string"
        },
        "lastUpdateDate": {
          "format": "date-time",
          "description": "Date of last user update (whatever the field updated)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last user avatar create/update, null if no avatar",
          "type": "string"
        },
        "createdBySelfRegister": {
          "description": "true if user has been created using self register",
          "type": "boolean"
        },
        "createdByAdmin": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "invitedBy": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "firstLoginDate": {
          "format": "date-time",
          "description": "Date of first user login (only set the first time user logs in, null if user never logged in)",
          "type": "string"
        },
        "lastLoginDate": {
          "format": "date-time",
          "description": "Date of last user login (defined even if user is logged out)",
          "type": "string"
        },
        "loggedSince": {
          "format": "date-time",
          "description": "Date of last user login (null if user is logged out)",
          "type": "string"
        },
        "isTerminated": {
          "description": "Indicates if the Rainbow account of this user has been deleted",
          "type": "boolean"
        },
        "guestMode": {
          "description": "Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration.",
          "type": "boolean"
        },
        "timeToLive": {
          "description": "Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire).",
          "type": "number"
        },
        "authenticationType": {
          "description": "User authentication type (if not set company default authentication will be used)",
          "type": "string"
        }
      }
    },
    "PutUsersSuccess_emails": {
      "required": [
        "email",
        "type"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "User email address",
          "type": "string"
        },
        "type": {
          "description": "Email type, one of `home`, `work`, `other`",
          "type": "string"
        }
      }
    },
    "PutUsersSuccess_phoneNumbers": {
      "required": [
        "phoneNumberId",
        "number",
        "numberE164",
        "country",
        "isFromSystem",
        "shortNumber",
        "internalNumber",
        "systemId",
        "pbxId",
        "type",
        "deviceType"
      ],
      "type": "object",
      "properties": {
        "phoneNumberId": {
          "description": "Phone number unique id in directory collection.",
          "type": "string"
        },
        "number": {
          "description": "User phone number (as entered by user)",
          "type": "string"
        },
        "numberE164": {
          "description": "User E.164 phone number, computed by server from number and country fields",
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field.",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if phone is linked to a system (pbx).",
          "type": "boolean"
        },
        "shortNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field.",
          "type": "string"
        },
        "internalNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field.",
          "type": "string"
        },
        "systemId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database.",
          "type": "string"
        },
        "pbxId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx.",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`.",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`.",
          "type": "string"
        }
      }
    },
    "GetUsersSuccess": {
      "required": [
        "id",
        "loginEmail",
        "firstName",
        "lastName",
        "displayName",
        "nickName",
        "title",
        "jobTitle",
        "emails",
        "phoneNumbers",
        "country",
        "language",
        "timezone",
        "jid_im",
        "jid_tel",
        "jid_password",
        "roles",
        "adminType",
        "companyId",
        "organisationId",
        "siteId",
        "companyName",
        "isActive",
        "isInitialized",
        "initializationDate",
        "activationDate",
        "creationDate",
        "lastUpdateDate",
        "lastAvatarUpdateDate",
        "createdBySelfRegister",
        "createdByAdmin",
        "invitedBy",
        "firstLoginDate",
        "lastLoginDate",
        "loggedSince",
        "isTerminated",
        "guestMode",
        "timeToLive",
        "authenticationType"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "User unique identifier",
          "type": "string"
        },
        "loginEmail": {
          "description": "User email address (used for login)",
          "type": "string"
        },
        "firstName": {
          "description": "User first name",
          "type": "string"
        },
        "lastName": {
          "description": "User last name",
          "type": "string"
        },
        "displayName": {
          "description": "User display name (firstName + lastName concatenated on server side)",
          "type": "string"
        },
        "nickName": {
          "description": "User nickName",
          "type": "string"
        },
        "title": {
          "description": "User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)",
          "type": "string"
        },
        "jobTitle": {
          "description": "User job title",
          "type": "string"
        },
        "emails": {
          "description": "Array of user emails addresses objects",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetUsersSuccess_emails"
          }
        },
        "phoneNumbers": {
          "description": "Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n",
          "type": "array",
          "items": {
            "$ref": "#/definitions/GetUsersSuccess_phoneNumbers"
          }
        },
        "country": {
          "description": "User country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "language": {
          "description": "User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)",
          "type": "string"
        },
        "timezone": {
          "description": "User timezone name",
          "type": "string"
        },
        "jid_im": {
          "description": "User Jabber IM identifier",
          "type": "string"
        },
        "jid_tel": {
          "description": "User Jabber TEL identifier",
          "type": "string"
        },
        "jid_password": {
          "description": "User Jabber IM and TEL password",
          "type": "string"
        },
        "roles": {
          "description": "List of user roles (Array of String)   \nNote: `company_support` role is only used for support redirection. If a user writes a #support ticket and have the role `company_support`, the ticket will be sent to ALE's support (otherwise the ticket is sent to user's company's `supportEmail` address is set, ALE otherwise).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminType": {
          "description": "In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)",
          "type": "string"
        },
        "companyId": {
          "description": "User company unique identifier",
          "type": "string"
        },
        "organisationId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to an organization",
          "type": "string"
        },
        "siteId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to a site",
          "type": "string"
        },
        "companyName": {
          "description": "User company name",
          "type": "string"
        },
        "isActive": {
          "description": "Is user active",
          "type": "boolean"
        },
        "isInitialized": {
          "description": "Is user initialized",
          "type": "boolean"
        },
        "initializationDate": {
          "format": "date-time",
          "description": "User initialization date",
          "type": "string"
        },
        "activationDate": {
          "format": "date-time",
          "description": "User activation date",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "User creation date",
          "type": "string"
        },
        "lastUpdateDate": {
          "format": "date-time",
          "description": "Date of last user update (whatever the field updated)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last user avatar create/update, null if no avatar",
          "type": "string"
        },
        "createdBySelfRegister": {
          "description": "true if user has been created using self register",
          "type": "boolean"
        },
        "createdByAdmin": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "invitedBy": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "firstLoginDate": {
          "format": "date-time",
          "description": "Date of first user login (only set the first time user logs in, null if user never logged in)",
          "type": "string"
        },
        "lastLoginDate": {
          "format": "date-time",
          "description": "Date of last user login (defined even if user is logged out)",
          "type": "string"
        },
        "loggedSince": {
          "format": "date-time",
          "description": "Date of last user login (null if user is logged out)",
          "type": "string"
        },
        "isTerminated": {
          "description": "Indicates if the Rainbow account of this user has been deleted",
          "type": "boolean"
        },
        "guestMode": {
          "description": "Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration.",
          "type": "boolean"
        },
        "timeToLive": {
          "description": "Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire).",
          "type": "number"
        },
        "authenticationType": {
          "description": "User authentication type (if not set company default authentication will be used)",
          "type": "string"
        }
      }
    },
    "GetUsersSuccess_emails": {
      "required": [
        "email",
        "type"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "User email address",
          "type": "string"
        },
        "type": {
          "description": "Email type, one of `home`, `work`, `other`",
          "type": "string"
        }
      }
    },
    "GetUsersSuccess_phoneNumbers": {
      "required": [
        "phoneNumberId",
        "number",
        "numberE164",
        "country",
        "isFromSystem",
        "shortNumber",
        "internalNumber",
        "systemId",
        "pbxId",
        "type",
        "deviceType"
      ],
      "type": "object",
      "properties": {
        "phoneNumberId": {
          "description": "Phone number unique id in directory collection.",
          "type": "string"
        },
        "number": {
          "description": "User phone number (as entered by user)",
          "type": "string"
        },
        "numberE164": {
          "description": "User E.164 phone number, computed by server from number and country fields",
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field.",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if phone is linked to a system (pbx).",
          "type": "boolean"
        },
        "shortNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field.",
          "type": "string"
        },
        "internalNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field.",
          "type": "string"
        },
        "systemId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database.",
          "type": "string"
        },
        "pbxId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx.",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`.",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`.",
          "type": "string"
        }
      }
    },
    "PostUsers": {
      "required": [
        "loginEmail",
        "password"
      ],
      "type": "object",
      "properties": {
        "companyId": {
          "description": "User company unique identifier (like 569ce8c8f9336c471b98eda1).   \nIf not provided, users are attached to a \"Default\" company.   \ncompanyName field is automatically filled on server side based on companyId.",
          "type": "string"
        },
        "loginEmail": {
          "description": "User email address (used for login).   \nMust be unique (409 error is returned if a user already exists with the same email address).",
          "maxLength": 255,
          "minLength": 3,
          "type": "string"
        },
        "password": {
          "description": "User password.   \nRules: more than 8 characters, at least 1 capital letter, 1 number, 1 special character.",
          "maxLength": 64,
          "minLength": 8,
          "type": "string"
        },
        "firstName": {
          "description": "User first name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "lastName": {
          "description": "User last name",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "nickName": {
          "description": "User nickName",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "title": {
          "description": "User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)",
          "maxLength": 40,
          "minLength": 1,
          "type": "string"
        },
        "jobTitle": {
          "description": "User job title",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "emails": {
          "description": "Array of user emails addresses objects",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostUsers_emails"
          }
        },
        "phoneNumbers": {
          "description": "Array of user phone numbers objects   \n  \n_Note:_ For each provided number, the server tries to compute the associated E.164 number (`numberE164` field) using provided PhoneNumber country if available, user country otherwise. If `numberE164` can't be computed, an error 400 is returned (ex: wrong phone number, phone number not matching country code, ...)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostUsers_phoneNumbers"
          }
        },
        "country": {
          "description": "User country (ISO 3166-1 alpha3 format)",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.   \nUSA states code list: `AA`:\"Armed Forces America\",\n`AE`:\"Armed Forces\",\n`AP`:\"Armed Forces Pacific\",\n`AK`:\"Alaska\",\n`AL`:\"Alabama\",\n`AR`:\"Arkansas\",\n`AZ`:\"Arizona\",\n`CA`:\"California\",\n`CO`:\"Colorado\",\n`CT`:\"Connecticut\",\n`DC`:\"Washington DC\",\n`DE`:\"Delaware\",\n`FL`:\"Florida\",\n`GA`:\"Georgia\",\n`GU`:\"Guam\",\n`HI`:\"Hawaii\",\n`IA`:\"Iowa\",\n`ID`:\"Idaho\",\n`IL`:\"Illinois\",\n`IN`:\"Indiana\",\n`KS`:\"Kansas\",\n`KY`:\"Kentucky\",\n`LA`:\"Louisiana\",\n`MA`:\"Massachusetts\",\n`MD`:\"Maryland\",\n`ME`:\"Maine\",\n`MI`:\"Michigan\",\n`MN`:\"Minnesota\",\n`MO`:\"Missouri\",\n`MS`:\"Mississippi\",\n`MT`:\"Montana\",\n`NC`:\"North Carolina\",\n`ND`:\"North Dakota\",\n`NE`:\"Nebraska\",\n`NH`:\"New Hampshire\",\n`NJ`:\"New Jersey\",\n`NM`:\"New Mexico\",\n`NV`:\"Nevada\",\n`NY`:\"New York\",\n`OH`:\"Ohio\",\n`OK`:\"Oklahoma\",\n`OR`:\"Oregon\",\n`PA`:\"Pennsylvania\",\n`PR`:\"Puerto Rico\",\n`RI`:\"Rhode Island\",\n`SC`:\"South Carolina\",\n`SD`:\"South Dakota\",\n`TN`:\"Tennessee\",\n`TX`:\"Texas\",\n`UT`:\"Utah\",\n`VA`:\"Virginia\",\n`VI`:\"Virgin Islands\",\n`VT`:\"Vermont\",\n`WA`:\"Washington\",\n`WI`:\"Wisconsin\",\n`WV`:\"West Virginia\",\n`WY`:\"Wyoming\"   \nCanada states code list:\n`AB`: \"Alberta\",\n`BC`: \"British Columbia\",\n`MB`: \"Manitoba\",\n`NB`: \"New Brunswick\",\n`NL`: \"Newfoundland and Labrador\",\n`NS`: \"Nova Scotia\",\n`NT`: \"Northwest Territories\",\n`NU`: \"Nunavut\",\n`ON`: \"Ontario\",\n`PE`: \"Prince Edward Island\",\n`QC`: \"Quebec\",\n`SK`: \"Saskatchewan\",\n`YT`: \"Yukon\"\n",
          "enum": [
            "null",
            "AA",
            "AE",
            "AP",
            "AK",
            "AL",
            "AR",
            "AZ",
            "CA",
            "CO",
            "CT",
            "DC",
            "DE",
            "FL",
            "GA",
            "GU",
            "HI",
            "IA",
            "ID",
            "IL",
            "IN",
            "KS",
            "KY",
            "LA",
            "MA",
            "MD",
            "ME",
            "MI",
            "MN",
            "MO",
            "MS",
            "MT",
            "NC",
            "ND",
            "NE",
            "NH",
            "NJ",
            "NM",
            "NV",
            "NY",
            "OH",
            "OK",
            "OR",
            "PA",
            "PR",
            "RI",
            "SC",
            "SD",
            "TN",
            "TX",
            "UT",
            "VA",
            "VI",
            "VT",
            "WA",
            "WI",
            "WV",
            "WY",
            "AB",
            "BC",
            "MB",
            "NB",
            "NL",
            "NS",
            "NT",
            "NU",
            "ON",
            "PE",
            "QC",
            "SK",
            "YT"
          ],
          "type": "string"
        },
        "language": {
          "description": "User language   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes",
          "pattern": "/^([a-z]{2})(?:(?:(-)[A-Z]{2}))?$/",
          "type": "string"
        },
        "timezone": {
          "description": "User timezone name   \nAllowed values: one of the timezone names defined in [IANA tz database][0]  \nTimezone name are composed as follow: `Area/Location` (ex: Europe/Paris, America/New_York,...)\n\n[0]: https://www.iana.org/time-zones",
          "type": "string"
        },
        "accountType": {
          "description": "User subscription type",
          "default": "free",
          "enum": [
            "free",
            "basic",
            "advanced"
          ],
          "type": "string"
        },
        "roles": {
          "description": "List of user roles   \n  \nThe general rule is that a user must have the roles that the wants to assign to someone else.   \nExamples: \n\n* an `admin` can add or remove the role `admin` to another user of the company(ies) he manages,\n* an `bp_admin` can add or remove the role `bp_admin` to another user of the company(ies) he manages,\n* an `app_superadmin` can add or remove the role `app_superadmin` to another user...\n\nHere are some explanations regarding the roles available in Rainbow: \n\n* `admin`, `bp_admin` and `bp_finance` roles are related to company management (and resources linked to companies, such as users, systems, subscriptions, ...).\n* `bp_admin` and `bp_finance` roles can only be set to users of a BP company (company with isBP=true).\n* `app_admin`, `app_support` and `app_superadmin` roles are related to application management.\n* `all_company_channels_admin`, `public_channels_admin` and `closed_channels_admin` roles are related to channels management.\n* Only `superadmin` can set `superadmin` and `support` roles to a user.\n* A user with admin rights (admin, bp_admin, superadmin) can't change his own roles, except for roles related to channels (`all_company_channels_admin`, `public_channels_admin` and `closed_channels_admin`).\n\n",
          "default": "[\"user\"]",
          "enum": [
            "guest",
            "user",
            "admin",
            "bp_admin",
            "bp_finance",
            "company_support",
            "all_company_channels_admin",
            "public_channels_admin",
            "closed_channels_admin",
            "app_admin",
            "app_support",
            "app_superadmin",
            "support",
            "superadmin"
          ],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminType": {
          "description": "Mandatory if roles array contains `admin` role: specifies at which entity level the administrator has admin rights in the hierarchy ORGANIZATIONS/COMPANIES/SITES/SYSTEMS",
          "enum": [
            "organization_admin",
            "company_admin",
            "site_admin"
          ],
          "type": "string"
        },
        "isActive": {
          "description": "Is user active",
          "default": "true",
          "type": "boolean"
        },
        "isInitialized": {
          "description": "Is user initialized",
          "default": "false",
          "type": "boolean"
        },
        "visibility": {
          "description": "User visibility (define if the user can be searched by users being in other company). * private: can be searched by users of his company only\n* public: can be searched by all users\n* none: Default value reserved for guest. Means 'can't be search inside or outside his company'\n\n",
          "enum": [
            "private",
            "public",
            "none"
          ],
          "type": "string"
        },
        "timeToLive": {
          "description": "Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire).   \nIf created user has role `guest` and no timeToLive is provided, a default value of 172800 seconds is set (48 hours).   \nIf created user does not have role `guest` and no timeToLive is provided, a default value of -1 is set (no expiration).",
          "type": "number"
        },
        "authenticationType": {
          "description": "User authentication type (if not set company default authentication will be used)",
          "enum": [
            "DEFAULT",
            "RAINBOW",
            "SAML"
          ],
          "type": "string"
        }
      }
    },
    "PostUsers_emails": {
      "required": [
        "email",
        "type"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "User email address",
          "maxLength": 255,
          "minLength": 3,
          "type": "string"
        },
        "type": {
          "description": "User email type",
          "enum": [
            "home",
            "work",
            "other"
          ],
          "type": "string"
        }
      }
    },
    "PostUsers_phoneNumbers": {
      "required": [
        "number",
        "country",
        "type",
        "deviceType"
      ],
      "type": "object",
      "properties": {
        "number": {
          "description": "User phone number (as entered by user)",
          "maxLength": 32,
          "minLength": 1,
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field.   \n  \nIf not provided, user country is used by default.",
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        },
        "type": {
          "description": "Phone number type",
          "enum": [
            "home",
            "work",
            "other"
          ],
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type",
          "enum": [
            "landline",
            "mobile",
            "fax",
            "other"
          ],
          "type": "string"
        }
      }
    },
    "PostUsersSuccess": {
      "required": [
        "id",
        "loginEmail",
        "firstName",
        "lastName",
        "displayName",
        "nickName",
        "title",
        "jobTitle",
        "emails",
        "phoneNumbers",
        "country",
        "language",
        "timezone",
        "jid_im",
        "jid_tel",
        "jid_password",
        "roles",
        "adminType",
        "companyId",
        "organisationId",
        "siteId",
        "companyName",
        "isInDefaultCompany",
        "isActive",
        "isInitialized",
        "initializationDate",
        "activationDate",
        "creationDate",
        "lastUpdateDate",
        "lastAvatarUpdateDate",
        "createdBySelfRegister",
        "createdByAdmin",
        "invitedBy",
        "firstLoginDate",
        "lastLoginDate",
        "loggedSince",
        "isTerminated",
        "timeToLive",
        "guestMode"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "User unique identifier",
          "type": "string"
        },
        "loginEmail": {
          "description": "User email address (used for login)",
          "type": "string"
        },
        "firstName": {
          "description": "User first name",
          "type": "string"
        },
        "lastName": {
          "description": "User last name",
          "type": "string"
        },
        "displayName": {
          "description": "User display name (firstName + lastName concatenated on server side)",
          "type": "string"
        },
        "nickName": {
          "description": "User nickName",
          "type": "string"
        },
        "title": {
          "description": "User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)",
          "type": "string"
        },
        "jobTitle": {
          "description": "User job title",
          "type": "string"
        },
        "emails": {
          "description": "Array of user emails addresses objects",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostUsersSuccess_emails"
          }
        },
        "phoneNumbers": {
          "description": "Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PostUsersSuccess_phoneNumbers"
          }
        },
        "country": {
          "description": "User country (ISO 3166-1 alpha3 format)",
          "type": "string"
        },
        "state": {
          "description": "When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.",
          "enum": [
            "AK",
            "AL",
            "....",
            "NY",
            "WY"
          ],
          "type": "string"
        },
        "language": {
          "description": "User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)",
          "type": "string"
        },
        "timezone": {
          "description": "User timezone name",
          "type": "string"
        },
        "jid_im": {
          "description": "User Jabber IM identifier",
          "type": "string"
        },
        "jid_tel": {
          "description": "User Jabber TEL identifier",
          "type": "string"
        },
        "jid_password": {
          "description": "User Jabber IM and TEL password",
          "type": "string"
        },
        "roles": {
          "description": "List of user roles (Array of String)   \nNote: `company_support` role is only used for support redirection. If a user writes a #support ticket and have the role `company_support`, the ticket will be sent to ALE's support (otherwise the ticket is sent to user's company's `supportEmail` address is set, ALE otherwise).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminType": {
          "description": "In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)",
          "type": "string"
        },
        "companyId": {
          "description": "User company unique identifier",
          "type": "string"
        },
        "organisationId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to an organization",
          "type": "string"
        },
        "siteId": {
          "description": "In addition to User companyId, optional identifier to indicate the user belongs also to a site",
          "type": "string"
        },
        "companyName": {
          "description": "User company name",
          "type": "string"
        },
        "isInDefaultCompany": {
          "description": "Is user in default company",
          "type": "boolean"
        },
        "isActive": {
          "description": "Is user active",
          "type": "boolean"
        },
        "isInitialized": {
          "description": "Is user initialized",
          "type": "boolean"
        },
        "initializationDate": {
          "format": "date-time",
          "description": "User initialization date",
          "type": "string"
        },
        "activationDate": {
          "format": "date-time",
          "description": "User activation date",
          "type": "string"
        },
        "creationDate": {
          "format": "date-time",
          "description": "User creation date",
          "type": "string"
        },
        "lastUpdateDate": {
          "format": "date-time",
          "description": "Date of last user update (whatever the field updated)",
          "type": "string"
        },
        "lastAvatarUpdateDate": {
          "format": "date-time",
          "description": "Date of last user avatar create/update, null if no avatar",
          "type": "string"
        },
        "createdBySelfRegister": {
          "description": "true if user has been created using self register",
          "type": "boolean"
        },
        "createdByAdmin": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "invitedBy": {
          "required": [
            "userId",
            "loginEmail"
          ],
          "type": "object",
          "properties": {
            "userId": {
              "description": "",
              "type": "string"
            },
            "loginEmail": {
              "description": "",
              "type": "string"
            }
          }
        },
        "firstLoginDate": {
          "format": "date-time",
          "description": "Date of first user login (only set the first time user logs in, null if user never logged in)",
          "type": "string"
        },
        "lastLoginDate": {
          "format": "date-time",
          "description": "Date of last user login (defined even if user is logged out)",
          "type": "string"
        },
        "loggedSince": {
          "format": "date-time",
          "description": "Date of last user login (null if user is logged out)",
          "type": "string"
        },
        "isTerminated": {
          "description": "Indicates if the Rainbow account of this user has been deleted",
          "type": "boolean"
        },
        "timeToLive": {
          "description": "Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire).",
          "type": "number"
        },
        "guestMode": {
          "description": "Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration.",
          "type": "boolean"
        }
      }
    },
    "PostUsersSuccess_emails": {
      "required": [
        "email",
        "type"
      ],
      "type": "object",
      "properties": {
        "email": {
          "description": "User email address",
          "type": "string"
        },
        "type": {
          "description": "Email type, one of `home`, `work`, `other`",
          "type": "string"
        }
      }
    },
    "PostUsersSuccess_phoneNumbers": {
      "required": [
        "phoneNumberId",
        "number",
        "numberE164",
        "country",
        "isFromSystem",
        "shortNumber",
        "internalNumber",
        "systemId",
        "pbxId",
        "type",
        "deviceType"
      ],
      "type": "object",
      "properties": {
        "phoneNumberId": {
          "description": "Phone number unique id in directory collection.",
          "type": "string"
        },
        "number": {
          "description": "User phone number (as entered by user)",
          "type": "string"
        },
        "numberE164": {
          "description": "User E.164 phone number, computed by server from number and country fields",
          "type": "string"
        },
        "country": {
          "description": "Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field.",
          "type": "string"
        },
        "isFromSystem": {
          "description": "Boolean indicating if phone is linked to a system (pbx).",
          "type": "boolean"
        },
        "shortNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field.",
          "type": "string"
        },
        "internalNumber": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field.",
          "type": "string"
        },
        "systemId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database.",
          "type": "string"
        },
        "pbxId": {
          "description": "**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx.",
          "type": "string"
        },
        "type": {
          "description": "Phone number type, one of `home`, `work`, `other`.",
          "type": "string"
        },
        "deviceType": {
          "description": "Phone number device type, one of `landline`, `mobile`, `fax`, `other`.",
          "type": "string"
        }
      }
    },
    "UnlinkUserFromACompanySuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Unlink status message.",
          "type": "string"
        }
      }
    },
    "admin_users_tag_failedSuccess": {
      "required": [
        "id",
        "invitingUserId",
        "invitingUserEmail",
        "requestedNotificationLanguage",
        "invitingDate",
        "lastNotificationDate",
        "status",
        "type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Invitation unique Id",
          "type": "string"
        },
        "invitedUserId": {
          "description": "Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted.",
          "type": "string"
        },
        "invitedPhoneNumber": {
          "description": "Invited user phoneNumber",
          "type": "string"
        },
        "invitedUserEmail": {
          "description": "Invited user email",
          "type": "string"
        },
        "invitingUserId": {
          "description": "Inviting user unique Rainbow Id",
          "type": "string"
        },
        "invitingUserEmail": {
          "description": "Inviting user loginEmail",
          "type": "string"
        },
        "requestedNotificationLanguage": {
          "description": "Requested notification language (used to re-send email request in that language)",
          "type": "string"
        },
        "invitingDate": {
          "format": "date-time",
          "description": "Date the invitation was created",
          "type": "string"
        },
        "lastNotificationDate": {
          "format": "date-time",
          "description": "Date when the last email notification was sent",
          "type": "string"
        },
        "status": {
          "description": "Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n",
          "type": "string"
        },
        "type": {
          "description": "Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n",
          "type": "string"
        }
      }
    },
    "admin_users_PostUserNetworks": {
      "required": [
        "users"
      ],
      "type": "object",
      "properties": {
        "users": {
          "description": "Array of user unique identifiers (like 56c5c19f94141765119f896c) of the users to add in requested user network",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "presence": {
          "description": "Specify if presence subscription has to be set when adding the users in mutual networks.",
          "enum": [
            "false"
          ],
          "type": "boolean"
        }
      }
    },
    "admin_users_PostUserNetworksSuccess": {
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "description": "Indicates if the operation succeeded",
          "type": "string"
        }
      }
    },
    "admin_users_DeleteUserProfilesSuccess": {
      "required": [
        "subscriptionId",
        "offerId",
        "offerName",
        "offerDescription",
        "offerTechnicalDescription",
        "offerReference",
        "profileId",
        "profileName",
        "status",
        "isDefault",
        "canBeSold",
        "businessModel",
        "isExclusive",
        "isPrepaid",
        "expirationDate",
        "provisioningNeeded",
        "assignationDate"
      ],
      "type": "object",
      "properties": {
        "subscriptionId": {
          "description": "Id of company subscription to which user profile is assigned (one of the subscriptions available to user's company)",
          "type": "string"
        },
        "offerId": {
          "description": "Id of the offer to which company subscription is attached",
          "type": "string"
        },
        "offerName": {
          "description": "Name of the offer to which company subscription is attached",
          "type": "string"
        },
        "offerDescription": {
          "description": "Description of the offer to which company subscription is attached",
          "type": "string"
        },
        "offerTechnicalDescription": {
          "description": "Technical description of the subscribed offer",
          "type": "string"
        },
        "offerReference": {
          "description": "Key used for referencing the subscribed offer. Well know offer References are: RB-Essential, RB-Business, RB-Enterprise, RB-Conference.",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile to which company subscription is attached",
          "type": "string"
        },
        "profileName": {
          "description": "Name of the profile to which company subscription is attached",
          "type": "string"
        },
        "status": {
          "description": "Status of the company subscription to which user profile is assigned   \n  \nPossible values: `active`, `alerting`, `hold`, `terminated`",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if this profile is linked to user's company's subscription to default offer (i.e. Essential)",
          "type": "boolean"
        },
        "canBeSold": {
          "description": "Indicates if this profile is linked a subscription for a paid offer.   \nSome offers are not be sold (Essential, Beta, Demo, ...).   \nIf canBeSold is true, the subscription is billed.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to the subscribed offer (number of users, usage, ...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `none`: no business model. Used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "none"
          ],
          "type": "string"
        },
        "isExclusive": {
          "description": "Indicates if this profile is relative to a subscription for an exclusive offer (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the subscription to assign to a user profile has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if this profile is relative to a subscription for a prepaid offer",
          "type": "boolean"
        },
        "expirationDate": {
          "format": "date-time",
          "description": "Expiration date of the subscription to the prepaid offer (creationDate + prepaidDuration)",
          "type": "string"
        },
        "provisioningNeeded": {
          "description": "Indicates if provisioning is needed on other component when assigning the user profile to this subscription (depends of thus subscribed offer)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_users_DeleteUserProfilesSuccess_provisioningNeeded"
          }
        },
        "assignationDate": {
          "description": "Date when the subscription was attached to user profile",
          "type": "string"
        }
      }
    },
    "admin_users_DeleteUserProfilesSuccess_provisioningNeeded": {
      "required": [
        "providerType",
        "provisioningOngoing",
        "provisioningStartDate"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        },
        "provisioningOngoing": {
          "description": "Boolean indicating if the account is being provisioned on the other component. If set to false, the account has been successfully created on the component.",
          "type": "boolean"
        },
        "provisioningStartDate": {
          "description": "Provisioning starting date",
          "type": "string"
        }
      }
    },
    "admin_users_PostUserProfilesSuccess": {
      "required": [
        "subscriptionId",
        "offerId",
        "offerName",
        "offerDescription",
        "offerTechnicalDescription",
        "offerReference",
        "profileId",
        "profileName",
        "status",
        "isDefault",
        "canBeSold",
        "businessModel",
        "isExclusive",
        "isPrepaid",
        "expirationDate",
        "provisioningNeeded",
        "assignationDate"
      ],
      "type": "object",
      "properties": {
        "subscriptionId": {
          "description": "Id of company subscription to which user profile is assigned (one of the subscriptions available to user's company)",
          "type": "string"
        },
        "offerId": {
          "description": "Id of the Rainbow offer to which company subscription is attached",
          "type": "string"
        },
        "offerName": {
          "description": "Name of the Rainbow offer to which company subscription is attached",
          "type": "string"
        },
        "offerDescription": {
          "description": "Description of the offer to which company subscription is attached",
          "type": "string"
        },
        "offerTechnicalDescription": {
          "description": "Technical description of the subscribed offer",
          "type": "string"
        },
        "offerReference": {
          "description": "Key used for referencing the subscribed offer. Well know offer References are: RB-Essential, RB-Business, RB-Enterprise, RB-Conference.",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the Rainbow profile to which company subscription is attached",
          "type": "string"
        },
        "profileName": {
          "description": "Name of the Rainbow profile to which company subscription is attached",
          "type": "string"
        },
        "status": {
          "description": "Status of the company subscription to which user profile is assigned   \n  \nPossible values: `active`, `alerting`, `hold`, `terminated`",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if this profile lis linked to user's company's subscription to default offer (i.e. Essential)",
          "type": "boolean"
        },
        "canBeSold": {
          "description": "Indicates if this profile is linked a subscription for a paid offer.   \nSome offers are not be sold (Essential, Beta, Demo, ...).   \nIf canBeSold is true, the subscription is billed.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to the subscribed offer (number of users, usage, ...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `none`: no business model. Used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "none"
          ],
          "type": "string"
        },
        "isExclusive": {
          "description": "Indicates if this profile is relative to a subscription for an exclusive offer (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the subscription to assign to a user profile has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if this profile is relative to a subscription for a prepaid offer",
          "type": "boolean"
        },
        "expirationDate": {
          "format": "date-time",
          "description": "Expiration date of the subscription to the prepaid offer (creationDate + prepaidDuration)",
          "type": "string"
        },
        "provisioningNeeded": {
          "description": "Indicates if provisioning is needed on other component when assigning the user profile to this subscription (depends of thus subscribed offer)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_users_PostUserProfilesSuccess_provisioningNeeded"
          }
        },
        "assignationDate": {
          "description": "Date when the subscription was attached to user profile",
          "type": "string"
        }
      }
    },
    "admin_users_PostUserProfilesSuccess_provisioningNeeded": {
      "required": [
        "providerType",
        "provisioningOngoing",
        "provisioningStartDate"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        },
        "provisioningOngoing": {
          "description": "Boolean indicating if the account is being provisioned on the other component. If set to false, the account has been successfully created on the component.",
          "type": "boolean"
        },
        "provisioningStartDate": {
          "description": "Provisioning starting date",
          "type": "string"
        }
      }
    },
    "admin_users_GetUserProfilesSuccess": {
      "required": [
        "subscriptionId",
        "offerId",
        "offerName",
        "offerDescription",
        "offerTechnicalDescription",
        "offerReference",
        "profileId",
        "profileName",
        "status",
        "isDefault",
        "canBeSold",
        "businessModel",
        "isExclusive",
        "isPrepaid",
        "expirationDate",
        "provisioningNeeded",
        "assignationDate"
      ],
      "type": "object",
      "properties": {
        "subscriptionId": {
          "description": "Id of company subscription to which user profile is assigned (one of the subscriptions available to user's company)",
          "type": "string"
        },
        "offerId": {
          "description": "Id of the offer to which company subscription is attached",
          "type": "string"
        },
        "offerName": {
          "description": "Name of the offer to which company subscription is attached",
          "type": "string"
        },
        "offerDescription": {
          "description": "Description of the offer to which company subscription is attached",
          "type": "string"
        },
        "offerTechnicalDescription": {
          "description": "Technical description of the subscribed offer",
          "type": "string"
        },
        "offerReference": {
          "description": "Key used for referencing the subscribed offer. Well know offer References are: RB-Essential, RB-Business, RB-Enterprise, RB-Conference.",
          "type": "string"
        },
        "profileId": {
          "description": "Id of the profile to which company subscription is attached",
          "type": "string"
        },
        "profileName": {
          "description": "Name of the profile to which company subscription is attached",
          "type": "string"
        },
        "status": {
          "description": "Status of the company subscription to which user profile is assigned   \n  \nPossible values: `active`, `alerting`, `hold`, `terminated`",
          "type": "string"
        },
        "isDefault": {
          "description": "Indicates if this profile is linked to user's company's subscription to default offer (i.e. Essential)",
          "type": "boolean"
        },
        "canBeSold": {
          "description": "Indicates if this profile is linked a subscription for a paid offer.   \nSome offers are not be sold (Essential, Beta, Demo, ...).   \nIf canBeSold is true, the subscription is billed.",
          "type": "boolean"
        },
        "businessModel": {
          "description": "Indicates the business model associated to the subscribed offer (number of users, usage, ...) \n\n* `nb_users`: Licencing business model. Offers having this business model are billed according to the number of users bought for it. This should be the business model for Business and Enterprise offers.\n* `usage`: Offers having this business model are billed based on service consumption (whatever the number of users assigned to the subscription of this offer). This should be the business model for Conference offer.\n* `none`: no business model. Used for offers which are not sold (like Essential, Beta, ...).\n\n",
          "enum": [
            "nb_users",
            "usage",
            "none"
          ],
          "type": "string"
        },
        "isExclusive": {
          "description": "Indicates if this profile is relative to a subscription for an exclusive offer (if the user has already an exclusive offer assigned, it won't be possible to assign a second exclusive offer).   \nUsed on GUI side to know if the subscription to assign to a user profile has to be displayed as a radio button or as a check box.",
          "type": "boolean"
        },
        "isPrepaid": {
          "description": "Indicates if this profile is relative to a subscription for a prepaid offer",
          "type": "boolean"
        },
        "expirationDate": {
          "format": "date-time",
          "description": "Expiration date of the subscription to the prepaid offer (creationDate + prepaidDuration)",
          "type": "string"
        },
        "provisioningNeeded": {
          "description": "Indicates if provisioning is needed on other component when assigning the user profile to this subscription (depends of thus subscribed offer)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/admin_users_GetUserProfilesSuccess_provisioningNeeded"
          }
        },
        "assignationDate": {
          "description": "Date when the subscription was attached to user profile",
          "type": "string"
        }
      }
    },
    "admin_users_GetUserProfilesSuccess_provisioningNeeded": {
      "required": [
        "providerType",
        "provisioningOngoing",
        "provisioningStartDate"
      ],
      "type": "object",
      "properties": {
        "providerType": {
          "description": "If provisioningNeeded is set, each element of the array must contain providerType. providerType defines the component on which the provisioning is needed when subscribing to this offer (provisioning is launched asynchronously when Business Store confirms through the callback that the subscription is created).",
          "enum": [
            "PGI",
            "JANUS"
          ],
          "type": "string"
        },
        "mediaType": {
          "description": "Only set if provisioningNeeded is set and the element of the array has providerType `JANUS`. Corresponds to the media type to use when provisioning the company account on JANUS component.",
          "enum": [
            "webrtc"
          ],
          "type": "string"
        },
        "provisioningOngoing": {
          "description": "Boolean indicating if the account is being provisioned on the other component. If set to false, the account has been successfully created on the component.",
          "type": "boolean"
        },
        "provisioningStartDate": {
          "description": "Provisioning starting date",
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "Bearer": {
      "type": "apiKey",
      "description": "For accessing the API a valid JWT token or a valid OAuth access token must be passed in all the queries in the 'Authorization' header. \n\n* JWT \n  * A valid JWT token is generated by the API and returned as answer of a call to the route GET /api/rainbow/authentication/v1.0/login giving a valid user & password.\n  * The following syntax must be used in the 'Authorization' header:   \nBearer xxxxxx.yyyyyyy.zzzzzz\n* OAuth access token \n  * A valid OAuth access token is generated and returned as answer of the OAuth 2.0 workflow with authorization code grant. This is done by calling the route GET /api/rainbow/authentication/v1.0/oauth/authorize to get an authorization code and then POST /api/rainbow/authentication/v1.0/oauth/token to exchange it agains an access token and a refresh token.\n  * The following syntax must be used in the 'Authorization' header:   \nBearer xxxxxxxxxxxxxxxxxxxx\n",
      "name": "Authorization",
      "in": "header"
    }
  },
  "tags": [
    {
      "name": "Bots"
    },
    {
      "name": "Clients Versions"
    },
    {
      "name": "Common"
    },
    {
      "name": "Companies Avatar"
    },
    {
      "name": "Companies Banner"
    },
    {
      "name": "Companies Custom Data"
    },
    {
      "name": "Companies Settings Webrtc"
    },
    {
      "name": "Companies Sites"
    },
    {
      "name": "Companies Visibility"
    },
    {
      "name": "Companies"
    },
    {
      "name": "Join Companies Links"
    },
    {
      "name": "Join Company Invitations"
    },
    {
      "name": "Join Company Requests"
    },
    {
      "name": "Link Ec To Bp Invitations"
    },
    {
      "name": "Link Ec To Bp Requests"
    },
    {
      "name": "Notifications Emails"
    },
    {
      "name": "Notifications Im"
    },
    {
      "name": "Operations Logs"
    },
    {
      "name": "Organisations Companies"
    },
    {
      "name": "Organisations"
    },
    {
      "name": "Pcg Pbxs Phone Numbers"
    },
    {
      "name": "Pcg Pbxs"
    },
    {
      "name": "Phone Numbers"
    },
    {
      "name": "Rainbow Catalogs"
    },
    {
      "name": "Rainbow Features"
    },
    {
      "name": "Rainbow Offers"
    },
    {
      "name": "Rainbow Profiles"
    },
    {
      "name": "Rooms"
    },
    {
      "name": "Settings Rainbow Change Log"
    },
    {
      "name": "Settings Webrtc"
    },
    {
      "name": "Sites Settings Webrtc"
    },
    {
      "name": "Sites Systems"
    },
    {
      "name": "Sites"
    },
    {
      "name": "Systems Groups"
    },
    {
      "name": "Systems Phone Numbers"
    },
    {
      "name": "Systems Phone Numbers Multi Companies"
    },
    {
      "name": "Systems Reset Password"
    },
    {
      "name": "Systems"
    },
    {
      "name": "Users Companies"
    },
    {
      "name": "Users Invitations"
    },
    {
      "name": "Users Networks"
    },
    {
      "name": "Users Profiles"
    },
    {
      "name": "Users"
    }
  ],
  "x-permissions": {
    "superadmin": {
      "name": "superadmin",
      "title": "ALE Admin",
      "description": "ALE Admin has high privileges on Rainbow API "
    },
    "support": {
      "name": "support",
      "title": "ALE Support",
      "description": "ALE Support has special privileges on API allowing them to perform technical tasks and debug operations on Rainbow application "
    },
    "admin": {
      "name": "admin",
      "title": "Company Admin",
      "description": "Company Admin have special privileges on Rainbow API allowing them to manage their company and users from their company "
    },
    "organization_admin": {
      "name": "organization_admin",
      "title": "Organization Admin",
      "description": "In a Multi-Layer organization that describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS, the organization administrator has the view on all companies below. him He can do all management actions for the entities below (companies, sites, systems).   \n  \nHe can manage the organization for which he is administrator and users attached to authorized companies "
    },
    "bp_admin": {
      "name": "bp_admin",
      "title": "BP Admin",
      "description": "BP Admin can manage the EC companies which are linked to this BP (bpId company field). For these companies, he can create, update, delete companies and users, he can manage the PBX connectivity and telephony users provisioning. He can give role BP finance to other BP users. "
    },
    "bp_finance": {
      "name": "bp_finance",
      "title": "BP Finance",
      "description": "BP Finance can make orders and modify existing subscription for his EC companies, and he can retrieve invoices. He can edit BP payment method. "
    },
    "company_admin": {
      "name": "company_admin",
      "title": "Company Admin",
      "description": "In a flat organization that describes single COMPANIES, a company_admin can manage his company and users from his company.   \n  \nIn a Multi-Layer organization that describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS, the company administrator has the view on all sites below him. He can do all management actions for the entities below (sites, systems).   \n  \nHe can manage the company for which he is administrator and users attached to authorized company "
    },
    "public": {
      "name": "public",
      "title": "Public",
      "description": "⚠️ This Rainbow API is accessible and documented publicly for external developers. "
    },
    "business_admin": {
      "name": "business_admin",
      "description": ""
    },
    "site_admin": {
      "name": "site_admin",
      "title": "Site Admin",
      "description": "In a Multi-Layer organization that describes a hierarchy including ORGANIZATIONS/COMPANIES/SITES/SYSTEMS, the site administrator has the view on all systems below him. He can do all management actions for the entities below (systems).   \n  \nHe can manage the site for which he is administrator "
    },
    "pcg": {
      "name": "pcg",
      "title": "PCG",
      "description": "Role for PCG. PCG has access to APIs for pbx and phone number management. "
    },
    "app_superadmin": {
      "name": "app_superadmin",
      "title": "ALE Application superadmin",
      "description": "ALE Application Admin has high privileges on applications "
    }
  },
  "x-servers": [
    {
      "url": "https://openrainbow.com",
      "description": "Production server"
    },
    {
      "url": "https://sandbox.openrainbow.com",
      "description": "Development server"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Bots",
      "tags": [
        "Bots"
      ]
    },
    {
      "name": "Clients Versions",
      "tags": [
        "Clients Versions"
      ]
    },
    {
      "name": "Common",
      "tags": [
        "Common"
      ]
    },
    {
      "name": "Companies",
      "tags": [
        "Companies Avatar",
        "Companies Banner",
        "Companies Custom Data",
        "Companies Settings Webrtc",
        "Companies Sso Settings",
        "Companies Settings For Pstn Conferences",
        "Companies Sites",
        "Companies",
        "Companies Visibility"
      ]
    },
    {
      "name": "Join",
      "tags": [
        "Join Companies Links",
        "Join Company Invitations",
        "Join Company Requests"
      ]
    },
    {
      "name": "Link",
      "tags": [
        "Link Ec To Bp Invitations",
        "Link Ec To Bp Requests"
      ]
    },
    {
      "name": "Organisations",
      "tags": [
        "Organisations Companies",
        "Organisations"
      ]
    },
    {
      "name": "Operations Logs",
      "tags": [
        "Operations Logs"
      ]
    },
    {
      "name": "Notifications",
      "tags": [
        "Notifications Emails",
        "Notifications Im"
      ]
    },
    {
      "name": "Sites",
      "tags": [
        "Sites Settings Webrtc",
        "Sites Systems",
        "Sites"
      ]
    },
    {
      "name": "Pcg",
      "tags": [
        "Pcg Pbxs Phone Numbers",
        "Pcg Pbxs"
      ]
    },
    {
      "name": "Phone Numbers",
      "tags": [
        "Phone Numbers"
      ]
    },
    {
      "name": "Rainbow",
      "tags": [
        "Rainbow Catalogs",
        "Rainbow Features",
        "Rainbow Offers",
        "Rainbow Profiles"
      ]
    },
    {
      "name": "Rooms",
      "tags": [
        "Rooms"
      ]
    },
    {
      "name": "Settings",
      "tags": [
        "Settings Rainbow Change Log",
        "Settings Webrtc"
      ]
    },
    {
      "name": "Systems",
      "tags": [
        "Systems Groups",
        "Systems Phone Numbers",
        "Systems Phone Numbers Multi Companies",
        "Systems Reset Password",
        "Systems"
      ]
    },
    {
      "name": "Users",
      "tags": [
        "Users Companies",
        "Users Invitations",
        "Users Networks",
        "Users Profiles",
        "Users"
      ]
    }
  ]
}