Create a Customer

Create a new Customer

Request

Endpoint: /api/customers
Method: POST
Headers: Accept: application/vnd.cloudlx.v1+json
Authorization: Bearer <access_token>

JSON Request

                                
    {
        "name": "Example Company",
        "currency_iso": "GBP",
        "country_iso": "GB",
        "realms": [
            1,
            2,
            7
        ],
        "shown_sub_realms": [
            313,
            328
        ],
        "enabled_sub_realms": [
            313
        ],
        "email": "j.smith@example.com",
        "first_name": "John",
        "last_name": "Smith",
        "phone": "+442071234567",
        "time_zone": "Europe/London",
        "role_group": "Admin"
    }
                                
                            

JSON Parameters

name Description A name for the customer
Type String
Example Customer 1
currency_iso Description ISO code for the customer's default currency
Type String
Example GBP
country_iso Description ISO2 code for the customer's country of registration.
Type String
Example GB
realms Description An array of IDs for the realms the customer can access. Realms can be discovered via them Realms API endpoint.
Type Array[Integer]
Example [1,2,7]
shown_sub_realms Description An array of IDs for the sub-realms the customer can see. Sub-Realms can be discovered via them Sub-Realms API endpoint.
Type Array[Integer]
Example [313,328]
enabled_sub_realms Description An array of IDs for the sub-realms the customer can access. Sub-Realms can be discovered via them Sub-Realms API endpoint.
Type Array[Integer]
Example [313]
email Description The initial user's email
Type String
Example j.smith@example.com
first_name Description The user name
Type String
Example John
last_name Description The initial user's last name
Type String
Example Smith
phone Description The initial user's phone number
Type String
Example +442071234567
time_zone Description The initial user's default time_zone
Type String (any valid timezone available in the IANA timezone database).
Example Europe/London
role_group Description The user's role (permissions group).
Type String (any of; Read Only, User, Admin).
Example User

Response

The customer model is returned with a 200 HTTP response code.

Example:

                                
    {
        "id": 6918,
        "name": "Test Customer API 2",
        "currency": {
            "name": "GBP - British Pound",
            "iso_2": "GB",
            "iso_3": "GBP"
        },
        "country": {
            "iso_2": "GB",
            "name": "United Kingdom"
        },
        "realms": [
            {
                "name": "Networking",
                "description": "Cloud Link Exchange"
            },
            {
                "name": "Voice",
                "description": "Use the Voice app to buy geographic, toll free, mobile, and premium rate numbers globally."
            },
        ],
        "sub_realms": [
            {
                "id": 313,
                "name": "SD WAN",
                "description": null,
                "has_access": true
            },
            {
                "id": 328,
                "name": "Cloud SBC & Conversion",
                "description": null,
                "has_access": false
            }
        ]
    }
                                
                            

Back to top