TrustLayer custom-fields API

The custom-fields API from TrustLayer — 4 operation(s) for custom-fields.

OpenAPI Specification

trustlayer-custom-fields-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: TrustLayer Platform Auth custom-fields 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: custom-fields
paths:
  /projects/{projectId}:
    parameters:
    - schema:
        type: string
      name: projectId
      in: path
      required: true
      description: Project ID
    patch:
      summary: Update a custom field
      operationId: patch-custom-fields
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/custom-field'
      description: 'Note


        * required attributes (`name` and `fieldType`) _must_ always be specified

        * at the moment it''s not possible to specify custom requirementsand checklists.'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                project:
                  $ref: '#/components/schemas/project-update'
        description: ''
      tags:
      - custom-fields
      x-internal: false
  /custom-fields:
    get:
      summary: List custom fields
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/custom-field'
                  meta:
                    $ref: '#/components/schemas/collection-meta'
      operationId: get-custom-fields
      deprecated: true
      description: 'All fields are returned in alphabetical order; pagination and sorting are not enabled.


        Available include options:

        * `complianceProfile`'
      tags:
      - custom-fields
    post:
      summary: Create a new custom field
      operationId: post-custom-fields
      deprecated: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/custom-field'
      description: 'Note: at the moment it''s not possible to specify custom requirements and checklists.'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customField:
                  $ref: '#/components/schemas/custom-field-create'
      tags:
      - custom-fields
  /custom-fields/{fieldId}:
    parameters:
    - schema:
        type: string
      name: fieldId
      in: path
      required: true
    patch:
      summary: Update a custom field
      operationId: patch-custom-fields-fieldId
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/custom-field'
      tags:
      - custom-fields
      description: Note that by specifying `options` you will _replace_ all the existing values.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customField:
                  $ref: '#/components/schemas/custom-field-update'
    delete:
      summary: Delete a custom field
      operationId: delete-custom-fields-fieldId
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/custom-field'
      tags:
      - custom-fields
      description: This will also remove the field from any project that is using it.
  /parties/{partyId}/custom-data:
    parameters:
    - schema:
        type: string
      name: partyId
      in: path
      required: true
    patch:
      summary: Update party custom data
      operationId: patch-parties-partyId-custom-data
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/party'
      description: 'Add, remove or update party custom fields.


        To remove a field, set its value to `null`.


        A project `scope` can be specified; in that case the changes will be made only to the project specific values.'
      tags:
      - custom-fields
      parameters:
      - $ref: '#/components/parameters/scope-type'
      - $ref: '#/components/parameters/scope-id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customData:
                  $ref: '#/components/schemas/custom-data-update'
            examples:
              example-1:
                value:
                  customData:
                  - value: string
                    customField:
                      id: string
components:
  schemas:
    project-update:
      title: project-update
      type: object
      properties:
        name:
          type: string
          description: The project name
        description:
          type: string
          description: An optional description
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
        active:
          type: boolean
        customData:
          type: array
          items:
            type: object
            properties:
              customField:
                $ref: '#/components/schemas/reference-input'
              value:
                type: string
                nullable: false
            required:
            - customField
            - value
      required:
      - name
      x-internal: true
      x-tags:
      - input
    project:
      title: Project
      type: object
      x-examples:
        Example project:
          type: projects
          id: 60a3dc67cba60c04739e8e46
          name: Test Project
          parties:
          - id: 60896067dd86e01e90199f42
            type: parties
          customData:
          - value: '123'
            customField:
              type: customFields
              id: 60896067dd86e01e90199f42
          externalIds:
            procore:
            - id: '49843945'
      properties:
        type:
          type: string
          default: projects
          readOnly: true
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        startDate:
          type: string
          format: date-time
          nullable: true
        endDate:
          type: string
          format: date-time
          nullable: true
        active:
          type: boolean
        parties:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/reference'
            - $ref: '#/components/schemas/party'
            - type: string
        customData:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              customField:
                oneOf:
                - $ref: '#/components/schemas/reference'
                - $ref: '#/components/schemas/custom-field'
        complianceStatus:
          type: object
          properties:
            status:
              type: string
              enum:
              - compliant
              - non_compliant
            compliantPartiesCount:
              type: number
            totalPartiesCount:
              type: number
            complianceScore:
              type: number
        deletedAt:
          type: string
          format: date-time
          nullable: true
        deletedBy:
          oneOf:
          - nullable: true
          - $ref: '#/components/schemas/reference'
        externalIds:
          type: object
          x-stoplight:
            id: uw5iuj9nds4en
    custom-field-update:
      title: custom-field-update
      type: object
      x-internal: true
      x-tags:
      - input
      properties:
        name:
          type: string
          minLength: 1
        description:
          type: string
        color:
          type: string
          pattern: ^#[0-9a-f]{6}$
          minLength: 7
          maxLength: 7
          example: '#ffa900'
        fieldType:
          type: string
          enum:
          - text
          - number
          - dropdown
        source:
          type: string
          enum:
          - branding
        options:
          type: array
          minItems: 1
          items:
            type: string
            minLength: 1
    compliance-document:
      x-internal: true
      title: Compliance Document
      type: object
      properties:
        id:
          type: string
        origin:
          type: string
          enum:
          - upload
          - makeCompliant
          - connectedDocument
          - fillableForm
          - webForm
        complianceStatus:
          type: string
          enum:
          - compliant
          - non_compliant
    party:
      title: Party
      type: object
      x-examples:
        Example Party:
          id: 60896067dd86e01e90199f42
          name: Test Party
          address:
            line1: 123 Main Street
            line2: ''
            city: Pleasantville
            postalCode: '10200'
            region: NY
            country: US
          type: Vendor
          status: new
          customData:
          - value: '123'
            customField:
              type: customFields
              id: 60896067dd86e01e90199f42
          externalIds:
            procore:
            - id: '49843945'
      properties:
        type:
          type: string
          default: parties
          readOnly: true
        id:
          type: string
          readOnly: true
        name:
          type: string
        address:
          $ref: '#/components/schemas/address'
        status:
          type: string
          enum:
          - new
          - compliant
          - non_compliant
          - inactive
          readOnly: true
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/contact'
        website:
          type: string
          nullable: true
        active:
          type: boolean
        notes:
          type: string
          nullable: true
        complianceStatus:
          $ref: '#/components/schemas/compliance-status'
        projects:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/reference'
            - $ref: '#/components/schemas/project'
        projectStats:
          type: object
          properties:
            compliantProjectsCount:
              type: number
            totalProjectsCount:
              type: number
        documents:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/reference'
            - $ref: '#/components/schemas/document'
        partyType:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/party-type'
        tags:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/taggging'
            - $ref: '#/components/schemas/taggging-full'
        complianceProfile:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/compliance-profile'
          - nullable: true
        customData:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              customField:
                oneOf:
                - $ref: '#/components/schemas/reference'
                - $ref: '#/components/schemas/custom-field'
        deletedAt:
          type: string
          format: date-time
          nullable: true
        deletedBy:
          oneOf:
          - nullable: true
          - $ref: '#/components/schemas/reference'
        externalIds:
          type: object
          x-stoplight:
            id: zk87opteuie3w
    reference-input:
      title: reference-input
      type: object
      properties:
        id:
          type: string
          minLength: 24
          maxLength: 24
          pattern: ^[a-z0-9]{24}$
      required:
      - id
      x-internal: true
      x-tags:
      - input
    compliance-status:
      type: object
      title: Compliance Status
      properties:
        complianceProfile:
          $ref: '#/components/schemas/reference'
        nextExpirationDate:
          type: string
          format: date-time
          nullable: true
        latestExpirationDate:
          type: string
          format: date-time
          nullable: true
        modules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              status:
                type: string
                enum:
                - compliant
                - non_compliant
              documents:
                type: array
                items:
                  $ref: '#/components/schemas/compliance-document'
              documentsCount:
                type: number
                example: 1
              subjects:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    label:
                      type: string
                    status:
                      type: string
                      enum:
                      - compliant
                      - non_compliant
                      - waived
                      - overridden
                    notes:
                      type: string
                    effectiveDate:
                      type: string
                      format: date-time
                      nullable: true
                    expirationDate:
                      type: string
                      format: date-time
                      nullable: true
                    latestExpirationDate:
                      type: string
                      format: date-time
                      nullable: true
                    latestValidEffectiveDate:
                      type: string
                      format: date-time
                      nullable: true
                    latestValidExpirationDate:
                      type: string
                      format: date-time
                      nullable: true
                    documents:
                      type: array
                      items:
                        $ref: '#/components/schemas/compliance-document'
                    documentsCount:
                      type: number
                    resetOn:
                      type: string
                      format: date-time
                      nullable: true
                    requirements:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          label:
                            type: string
                          moduleId:
                            type: string
                          moduleLabel:
                            type: string
                          subjectId:
                            type: string
                          subjectLabel:
                            type: string
                          attributeId:
                            type: string
                          attributeLabel:
                            type: string
                          attributeDescription:
                            type: string
                          matchingCriteria:
                            type: string
                            enum:
                            - matchOnce
                            - matchRepeatedly
                          operator:
                            type: string
                            enum:
                            - must be present
                            - must be greater or equal to
                            - must be less or equal to
                            - must be completed by
                            - at least one must be present from list
                          targetValue:
                            type: string
                          value:
                            type: string
                          status:
                            type: string
                            enum:
                            - compliant
                            - non_compliant
                            - waived
                            - overridden
                            - invalidated
                          invalidatedBy:
                            type: array
                            items:
                              type: string
                          notes:
                            type: string
                          publicNotes:
                            type: string
                          documents:
                            type: array
                            items:
                              $ref: '#/components/schemas/compliance-document'
                          documentsCount:
                            type: number
                          resetOn:
                            type: string
                            format: date-time
                            nullable: true
                          custom:
                            type: boolean
                        required:
                        - id
                        - label
                        - moduleId
                        - moduleLabel
                        - subjectId
                        - subjectLabel
                        - attributeId
                        - attributeLabel
                        - matchingCriteria
                        - operator
                        - status
                        - documents
                        - documentsCount
                        - custom
                  required:
                  - id
                  - label
                  - status
                  - documents
                  - documentsCount
                  - requirements
            required:
            - id
            - label
            - status
            - documents
            - documentsCount
            - subjects
        subjects:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              effectiveDate:
                type: string
                format: date-time
                nullable: true
              expirationDate:
                type: string
                format: date-time
                nullable: true
              latestValidEffectiveDate:
                type: string
                format: date-time
                nullable: true
              latestValidExpirationDate:
                type: string
                format: date-time
                nullable: true
              notes:
                type: string
              requirementsStatus:
                type: string
                enum:
                - compliant
                - non_compliant
                - waived
                - overridden
              resetRequirementsOn:
                type: string
                format: date-time
                nullable: true
        requirements:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              operator:
                type: string
              targetValue:
                type: string
              actualValue:
                type: string
              status:
                type: string
                enum:
                - compliant
                - non_compliant
                - waived
                - overridden
                - invalidated
              waiverOrOverrideNotes:
                type: string
              waiverOrOverrideExpirationDate:
                type: string
                format: date-time
                nullable: true
        status:
          type: string
          enum:
          - compliant
          - non_compliant
        lastChangedAt:
          type: string
          format: date-time
      required:
      - complianceProfile
      - modules
      - subjects
      - requirements
      - status
      x-examples:
        Example compliance status:
          complianceProfile:
            id: 60a27c51fcd891823568ed27
            type: compliance-profiles
          nextExpirationDate: '2024-11-14T00:00:00.000Z'
          latestExpirationDate: '2025-12-19T23:59:59.999Z'
          modules:
          - id: evidenceOfInsurance
            label: Evidence of Insurance
            status: compliant
            documents:
            - id: 6877a0b2d7a1998eeb7f7f2f
              origin: upload
              complianceStatus: compliant
            documentsCount: 1
            subjects:
            - id: commercialGeneralLiability
              label: Commercial General Liability
              status: compliant
              notes: lorem ipsum dolor sit amet
              effectiveDate: '2024-11-14T00:00:00.000Z'
              expirationDate: '2025-11-14T23:59:59.999Z'
              latestExpirationDate: '2025-12-19T23:59:59.999Z'
              latestValidEffectiveDate: '2024-11-14T00:00:00.000Z'
              latestValidExpirationDate: '2025-11-14T23:59:59.999Z'
              documents:
              - id: 6877a0b2d7a1998eeb7f7f2f
                origin: upload
                complianceStatus: compliant
              documentsCount: 1
              resetOn: '2025-06-02T00:00:00.000Z'
              requirements:
              - id: evidenceOfInsurance.commercialGeneralLiability.evidenceOfInsuranceCommercialGeneralLiabilityGeneralAggregate
                label: 'Evidence of Insurance : Commercial General Liability : General Aggregate'
                moduleId: evidenceOfInsurance
                moduleLabel: Evidence of Insurance
                subjectId: commercialGeneralLiability
                subjectLabel: Commercial General Liability
                attributeId: evidenceOfInsuranceCommercialGeneralLiabilityGeneralAggregate
                attributeLabel: General Aggregate
                matchingCriteria: matchOnce
                operator: must be greater or equal to
                targetValue: '1000000'
                value: '2000000'
                status: compliant
                invalidatedBy:
                - evidenceOfInsuranceCommercialGeneralLiabilityAMBestRating
                notes: lorem ipsum dolor sit amet
                publicNotes: lorem ipsum dolor sit amet
                documents:
                - id: 6877a0b2d7a1998eeb7f7f2f
                  origin: upload
                  complianceStatus: compliant
                documentsCount: 1
                resetOn: '2025-06-02T00:00:00.000Z'
                custom: false
          subjects:
          - id: commercialGeneralLiability
            effectiveDate: '2024-11-14T00:00:00.000Z'
            expirationDate: '2025-11-14T23:59:59.999Z'
            latestValidEffectiveDate: '2024-11-14T00:00:00.000Z'
            latestValidExpirationDate: '2025-11-14T23:59:59.999Z'
            latestExpirationDate: '2025-12-19T23:59:59.999Z'
            notes: lorem ipsum dolor sit amet
            requirementsStatus: compliant
            resetRequirementsOn: '2025-06-02T00:00:00.000Z'
          requirements:
          - id: evidenceOfInsurance.commercialGeneralLiability.evidenceOfInsuranceCommercialGeneralLiabilityGeneralAggregate
            label: 'Evidence of Insurance : Commercial General Liability : General Aggregate'
            operator: must be greater or equal to
            targetValue: '1000000'
            actualValue: '2000000'
            status: compliant
            waiverOrOverrideNotes: lorem ipsum dolor sit amet
            waiverOrOverrideExpirationDate: '2025-06-02T00:00:00.000Z'
          status: compliant
          lastChangedAt: '2025-07-16T17:55:00.000Z'
    contact:
      title: Contact
      type: object
      x-examples:
        Example Contact:
          type: contacts
          id: 60896067dd86e01e90199f43
          name: Jane Smith
          company: Acme Inc
          email: jane.smith@example.com
          phone: (555) 555-5555
          fax: ''
          title: Director
          primary: true
          defaultRequestRecipient: false
          avatar: ''
          party:
            type: parties
            id: 60896067dd86e01e90199f43
      properties:
        type:
          type: string
          default: contacts
          readOnly: true
        id:
          type: string
          readOnly: true
        name:
          type: string
        company:
          type: string
        email:
          type: string
        phone:
          type: string
        fax:
          type: string
        title:
          type: string
        primary:
          type: boolean
          default: false
        defaultRequestRecipient:
          type: boolean
          default: false
        avatar:
          type: string
        party:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/party'
        externalId:
          type: string
          x-stoplight:
            id: 07yyrzkup5tdk
    user:
      description: ''
      type: object
      properties:
        id:
          type: string
        profile:
          type: object
          properties:
            name:
              type: string
              minLength: 1
            phone:
              type: string
            title:
              type: string
            avatar:
              type: string
            role:
              type: string
            department:
              type: string
            timezone:
              type: string
        email:
          type: string
          minLength: 1
        isActive:
          type: boolean
        type:
          type: string
          default: users
          readOnly: true
      title: User
    reference:
      title: Reference
      type: object
      properties:
        id:
          type: string
        type:
          type: string
      description: Generic object reference
      x-internal: false
      x-examples:
        Generic reference example:
          id: 60896067dd86e01e90199f43
          type: widgets
    custom-field:
      title: Custom Field
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          default: custom-fields
        name:
          type: string
          description: Custom field label
        'description ':
          type: string
          description: Optional description
        color:
          type: string
          pattern: ^#[a-f0-9]{6}$
          description: 'Field color in #rrggbb format'
        fieldType:
          type: string
          default: text
          enum:
          - text
          - number
          - dropdown
        options:
          type: array
          description: List of options for the dropdown
          items:
            type: object
            properties:
              key:
                type: string
                description: Unique identifier for the option
              value:
                type: string
                description: Option label
        complianceProfile:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/compliance-profile'
        associatedEntities:
          type: array
          enum:
          - party
          - project
          description: List of entity types that can use this custom field
          items:
            type: string
    document-type:
      description: ''
      type: object
      title: Document Type
      x-examples:
        Certificate of insurance:
          type: document-types
          id: 60a27c517fd4e152a9642347
          name: Certificate of Insurance
          system: true
          pluralName: Certificates of Insurance
      properties:
        type:
          type: string
          default: document-types
          readOnly: true
        id:
          type: string
        name:
          type: string
          minLength: 1
        system:
          type: boolean
        pluralName:
          type: string
          minLength: 1
      required:
      - id
      - name
      - system
      - pluralName
    custom-data-update:
      type: array
      x-examples:
        example-1:
        - value: string
          customField:
            id: striangstringstringstring
      x-internal: true
      x-tags:
      - input
      items:
        type: object
        properties:
          customField:
            $ref: '#/components/schemas/reference-input'
          value:
            type:
            - string
            - number
            nullable: false
        required:
        - customField
        - value
    response-status:
      type: string
      title: Response Status
      enum:
      - success
      - fail
      - error
      readOnly: true
      x-examples:
        Success: success
      description: The possible values are "success", "fail", and "error".
      x-internal: true
    party-type:
      title: Party Type
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          default: party-types
        name:
          type: string
        pluralName:
          type: string
        defaultComplianceProfile:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/compliance-profile'
      x-examples:
        Vendor:
          id: 60a27c51fcd891823568ed28
          type: party-types
          name: Vendor
          pluralName: Vendors
          defaultComplianceProfile:
            id: 60a27c5

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/trustlayer/refs/heads/main/openapi/trustlayer-custom-fields-api-openapi.yml