TrustLayer compliance-profiles API
The compliance-profiles API from TrustLayer — 8 operation(s) for compliance-profiles.
The compliance-profiles API from TrustLayer — 8 operation(s) for compliance-profiles.
openapi: 3.0.0
info:
title: TrustLayer Platform Auth compliance-profiles API
version: '1.0'
contact:
name: TrustLayer Support
email: support@trustlayer.io
termsOfService: https://trustlayer.io/terms-of-service
externalDocs:
description: OpenAPI specification
url: /v1/platform-api.yaml
description: '3rd-party API for the TrustLayer platform.
**Deprecated.** Platform API v1 is deprecated as of 01 June 2026 and is
scheduled for sunset (end-of-life) on 31 March 2027. It remains fully
available until the sunset date but will not receive new features. Please
migrate to Platform API v2 for new integrations.
All v1 responses carry the standard deprecation response headers
([RFC 8594](https://www.rfc-editor.org/rfc/rfc8594)):
```http
Deprecation: @1780272000
Sunset: Wed, 31 Mar 2027 23:59:59 GMT
Link: <https://developers.trustlayer.io/>; rel="deprecation", <https://developers.trustlayer.io/>; rel="sunset"
```
`Deprecation: @1780272000` is the Unix timestamp for 2026-06-01T00:00:00Z;
sunset (end-of-life) is 2027-03-31T23:59:59 GMT.'
x-deprecated: true
x-deprecation-date: '2026-06-01'
x-sunset: '2027-03-31'
license:
name: Apache 2.0
url: https://apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:4000/v1
description: Local
- url: https://api.trustlayer.io/v1
description: Production
security:
- API Key: []
tags:
- name: compliance-profiles
paths:
/compliance-profiles:
get:
summary: List global compliance profiles
tags:
- compliance-profiles
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
$ref: '#/components/schemas/response-status'
data:
type: array
items:
$ref: '#/components/schemas/compliance-profile'
meta:
$ref: '#/components/schemas/collection-meta'
operationId: get-compliance-profiles
deprecated: true
description: 'Available sort options:
* `name`
* `createdAt`
* `updatedAt`
Available filter options:
* `name`
* `moduleId`
* `subjectId`
* `createdAt`
* `updatedAt`
Notes:
- `moduleId` and `subjectId` filters only perform an exact match (case-sensitive); they do not support other operator
'
parameters:
- $ref: '#/components/parameters/page-number'
- $ref: '#/components/parameters/page-size'
- $ref: '#/components/parameters/filter'
- $ref: '#/components/parameters/sort'
post:
tags:
- compliance-profiles
description: Create a new Global compliance profile in the caller's organization. The owning organization is derived from the access token. Returns the created profile.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
minLength: 1
description: Human-readable name of the compliance profile.
required:
- name
additionalProperties: false
description: Request body for creating a global compliance profile.
description: Request body for creating a global compliance profile.
responses:
'201':
description: A compliance profile with its requirements.
content:
application/json:
schema:
type: object
properties:
_id:
description: Unique identifier of the compliance profile.
allOf:
- $ref: '#/components/schemas/objectId'
name:
type: string
description: Human-readable name of the compliance profile.
context:
type: string
enum:
- global
- customField
- party
- project
- requestRecord
description: Context scope of the compliance profile.
requirements:
type: array
items:
type: object
properties:
moduleCode:
type: string
minLength: 1
description: Identifier of the module this requirement belongs to.
moduleLabel:
type: string
minLength: 1
description: Display label of the module.
subjectCode:
type: string
minLength: 1
description: Identifier of the subject this requirement belongs to.
subjectLabel:
type: string
minLength: 1
description: Display label of the subject.
attributeCode:
type: string
minLength: 1
description: Attribute code (maps to attributeId in storage).
attributeLabel:
type: string
minLength: 1
description: Display label of the attribute.
attributeType:
type: string
enum:
- boolean
- number
- fillableForm
- amBestRating
- amBestFinancialStrength
- connected
- list
- ai
description: Data type of the attribute (e.g. boolean, number).
attributeDescription:
description: Optional description of the attribute.
type: string
minLength: 1
matchingCriteria:
type: string
enum:
- matchOnce
- matchRepeatedly
description: Matching criteria for the requirement.
operator:
description: Comparison operator for the requirement.
type: string
enum:
- must be present
- must be greater or equal to
- must be less than or equal to
- must be completed by
- at least one must be present from list
targetValue:
description: Target value for the requirement comparison.
anyOf:
- type: string
minLength: 1
- type: array
items:
type: string
minLength: 1
required:
- moduleCode
- moduleLabel
- subjectCode
- subjectLabel
- attributeCode
- attributeLabel
- attributeType
- matchingCriteria
additionalProperties: false
description: A single requirement within a compliance profile.
description: Requirements that make up the compliance profile.
required:
- _id
- name
- context
- requirements
additionalProperties: false
description: A compliance profile with its requirements.
'400':
description: The request could not be understood — invalid body payload, unknown querystring filter, or a schema validation failure.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 400
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The request could not be understood — invalid body payload, unknown querystring filter, or a schema validation failure.
'401':
description: Authentication failed — the bearer token is missing, malformed, expired, or does not grant access to this resource.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 401
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: Authentication failed — the bearer token is missing, malformed, expired, or does not grant access to this resource.
'403':
description: The authenticated caller does not have permission to perform this action on the target resource.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 403
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The authenticated caller does not have permission to perform this action on the target resource.
'404':
description: The requested resource does not exist or is not visible to the authenticated caller.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 404
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The requested resource does not exist or is not visible to the authenticated caller.
'500':
description: The server encountered an unexpected failure while processing the request.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 500
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The server encountered an unexpected failure while processing the request.
/compliance-profiles/{profileId}:
parameters:
- schema:
type: string
name: profileId
in: path
required: true
description: Compliance Profile ID
get:
summary: Fetch a compliance profile
tags:
- compliance-profiles
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
$ref: '#/components/schemas/response-status'
data:
$ref: '#/components/schemas/compliance-profile'
operationId: get-compliance-profiles-id
deprecated: true
description: Note that you can also fetch project, party, and custom field compliance profiles, not just global ones.
/projects/{projectId}/compliance-profile:
parameters:
- schema:
type: string
name: projectId
in: path
required: true
get:
summary: Fetch compliance profile for project
tags:
- compliance-profiles
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
$ref: '#/components/schemas/response-status'
data:
$ref: '#/components/schemas/compliance-profile'
operationId: get-projects-projectId-compliance-profile
deprecated: true
parameters:
- $ref: '#/components/parameters/scope-type'
- $ref: '#/components/parameters/scope-id'
description: 'This will return the project-specific compliance profile relative to the given scope.
NOTE: it is _mandatory_ to specify a `scope`, which can be either a `party` (belonging to a project) or a `complianceProfile`.'
x-internal: true
/parties/{partyId}/compliance-profile:
parameters:
- schema:
type: string
name: partyId
in: path
required: true
get:
summary: Fetch a party's compliance profile
tags:
- compliance-profiles
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
$ref: '#/components/schemas/response-status'
data:
$ref: '#/components/schemas/compliance-profile'
operationId: get-parties-partyId-compliance-profile
deprecated: true
description: 'This will return the compliance profile associated to the party. If the party is not tracking compliance you will get a 404 response.
By specifying a `scope` of type `projects`, the project-specific compliance profile will be returned.
'
parameters:
- $ref: '#/components/parameters/scope-type'
- $ref: '#/components/parameters/scope-id'
post:
summary: Assign compliance profile to a party
operationId: post-parties-partyId-compliance-profile
deprecated: true
responses:
'200':
description: OK
tags:
- compliance-profiles
description: This operation will assign an existing compliance profile to a party. Unless the `scope` parameters are specified, the profile will be applied at the global level. To assign at the project level, include `scope[type]=projects` and `scope[id]={projectId}` to the query string.
requestBody:
content:
application/json:
schema:
type: object
properties:
complianceProfile:
$ref: '#/components/schemas/reference-input'
parameters:
- $ref: '#/components/parameters/scope-type'
- $ref: '#/components/parameters/scope-id'
/parties/{partyId}/relationships/compliance-profile:
parameters:
- schema:
type: string
name: partyId
in: path
required: true
post:
summary: Assign a compliance profile to a party
operationId: post-parties-partyId-relationships-compliance-profile
deprecated: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
$ref: '#/components/schemas/response-status'
data:
$ref: '#/components/schemas/party'
tags:
- compliance-profiles
description: 'This will turn on compliance tracking on the party if it''s currently turned off.
To assign a compliance profile for a specific project, specify it using the `scope` parameters.'
parameters:
- $ref: '#/components/parameters/scope-type'
- $ref: '#/components/parameters/scope-id'
requestBody:
content:
application/json:
schema:
type: object
properties:
complianceProfile:
$ref: '#/components/schemas/reference-input'
x-internal: true
delete:
summary: Remove the compliance profile from a party
operationId: delete-parties-partyId-relationships-compliance-profile
deprecated: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
status:
$ref: '#/components/schemas/response-status'
data:
$ref: '#/components/schemas/party'
tags:
- compliance-profiles
description: This will turn off compliance tracking both at the global level and in each of the party's projects.
x-internal: true
/compliance-profiles/{id}:
patch:
tags:
- compliance-profiles
description: Rename a Global compliance profile in the caller's organization. Only profiles with context `Global` may be renamed via this endpoint. Returns the updated profile.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
minLength: 1
description: New human-readable name for the compliance profile.
required:
- name
additionalProperties: false
description: Request body for renaming a global compliance profile.
description: Request body for renaming a global compliance profile.
parameters:
- schema:
allOf:
- $ref: '#/components/schemas/objectIdInput'
in: path
name: id
required: true
description: Identifier of the compliance profile to update.
responses:
'200':
description: A compliance profile with its requirements.
content:
application/json:
schema:
type: object
properties:
_id:
description: Unique identifier of the compliance profile.
allOf:
- $ref: '#/components/schemas/objectId'
name:
type: string
description: Human-readable name of the compliance profile.
context:
type: string
enum:
- global
- customField
- party
- project
- requestRecord
description: Context scope of the compliance profile.
requirements:
type: array
items:
type: object
properties:
moduleCode:
type: string
minLength: 1
description: Identifier of the module this requirement belongs to.
moduleLabel:
type: string
minLength: 1
description: Display label of the module.
subjectCode:
type: string
minLength: 1
description: Identifier of the subject this requirement belongs to.
subjectLabel:
type: string
minLength: 1
description: Display label of the subject.
attributeCode:
type: string
minLength: 1
description: Attribute code (maps to attributeId in storage).
attributeLabel:
type: string
minLength: 1
description: Display label of the attribute.
attributeType:
type: string
enum:
- boolean
- number
- fillableForm
- amBestRating
- amBestFinancialStrength
- connected
- list
- ai
description: Data type of the attribute (e.g. boolean, number).
attributeDescription:
description: Optional description of the attribute.
type: string
minLength: 1
matchingCriteria:
type: string
enum:
- matchOnce
- matchRepeatedly
description: Matching criteria for the requirement.
operator:
description: Comparison operator for the requirement.
type: string
enum:
- must be present
- must be greater or equal to
- must be less than or equal to
- must be completed by
- at least one must be present from list
targetValue:
description: Target value for the requirement comparison.
anyOf:
- type: string
minLength: 1
- type: array
items:
type: string
minLength: 1
required:
- moduleCode
- moduleLabel
- subjectCode
- subjectLabel
- attributeCode
- attributeLabel
- attributeType
- matchingCriteria
additionalProperties: false
description: A single requirement within a compliance profile.
description: Requirements that make up the compliance profile.
required:
- _id
- name
- context
- requirements
additionalProperties: false
description: A compliance profile with its requirements.
'400':
description: The request could not be understood — invalid body payload, unknown querystring filter, or a schema validation failure.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 400
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The request could not be understood — invalid body payload, unknown querystring filter, or a schema validation failure.
'401':
description: Authentication failed — the bearer token is missing, malformed, expired, or does not grant access to this resource.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 401
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: Authentication failed — the bearer token is missing, malformed, expired, or does not grant access to this resource.
'403':
description: The authenticated caller does not have permission to perform this action on the target resource.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 403
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The authenticated caller does not have permission to perform this action on the target resource.
'404':
description: The requested resource does not exist or is not visible to the authenticated caller.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 404
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The requested resource does not exist or is not visible to the authenticated caller.
'500':
description: The server encountered an unexpected failure while processing the request.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 500
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The server encountered an unexpected failure while processing the request.
/compliance-profiles/{id}/requirements:
post:
tags:
- compliance-profiles
description: Add requirements to a compliance profile. Each item is either a library reference (`libraryRequirementId` or `attributeCode`) or a custom definiti
# --- truncated at 32 KB (135 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/trustlayer/refs/heads/main/openapi/trustlayer-compliance-profiles-api-openapi.yml