Platform APIs (1.0.0)
Download OpenAPI specification:Download
Platform APIs serve primarily for two purposes:
- Authorisation service which generates access tokens required by Capitalise APIs (e.g. other Platform and Business API resources)
- Managing resources exists in the platform (e.g. tenants, and soon to be live user management)
Generate an API Key
Generate an API Key
Authorizations:
Request Body schema: application/json
expiresAt | string <date-time> The date your API key will expire. Empty value will generate a permanent token |
name required | string A name for the API key |
partnerApiKey | string The API key of the Capitalise partner |
scopes required | Array of strings Items Enum: "funding:read" "funding:write" "insights:read" "offline_access" "profile:multiples" "profile:read" "profile:write" "questionnaire:read" "questionnaire:write" "scoring:read" |
Responses
Response Schema: application/json
key | string Capitalise API key |
partnerApiKey | string Capitalise API key |
Request samples
- Payload
{- "name": "My first API key",
- "partnerApiKey": "API_PARTNER_KEY",
- "scopes": [
- "profile:multiples",
- "profile:read",
- "profile:write",
- "questionnaire:read",
- "questionnaire:write",
- "funding:read",
- "funding:write",
- "insights:read",
- "scoring:read",
- "offline_access"
], - "expiresAt": "2021-11-24T18:03:28.241Z"
}
Response samples
- 200
{- "key": "string",
- "partnerApiKey": "string"
}
Generate login token
Login token is used to generate API key. Practically, this should be a one-off API call which allow you programmatically generate the access token to subsequently generate API key.
Request Body schema: application/json
email required | string |
password required | string |
Responses
Response Schema: application/json
access_token | string |
expires_in | number |
refresh_token | string |
refresh_token_expires_in | number |
scope | string |
token_type | string |
Request samples
- Payload
{- "email": "string",
- "password": "string"
}
Response samples
- 200
{- "access_token": "string",
- "refresh_token": "string",
- "refresh_token_expires_in": 0,
- "scope": "string",
- "expires_in": 0,
- "token_type": "string"
}
Generate platform access token
Authorizations:
header Parameters
Capitalise-tenant-id | string Optional field to restrict the access token access to the specified tenant. If not provided, the access token can manage all tenants. Highly recommended for individual tenant management as it ensures you access the right data. |
X-API-Key required | string API Key |
Responses
Response Schema: application/json
access_token | string Example: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InByb2ZpbGU6bXVsdGlwbGVzIG9mZmxpbmVfYWNjZXNzIiwidXNlck1ldGFkYXRhIjp7fSwiYXBwTWV0YWRhdGEiOnsidXNlciI6eyJpZCI6MTkyMiwiZW1haWwiOiJleGFtcGxlQGFjbWVsaW1pdGVkLmNvbSIsIm5hbWUiOiJFeGFtcGxlIFVzZXIifSwiZW50aXR5Ijp7ImlkIjoxMDIwMiwidHlwZSI6IklOVFJPRFVDRVIiLCJjb3VudHJ5Q29kZSI6IkdCIn0sImFwaUtleVRva2VuSWQiOiI2Mjc5NGM3NjZhYmFjOTZlNjNjYTFlZGNmIiwidHlwZSI6ImVudGl0eSJ9LCJpYXQiOjE2NjA2NDEzOTIsImV4cCI6MTY2MDY3NzM5MiwiaXNzIjoiY2FwaXRhbGlzZSIsImp0aSI6IjQ0M2I3ZDc4LTVmMzctNDdkNC1hY2IzLTQ1MTZjNmM4N2FkNiJ9.EhFWMFuA0k0TdXbM7dJxs8Vw-kQZ315RkOasZL7-ycEUgRPkf_OzIge2Y5ThLKm-sC43IEzP1Lb_UcXUU8-1BNQI5js6gSrWT6lPCG-slb1ApZrSv29LcX6xq9VYvXCmB-tj5UPUcWirG-tPGI8a98E8ZVBFKhYF9-kBj9-CJNXFAAPXmDAhmmSb6BLX6pciTr08wZ5dC77Gw09Zl_TI9fS-Vt2sZ-vbI9TaQh4_Q1uqvzQsQHjMVvBby9eT3DDL4ubOpVh7SGczoBAlQYcppLfjVOOX0fGwOSYePqDo37LLKgKBefFocQh9nssp5RFnIhinWn_bmBio3k17k0ewYg" The platform access token |
expires_in | integer Example: "36000" The expiry of |
refresh_token | string Example: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InByb2ZpbGU6bXVsdGlwbGVzIG9mZmxpbmVfYWNjZXNzIiwidXNlck1ldGFkYXRhIjp7fSwiYXBwTWV0YWRhdGEiOnsidXNlciI6eyJpZCI6MTkyMiwiZW1haWwiOiJleGFtcGxlQGFjbWVsaW1pdGVkLmNvbSIsIm5hbWUiOiJFeGFtcGxlIFVzZXIifSwiZW50aXR5Ijp7ImlkIjoxMDIwMiwidHlwZSI6IklOVFJPRFVDRVIiLCJjb3VudHJ5Q29kZSI6IkdCIn0sImFwaUtleVRva2VuSWQiOiI2Mjc5NGM3NjZhYmFjOTZlNjNjYTFlZGNmIiwidHlwZSI6ImVudGl0eSJ9LCJpYXQiOjE2NjA2NDEzOTIsImV4cCI6MTY2MDY3NzM5MiwiaXNzIjoiY2FwaXRhbGlzZSIsImp0aSI6IjQ0M2I3ZDc4LTVmMzctNDdkNC1hY2IzLTQ1MTZjNmM4N2FkNiJ9.I_ZuJD8knx6XU8O1uJyU8fHfPgxAN8uLIX-7bQ1POJbnZD0sYsdxDTdVp5-aAGFouNRe6cbS0IB0hxj1YocI28lYFI6icPbeb0deMqJon562KCyyFflQJN_bLx_9WHvwa0ZireUhEK6MIX2SmCs6k5zqhoKBvj897byfyyZupXtSZnJDzxv4s8Li3rtuAsLZWX3ZiKmkBsat-9RRm2JXL7Ea2jfjAvGUo2Lifty44ktF2l378zxUxKhaUTORpSV48swZhCpOU6eY2BU_oyfQ4i2H6vZISH3fqmZIE5PytlD8twxMyNoaksG0payQICorJBbjohBTl5QKdIw_MIWxHOQ" The refresh token |
scope | string Example: "profile:multiples offline_access" The scopes that the platform access token should have |
token_type | string Example: "Bearer" The token type |
Response samples
- 201
{- "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InByb2ZpbGU6bXVsdGlwbGVzIG9mZmxpbmVfYWNjZXNzIiwidXNlck1ldGFkYXRhIjp7fSwiYXBwTWV0YWRhdGEiOnsidXNlciI6eyJpZCI6MTkyMiwiZW1haWwiOiJleGFtcGxlQGFjbWVsaW1pdGVkLmNvbSIsIm5hbWUiOiJFeGFtcGxlIFVzZXIifSwiZW50aXR5Ijp7ImlkIjoxMDIwMiwidHlwZSI6IklOVFJPRFVDRVIiLCJjb3VudHJ5Q29kZSI6IkdCIn0sImFwaUtleVRva2VuSWQi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TVmMzctNDdkNC1hY2IzLTQ1MTZjNmM4N2FkNiJ9.I_ZuJD8knx6XU8O1uJyU8fHfPgxAN8uLIX-7bQ1POJbnZD0sYsdxDTdVp5-aAGFouNRe6cbS0IB0hxj1YocI28lYFI6icPbeb0deMqJon562KCyyFflQJN_bLx_9WHvwa0ZireUhEK6MIX2SmCs6k5zqhoKBvj897byfyyZupXtSZnJDzxv4s8Li3rtuAsLZWX3ZiKmkBsat-9RRm2JXL7Ea2jfjAvGUo2Lifty44ktF2l378zxUxKhaUTORpSV48swZhCpOU6eY2BU_oyfQ4i2H6vZISH3fqmZIE5PytlD8twxMyNoaksG0payQICorJBbjohBTl5QKdIw_MIWxHOQ",
- "scope": "profile:multiples offline_access",
- "token_type": "Bearer"
}
Refresh a platform access token
Request Body schema: application/json
refresh_token | string The refresh token |
Responses
Response Schema: application/json
access_token | string Example: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InByb2ZpbGU6bXVsdGlwbGVzIG9mZmxpbmVfYWNjZXNzIiwidXNlck1ldGFkYXRhIjp7fSwiYXBwTWV0YWRhdGEiOnsidXNlciI6eyJpZCI6MTkyMiwiZW1haWwiOiJleGFtcGxlQGFjbWVsaW1pdGVkLmNvbSIsIm5hbWUiOiJFeGFtcGxlIFVzZXIifSwiZW50aXR5Ijp7ImlkIjoxMDIwMiwidHlwZSI6IklOVFJPRFVDRVIiLCJjb3VudHJ5Q29kZSI6IkdCIn0sImFwaUtleVRva2VuSWQiOiI2Mjc5NGM3NjZhYmFjOTZlNjNjYTFlZGNmIiwidHlwZSI6ImVudGl0eSJ9LCJpYXQiOjE2NjA2NDEzOTIsImV4cCI6MTY2MDY3NzM5MiwiaXNzIjoiY2FwaXRhbGlzZSIsImp0aSI6IjQ0M2I3ZDc4LTVmMzctNDdkNC1hY2IzLTQ1MTZjNmM4N2FkNiJ9.EhFWMFuA0k0TdXbM7dJxs8Vw-kQZ315RkOasZL7-ycEUgRPkf_OzIge2Y5ThLKm-sC43IEzP1Lb_UcXUU8-1BNQI5js6gSrWT6lPCG-slb1ApZrSv29LcX6xq9VYvXCmB-tj5UPUcWirG-tPGI8a98E8ZVBFKhYF9-kBj9-CJNXFAAPXmDAhmmSb6BLX6pciTr08wZ5dC77Gw09Zl_TI9fS-Vt2sZ-vbI9TaQh4_Q1uqvzQsQHjMVvBby9eT3DDL4ubOpVh7SGczoBAlQYcppLfjVOOX0fGwOSYePqDo37LLKgKBefFocQh9nssp5RFnIhinWn_bmBio3k17k0ewYg" The platform access token |
expires_in | integer Example: "36000" The expiry of |
refresh_token | string Example: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InByb2ZpbGU6bXVsdGlwbGVzIG9mZmxpbmVfYWNjZXNzIiwidXNlck1ldGFkYXRhIjp7fSwiYXBwTWV0YWRhdGEiOnsidXNlciI6eyJpZCI6MTkyMiwiZW1haWwiOiJleGFtcGxlQGFjbWVsaW1pdGVkLmNvbSIsIm5hbWUiOiJFeGFtcGxlIFVzZXIifSwiZW50aXR5Ijp7ImlkIjoxMDIwMiwidHlwZSI6IklOVFJPRFVDRVIiLCJjb3VudHJ5Q29kZSI6IkdCIn0sImFwaUtleVRva2VuSWQiOiI2Mjc5NGM3NjZhYmFjOTZlNjNjYTFlZGNmIiwidHlwZSI6ImVudGl0eSJ9LCJpYXQiOjE2NjA2NDEzOTIsImV4cCI6MTY2MDY3NzM5MiwiaXNzIjoiY2FwaXRhbGlzZSIsImp0aSI6IjQ0M2I3ZDc4LTVmMzctNDdkNC1hY2IzLTQ1MTZjNmM4N2FkNiJ9.I_ZuJD8knx6XU8O1uJyU8fHfPgxAN8uLIX-7bQ1POJbnZD0sYsdxDTdVp5-aAGFouNRe6cbS0IB0hxj1YocI28lYFI6icPbeb0deMqJon562KCyyFflQJN_bLx_9WHvwa0ZireUhEK6MIX2SmCs6k5zqhoKBvj897byfyyZupXtSZnJDzxv4s8Li3rtuAsLZWX3ZiKmkBsat-9RRm2JXL7Ea2jfjAvGUo2Lifty44ktF2l378zxUxKhaUTORpSV48swZhCpOU6eY2BU_oyfQ4i2H6vZISH3fqmZIE5PytlD8twxMyNoaksG0payQICorJBbjohBTl5QKdIw_MIWxHOQ" The refresh token |
scope | string Example: "profile:multiples offline_access" The scopes that the platform access token should have |
token_type | string Example: "Bearer" The token type |
Request samples
- Payload
{- "refresh_token": "string"
}
Response samples
- 201
{- "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InByb2ZpbGU6bXVsdGlwbGVzIG9mZmxpbmVfYWNjZXNzIiwidXNlck1ldGFkYXRhIjp7fSwiYXBwTWV0YWRhdGEiOnsidXNlciI6eyJpZCI6MTkyMiwiZW1haWwiOiJleGFtcGxlQGFjbWVsaW1pdGVkLmNvbSIsIm5hbWUiOiJFeGFtcGxlIFVzZXIifSwiZW50aXR5Ijp7ImlkIjoxMDIwMiwidHlwZSI6IklOVFJPRFVDRVIiLCJjb3VudHJ5Q29kZSI6IkdCIn0sImFwaUtleVRva2VuSWQiOiI2Mjc5NGM3NjZhYmFjOTZlNjNjYTFlZGNmIiwidHlwZSI6ImVudGl0eSJ9LCJpYXQiOjE2NjA2NDEzOTIsImV4cCI6MTY2MDY3NzM5MiwiaXNzIjoiY2FwaXRhbGlzZSIsImp0aSI6IjQ0M2I3ZDc4LTVmMzctNDdkNC1hY2IzLTQ1MTZjNmM4N2FkNiJ9.EhFWMFuA0k0TdXbM7dJxs8Vw-kQZ315RkOasZL7-ycEUgRPkf_OzIge2Y5ThLKm-sC43IEzP1Lb_UcXUU8-1BNQI5js6gSrWT6lPCG-slb1ApZrSv29LcX6xq9VYvXCmB-tj5UPUcWirG-tPGI8a98E8ZVBFKhYF9-kBj9-CJNXFAAPXmDAhmmSb6BLX6pciTr08wZ5dC77Gw09Zl_TI9fS-Vt2sZ-vbI9TaQh4_Q1uqvzQsQHjMVvBby9eT3DDL4ubOpVh7SGczoBAlQYcppLfjVOOX0fGwOSYePqDo37LLKgKBefFocQh9nssp5RFnIhinWn_bmBio3k17k0ewYg",
- "expires_in": "36000",
- "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InByb2ZpbGU6bXVsdGlwbGVzIG9mZmxpbmVfYWNjZXNzIiwidXNlck1ldGFkYXRhIjp7fSwiYXBwTWV0YWRhdGEiOnsidXNlciI6eyJpZCI6MTkyMiwiZW1haWwiOiJleGFtcGxlQGFjbWVsaW1pdGVkLmNvbSIsIm5hbWUiOiJFeGFtcGxlIFVzZXIifSwiZW50aXR5Ijp7ImlkIjoxMDIwMiwidHlwZSI6IklOVFJPRFVDRVIiLCJjb3VudHJ5Q29kZSI6IkdCIn0sImFwaUtleVRva2VuSWQiOiI2Mjc5NGM3NjZhYmFjOTZlNjNjYTFlZGNmIiwidHlwZSI6ImVudGl0eSJ9LCJpYXQiOjE2NjA2NDEzOTIsImV4cCI6MTY2MDY3NzM5MiwiaXNzIjoiY2FwaXRhbGlzZSIsImp0aSI6IjQ0M2I3ZDc4LTVmMzctNDdkNC1hY2IzLTQ1MTZjNmM4N2FkNiJ9.I_ZuJD8knx6XU8O1uJyU8fHfPgxAN8uLIX-7bQ1POJbnZD0sYsdxDTdVp5-aAGFouNRe6cbS0IB0hxj1YocI28lYFI6icPbeb0deMqJon562KCyyFflQJN_bLx_9WHvwa0ZireUhEK6MIX2SmCs6k5zqhoKBvj897byfyyZupXtSZnJDzxv4s8Li3rtuAsLZWX3ZiKmkBsat-9RRm2JXL7Ea2jfjAvGUo2Lifty44ktF2l378zxUxKhaUTORpSV48swZhCpOU6eY2BU_oyfQ4i2H6vZISH3fqmZIE5PytlD8twxMyNoaksG0payQICorJBbjohBTl5QKdIw_MIWxHOQ",
- "scope": "profile:multiples offline_access",
- "token_type": "Bearer"
}
Create a tenant
A tenant is property or product within a company.
Authorizations:
Request Body schema: application/json
referenceId | string Example: "CompanyA-9320498" A unique referenece. Highly recommend not to use personal identifiable information. |
Responses
Response Schema: application/json
createdDateTime required | string <date-time> non-empty Example: "2022-04-25T08:49:17.000Z" Tenant created date and time |
id required | string non-empty Example: "40d0dc8e-20ff-4efc-b905-61c236c68c1e" Tenant ID |
referenceId | string non-empty Example: "CompanyA-9320498" Unique reference ID provided by you |
updatedDateTime required | string <date-time> non-empty Example: "2022-04-25T08:49:17.000Z" Tenant update date and time |
Request samples
- Payload
Response samples
- 201
{- "id": "40d0dc8e-20ff-4efc-b905-61c236c68c1e",
- "referenceId": "CompanyA-9320498",
- "createdDateTime": "2022-04-25T08:49:17.000Z",
- "updatedDateTime": "2022-04-25T08:49:17.000Z"
}
Retrieve tenants
Retrieve all tenants
Authorizations:
query Parameters
limit | integer [ 0 .. 100 ] Count of tenants to return in the response |
offset | integer >= 0 Count of tenants to offset |
Responses
Response Schema: application/json
required | Array of objects (Tenants response) [ 0 .. 100 ] items unique | ||||||||
Array ([ 0 .. 100 ] items)
| |||||||||
required | object | ||||||||
| |||||||||
required | object | ||||||||
|
Response samples
- 200
{- "data": [
- {
- "id": "40d0dc8e-20ff-4efc-b905-61c236c68c1e",
- "referenceId": "CompanyA-9320498",
- "createdDateTime": "2022-04-25T08:49:17.000Z",
- "updatedDateTime": "2022-04-25T08:49:17.000Z"
}
], - "links": {
- "self": "string",
- "prev": "string",
- "next": "string"
}, - "meta": {
- "totalEntries": 0
}
}
Update a tenant reference
A tenant is property or product within a company.
Authorizations:
path Parameters
tenantId required | string The tenant ID to be updated |
Request Body schema: application/json
referenceId | string Example: "CompanyA-9320498" A unique referenece. Highly recommend not to use personal identifiable information. |
Responses
Request samples
- Payload