Tenant and Company (1.0)

Download OpenAPI specification:Download

Top-level APIs that allow you to retrieve Tenant and Company information.

Tenant

Tenant

Specify the ID of the tenant in the URL for the GET request to indicate the tenant you would like to retrieve information for. The security key passed in the HTTP headers must be valid for that tenant ID. If the tenant ID is not recognised or the security key is invalid for that tenant, an HTTP 401 will be returned.

Authorizations:
XCompleatApiKey
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to retrieve information for. The account requesting the data must have access to this tenant Id.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

Response samples

Content type
application/json
{
  • "Id": "d025eedc-5ea0-4de8-be9f-f8873545add9",
  • "Name": "Example",
  • "Active": true,
  • "AccountType": "DirectCustomer",
  • "FreeTrialEndDate": null,
  • "DateAdded": "2017-10-11T12:57:29.1",
  • "BillingDayOfMonth": 7,
  • "BillingMonthOfYear": 3,
  • "LastPaymentDate": "2018-08-07T00:00:00",
  • "NextPaymentDate": "2020-05-07T00:00:00",
  • "CreditBalance": 14100,
  • "VatNumber": "",
  • "RegisteredCountryCode": "GBR",
  • "ConfirmedNotVatRegistered": false,
  • "LicensedUsers": 20,
  • "PaymentFrequency": "Monthly",
  • "OwesPayment": false,
  • "InCreditControl": false,
  • "CultureCode": "en-GB",
  • "Modules": [
    ],
  • "MetaData": {}
}

Shard

Specify the ID of the tenant in the URL for the GET request to indicate the tenant you would like to retrieve shard information for. The security key passed in the HTTP headers must be valid for that tenant ID. If the tenant ID is not recognised or the security key is invalid for that tenant, an HTTP 401 will be returned.

This API can be called on any shard, and will return shard level information for that tenant. All other API calls must be made to the shard that the tenant is registered on. So this call exists to allow a third party to determine which URL endpoint to direct all further communications with for a given tenant, if they do not know in advance.

Authorizations:
XCompleatApiKey
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to retrieve information for. The account requesting the data must have access to this tenant Id.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

Response samples

Content type
application/json
{}

Companies

Used to retrieve company information. Every tenant has one or more companies associated with it. This will retrieve summary information on all companies created under a tenant's account.

Specify the ID of the tenant in the URL for the GET request to indicate the tenant you would like to retrieve a list of companies for. The security key passed in the HTTP headers must be valid for that tenant ID. If the tenant ID is not recognised, an HTTP 401 will be returned.

Authorizations:
XCompleatApiKey
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to retrieve information for. The account requesting the data must have access to this tenant Id.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

Response samples

Content type
application/json
{
  • "Companies": [
    ],
  • "MetaData": {}
}

Company

Used to retrieve detailed information on a specific company.

Specify the ID of the tenant in the URL for the GET request, followed by the company ID that you wish to retrieve information for. The security key passed in the HTTP headers must be valid for that tenant ID. If the tenant ID is not recognised, an HTTP 401 will be returned.

If the company ID specified is not found for the tenant ID specified, then a 400 error will be returned, with a MetaData error code of 2 (Unknown Company).

Authorizations:
XCompleatApiKey
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to retrieve information for. The account requesting the data must have access to this tenant Id.

companyId
required
string <guid>
Example: fccaeb17-ec8e-4cf7-8f56-2204a76d5eb8

Id of the company to retrieve information for. Must be a valid company within the tenant.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

Response samples

Content type
application/json
{}