Tenant and Company (1.0)

Download OpenAPI specification:Download

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

Authentication

XCompleatApiKey

Security Scheme Type API Key
Header parameter name: x-api-compleat-key

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:
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

200

Successful response. Tenant information will be returned.

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

get/api/tenant/{tenantId}
/api/tenant/{tenantId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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:
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

200

Successful response. Shard-level identification for the requested tenant will be returned.

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

get/api/shard/{tenantId}
/api/shard/{tenantId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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:
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

200

Successful response. A list of companies for the requested tenant will be returned.

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

get/api/companies/{tenantId}
/api/companies/{tenantId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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:
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

200

Successful response. Shard-level identification for the requested tenant will be returned.

400

Bad request. Input data is invalid (more details in the response body).

401

Unauthorized. The secure credentials passed do not allow access to this resource.

500

An internal error has occurred.

get/api/company/{tenantId}/{companyId}
/api/company/{tenantId}/{companyId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}