Skip to main content
Skip table of contents

API & Integrations Start Guide

Overview

The Cloudmore API is a RESTful API that Cloudmore customers can use to order and manage services and subscriptions, as well as retrieve billing information.

The Cloudmore API enables the automation of routine tasks such as:

  • Retrieve service and product information to display in their online portals.

  • Create customers and users in Cloudmore and external cloud services.

  • Create subscriptions for different services and assign subscriptions to users.

  • Suspend, cancel, and delete subscriptions.

  • Configure and update pricing for products and set customer-specific prices.

  • Retrieve billing information to integrate with external ERP and financial reporting systems.

This API documentation explains how to access the Cloudmore API and includes examples to help you get started.

For more details about the API documentation, refer to the Swagger Documentation.

Most common API use cases

Organization Management

The Organizations API in Cloudmore enables integration with ERP or CRM systems.. It keeps customer data synchronized and up to date across platforms. This reduces manual data entry and improves operational efficiency. Ideal for businesses seeking streamlined system connectivity.
The API Guide for Organization Management provides additional information.

User Management

The User management API helps in automating user creation, with Cloudmore’s Users API simplifies access management across your organization. It streamlines employee onboarding and offboarding by automatically granting or revoking platform access, and enables automatic creation of Organization Admin users during customer onboarding.
The API Guide for User Management provides additional information.

Service Integration

Cloudmore’s flexible platform allows external services to be integrated and showcased in its marketplace. When setting up a service, you can choose between triggering an email for a quick and simple start or initiating a webhook call for full automation. Webhook integration requires a Cloudmore Service Connector, which acts as middleware to relay and translate communications between Cloudmore and the external service, enabling seamless end-to-end provisioning.

The API Guide for Service Integration provides additional information.

Metered Subscriptions Automation

The metered subscriptions automation is about how Cloudmore manages metered subscriptions, where billing is based on actual usage rather than licenses. Consumption data must be submitted for each customer, triggering automatic billing typically in arrears for the previous period. It also outlines how to automate data submission to ensure accurate and timely billing.
The API Guide for Metered Subscriptions Automation provides detailed information.

Price Management

Cloudmore Price Management APIs enable automated updates to global or customer-specific pricing, ensuring timely and accurate adjustments. By integrating these APIs into your pricing workflow, you can maintain profitability, prevent margin erosion, and support scalable, responsive pricing strategies across services and customer segments.
The API Guide for Price Management provides additional information.

Billing Integration

Cloudmore Billing APIs support seamless billing integration with ERP or financial systems, typically requiring just one API call to retrieve monthly billing data. Billing dates vary by service—for example, Microsoft NCE data is available between the 6th and 8th, while legacy services follow partner-specific schedules. For most organizations, retrieving billing data once or twice a month is sufficient for accurate processing.
The API Guide for Billing Integration provides additional information.

Steps for getting started

1. Request API Access

To access the Cloudmore API, you need to send a request to support@cloudmore.com. The Cloudmore support team will verify that you're a valid customer and approve your request. Once approved, they will provide you with a client secret and your resellerId/sellerId. The client secret adds an extra layer of security and must be included in your authentication request. The resellerId or sellerId is a unique identifier for your Cloud Service Broker or Seller account and must be included in all API calls after authentication.

2. Create API user

The API credentials in Cloudmore consist of a valid admin account with API access enabled, which must be set up by the Broker or Seller. It’s strongly recommended to create a dedicated account specifically for API access, and to use a separate account for each integrated application. This approach enhances security, makes it easier to disable access when needed, and simplifies troubleshooting by keeping API logs associated with individual applications.

Steps to create an admin account with API access:

  1. Log in to Cloudmore.

  2. Navigate to Broker > Administrators.

  3. Click the New administrator button.

  4. Fill out the user name, first name, last name, display name, job title, email address, and cell phone.

  5. In the Role dropdown, please select Global Admin.

  6. Select to generate a password or fill out a password in the password fields. We recommend that you use a complex password of at least 20 characters for an API account.

  7. Click the More button.

  8. Scroll to the bottom and select Allow REST API access.

  9. Click on Create.

Authentication

Cloudmore API uses the Open Authorization (OAuth) 2.0 authorization framework for token-based authentication.

OAuth is an open standard that provides secure access to protected resources.

To use the Cloudmore API, you need to request an access token. After you receive an access token, include the access token in the header of all requests to the Cloudmore API.

An access token is valid for 24 hours. Please use the same access token until it is about to expire.

To request an access token, you will need the following:

  1. API secret provided by Cloudmore.

  2. API user username (created in Cloudmore)

  3. API user password (created in Cloudmore)

Encode API SECRET

To request an access token for the Cloudmore API, your API credentials must be encoded into a Base64 string. Most programming languages offer built-in functions to handle Base64 encoding, and there are also online tools available for quick encoding.

You should encode your credentials in the format:
client_id:client_secret

For example, if your clientId is ro.customer.client, you would combine it with your clientSecret, then encode the full string into Base64. This encoded string is then included in your authentication request to securely access the API.

Example of a base64 encoded string: cm7iy4MZeH8tZxIpY3xpZW60OkBsb4VkWGg5cmvPUT2TZWMyMzc=

Request Access Token

To get an access token from Cloudmore Authentication API, make a request to: https://api.cloudmore.com/connect/token

In the following request, the Authorization base64 string and {username} and {password} need to be updated with actual values.

Curl to Fetch the Access Token
BASH
curl -X POST https://api.cloudmore.com/connect/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic VGhpc0lzTXlQYXNzd29yZA==' \
-d 'grant_type=password&username={username}&password={password}&scope=api'

Important fields related to requesting an access token:

  1. Authorization: The text Basic followed by a space and the base64 encoded API secret.

    Example: “Basic VGhpc0lzTXlQYXNzd29yZA==”

  2. grant_type: The grant type value for the client credentials grant mechanism. The value must be password&username and the credentials for the API accounts need to be submitted.

    Example: grant_type=password&username={myuser@broker.com}&password={myPassword}&scope=api’

  3. scope: The scope of the access request. The value must be api.

The response from the API is as follows:

JSON
{
 "access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IkMzRERCQTEzNkU4MzFDN...",
 "expires_in":86400,
 "token_type":"Bearer"
}

Important fields related to response:

  1. access_token: The generated access token that is used to authorize your API requests.
    To prove your identity, you must include an access token in the header of all requests you make to the Cloudmore API. Use the token as the value of the Authorization parameter in the API request header.

  2. token_type: The type of token generated. The value is always Bearer.

  3. expires_in: The amount of time until the access token expires, in seconds. The value is always 86400.

Access Token Expiration

When you generate an access token in Cloudmore, it remains valid for 24 hours (86400 seconds). You can continue using the same token for API requests until it expires. After expiration, you’ll need to request a new token. If you try to use an expired token, the system will respond with a 401 Unauthorized error.

To manage token renewal, you can either:

  • Track the time since the token was issued and request a new one before it expires (based on the expires_in value).

  • Wait for a 401 error, then immediately request a new token when it occurs.

Making an API request

HTTP Requests

Use these components to construct HTTP requests to the Cloudmore API.

Parameter

Description

HTTP Method

GET – Request data from the API
POST – Submits data to the API
PUT – Updates all properties in a resource
PATCH – Update certain properties in a resource
DELETE – Deletes data in a resource

Base API URL

https://api.cloudmore.com

Path Parameters

A Broker or a Seller unique identifier needs to be provided as a path parameter: {baseApiUrl}/api/resellers/{resellerId}/organizations/

Other IDs are also provided as path parameters.

Query Parameters

Some API calls allow for query parameters to filter or limit the request data. For example:
?startDate=2023-01-01&endDate=2023-02-01

Each endpoint supports different query parameters.

Request Headers

Each API request needs to include the following headers:

CODE
Authorization: The access token that was received from the Cloudmore Authentication API.
Content-type: application/json
Accept: application/json

In curl, you specify headers with the -h command.

Request Body

The request body is the data to submit with the API request. Some API endpoints require you to include JSON data in the request body.

In curl, you specify the data to submit with the -d command.

Example Requests:

Get all organizations under a broker
BASH
curl -X GET https://api.cloudmore.com/api/resellers/{resellerId}/Organizations \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'
Create a new organization
BASH
curl -X POST https://api.cloudmore.com/api/resellers/{resellerId}/Organizations \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
 "name": "My Test Organization",
 "registrationNumber": "123456789",
 "vat": "123456789",
 "contact": {
 "name": "John Doe",
 "email": "john.doe@mytestorganization.com",
 "phone": "123456789",
 "cellPhone": "123456789"
 },
 "customerNumber": "123456789",
 "notificationEmail": "john.doe@mytestorganization.com",
 "address": {
 "street": "street 1",
 "postalCode": "12345",
 "city": "stockholm",
 "countryCode": "SE"
 },
 "primaryDomain": "mytestorganization.com"
}'

Retrieving API responses

Some Cloudmore API calls return data in JSON format within the response body.

For instance, when you send a GET request to the endpoint /api/resellers/{{resellerId}}/Organizations, the response includes detailed information about the organizations managed by the broker. This data can be used for integration, reporting, or synchronization with other systems.

Details listing the organizations under a broker
JSON
[
 {
 "id": "ff0eb40d-26f9-4cbb-b431-10fe66bc838e",
 "name": "My Test Organization 1",
 "displayName": "My Test Organization 1",
 "services": 2,
 "users": 1
 },
 {
 "id": "d0b55801-6cac-4221-a911-0712e78615c7",
 "name": "My Test Organization 2",
 "displayName": "My Test Organization 2",
 "services": 1,
 "users": 0
 },
 {
 "id": "a57a8428-80e6-4666-b549-c39873eef2ea",
 "name": "My Test Organization 3",
 "displayName": "My Test Organization 3",
 "services": 0,
 "users": 1
 }
]

Status and error codes

Cloudmore API uses HTTP status codes to indicate the success or failure of a request:

Status Code

Description

200 Success

The request succeeded.

201 Created

The request succeeded, and the resource was created.

204 No Content

The server processed the request successfully but did not return a response.

400 Bad Request

The API does not understand the request because of bad syntax. This could be because:

  • The request did not include a required parameter

  • The request parameter data was not in the correct format

  • The request parameters do not match the expected data types

401 Unauthorized

Authentication failed because credentials were missing or invalid.

403 Forbidden

The request failed because you did not have permission to perform the action or access the resource.

404 Not Found

The resource specified in the request does not exist. To resolve this error, make sure that the request
includes a valid resource.

405 Method Not Allowed

The method is not allowed for the resource specified in the request.

500 Server Error

An error occurred on the server.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.