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",
        "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 GB
currency_iso Description ISO2 code for the customer's currency
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]

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