> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cynopsis.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Individual CRP

This endpoint allows you to create a **Customer Related Party (CRP)** that is associated with an existing **Primary Customer**.

A CRP can be either **Individual** or **Corporate**, and it must include:

* A designated role (e.g., DIRECTOR, ULTIMATE HOLDING COMPANY).
* Required particulars depending on whether it is an individual or a corporate entity.

**Field Specifications:**

* `evidenceCorroborated`: Enum field that accepts either `"YES"` or `"NO"`. Used in `sourceOfFunds` and `sourceOfWealth` arrays.

### Create an Individual CRP

Any CRP(s) will be associated with at least one primary customer. To create an individual CRP, certain particulars must be filled in and a designated role must be given to the CRP. The CRP type in this case shall be `INDIVIDUAL`.

#### Sample Request Body - Individual CRP

```json theme={null}
{
  "type": "INDIVIDUAL",
  "roles": [
    {
      "cid": "draft-1",
      "role": "DIRECTOR",
      "appointedDate": "2022-01-01",
      "resignedDate": null
    }
  ],
  "active": "",
  "particular": {
    "salutation": "",
    "name": "Individual CRP",
    "alias": [],
    "formerName": [],
    "gender": "MALE",
    "nationality": [
      "MALAYSIA"
    ],
    "countryOfResidence": "MALAYSIA",
    "identityDocumentType": "",
    "identityNumber": "",
    "identityIssuedDate": null,
    "identityExpiryDate": null,
    "countryOfBirth": "",
    "dateOfBirth": null,
    "address": [],
    "phone": [],
    "email": []
  },
  "profileReferenceId": "18001181212C",
  "other": {
    "status": "CURRENT",
    "sourceOfFunds": [
        {
          "id": "",
          "category": "",
          "amountDeclared": null,
          "evidenceCorroborated": "YES"
        }
        ],
        "sourceOfWealth": [
          {
            "id": "",
            "category": "",
            "amountDeclared": null,
            "evidenceCorroborated": "YES",
          }
    ],
    "bankAccountNumber": [],
    "undischargedBankrupt": "",
    "ownershipPercentage": ""
  }
}
```

#### Sample Response Body - Success (200)

```json theme={null}
{
  "id": 927,
  "createdAt": "2022-07-26T04:33:35.623+00:00",
  "updatedAt": "2022-07-26T04:33:35.694+00:00",
  "createdBy": null,
  "updatedBy": null,
  "active": null,
  "parentId": 926,
  "profileId": 917,
  "type": "INDIVIDUAL",
  "referenceId": null,
  "profileReferenceId": "18001181212C",
  "particular": {
    "salutation": "",
    "name": "Individual CRP",
    "alias": [],
    "formerName": [],
    "gender": "MALE",
    "countryOfResidence": "MALAYSIA",
    "nationality": [
      "MALAYSIA"
    ],
    "countryOfBirth": "",
    "dateOfBirth": null,
    "address": [],
    "phone": [],
    "email": [],
    "identityDocumentType": "",
    "identityNumber": "",
    "identityIssuedDate": null,
    "identityExpiryDate": null
  },
  "other": {
    "status": "CURRENT",
    "sourceOfFunds": [
        {
          "id": "",
          "category": "",
          "amountDeclared": null,
          "evidenceCorroborated": "YES"
        }
        ],
        "sourceOfWealth": [
          {
            "id": "",
            "category": "",
            "amountDeclared": null,
            "evidenceCorroborated": "YES",
          }
    ],
    "bankAccountNumber": [],
    "undischargedBankrupt": null,
    "documentList": null,
    "ownershipPercentage": 0.0
  },
  "vendorName": null,
  "vendorEntityGuid": null,
  "lastRiskAssessment": null,
  "roles": [
    {
      "id": 51,
      "createdAt": "2022-07-26T04:33:35.645+00:00",
      "updatedAt": "2022-07-26T04:33:35.645+00:00",
      "createdBy": null,
      "updatedBy": null,
      "role": "DIRECTOR",
      "appointedDate": "2022-01-01",
      "resignedDate": null
    }
  ],
  "listRoleAsText": [
    "DIRECTOR"
  ]
}

```


## OpenAPI

````yaml POST /api/customer/{customerId}/crp
openapi: 3.1.0
info:
  description: Api Documentation
  version: '3.0'
  title: Api Documentation
  termsOfService: urn:tos
  contact: {}
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.artemis.cynopsis.co
security: []
tags:
  - name: app-config-controller
    description: App Config Controller
  - name: asia-verify-controller
    description: Asia Verify Controller
  - name: authentication-controller
    description: Authentication Controller
  - name: authentication-manager-controller
    description: Authentication Manager Controller
  - name: basic-error-controller
    description: Basic Error Controller
  - name: comment-controller
    description: Comment Controller
  - name: customer-controller
    description: Customer Controller
  - name: dashboard-controller
    description: Dashboard Controller
  - name: domain-controller
    description: Domain Controller
  - name: expiring-document-controller
    description: Expiring Document Controller
  - name: hand-shake-controller
    description: Hand Shake Controller
  - name: media-controller
    description: Media Controller
  - name: on-going-due-diligent-controller
    description: On Going Due Diligent Controller
  - name: own-restricted-list-controller
    description: Own Restricted List Controller
  - name: periodic-review-controller
    description: Periodic Review Controller
  - name: quick-scan-controller
    description: Quick Scan Controller
  - name: user-controller
    description: User Controller
paths:
  /api/customer/{customerId}/crp:
    post:
      tags:
        - customer-controller
      summary: createNewCRP
      operationId: createNewCRPUsingPOST
      parameters:
        - name: customerId
          in: path
          description: customerId
          required: true
          schema:
            type: integer
            format: int64
        - name: X-Domain-ID
          in: header
          description: X-Domain-ID
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: '#/components/requestBodies/CRPRequestDto'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomerResponseDto'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - OAuth2_Client_Credentials: []
        - OAuth2_Password: []
components:
  requestBodies:
    CRPRequestDto:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CRPRequestDto'
      description: crpRequestDto
      required: true
  schemas:
    CustomerResponseDto:
      type: object
      properties:
        active:
          type: boolean
        assignees:
          type: array
          items:
            $ref: '#/components/schemas/UserInfo'
        createdAt:
          $ref: '#/components/schemas/Timestamp'
        createdBy:
          $ref: '#/components/schemas/UserInfo'
        forms:
          $ref: '#/components/schemas/JsonNode'
        id:
          type: integer
          format: int64
        lastRiskAssessment:
          type: string
          format: date-time
        listRoleAsText:
          type: array
          items:
            type: string
        notes:
          $ref: '#/components/schemas/JsonNode'
        other:
          $ref: '#/components/schemas/JsonNode'
        parentId:
          type: integer
          format: int64
        particular:
          $ref: '#/components/schemas/JsonNode'
        profileId:
          type: integer
          format: int64
        profileReferenceId:
          type: string
        referenceId:
          type: string
        riskRating:
          type: string
          enum:
            - HIGH
            - LOW
            - MEDIUM
            - MEDIUM_HIGH
            - MEDIUM_LOW
            - UNKNOWN
        roles:
          type: array
          items:
            $ref: '#/components/schemas/CRPRoleResponseDto'
        status:
          type: string
          enum:
            - ACCEPTED
            - CLEARED
            - DRAFT
            - PENDING
            - REJECTED
            - REQUEST_CHANGES
        type:
          type: string
          enum:
            - CORPORATE
            - INDIVIDUAL
        updatedAt:
          $ref: '#/components/schemas/Timestamp'
        updatedBy:
          $ref: '#/components/schemas/UserInfo'
        vendorEntityGuid:
          type: string
        vendorName:
          type: string
      title: CustomerResponseDto
    CRPRequestDto:
      type: object
      required:
        - type
      properties:
        active:
          type: boolean
        forms:
          $ref: '#/components/schemas/JsonNode'
        id:
          type: integer
          format: int64
        profileId:
          type: integer
          format: int64
        profileReferenceId:
          type: string
        referenceId:
          type: string
        roles:
          type: array
          items:
            $ref: '#/components/schemas/CRPRoleRequestDto'
        type:
          type: string
          enum:
            - CORPORATE
            - INDIVIDUAL
      title: CRPRequestDto
    UserInfo:
      type: object
      properties:
        email:
          type: string
        firstName:
          type: string
        fullName:
          type: string
        id:
          type: integer
          format: int64
        lastName:
          type: string
      title: UserInfo
    Timestamp:
      type: object
      properties:
        date:
          type: integer
          format: int32
        day:
          type: integer
          format: int32
        hours:
          type: integer
          format: int32
        minutes:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        nanos:
          type: integer
          format: int32
        seconds:
          type: integer
          format: int32
        time:
          type: integer
          format: int64
        timezoneOffset:
          type: integer
          format: int32
        year:
          type: integer
          format: int32
      title: Timestamp
    JsonNode:
      type: object
      title: JsonNode
    CRPRoleResponseDto:
      type: object
      properties:
        appointedDate:
          type: string
          format: date
        createdAt:
          $ref: '#/components/schemas/Timestamp'
        createdBy:
          $ref: '#/components/schemas/UserInfo'
        id:
          type: integer
          format: int64
        resignedDate:
          type: string
          format: date
        role:
          type: string
        updatedAt:
          $ref: '#/components/schemas/Timestamp'
        updatedBy:
          $ref: '#/components/schemas/UserInfo'
      title: CRPRoleResponseDto
    CRPRoleRequestDto:
      type: object
      required:
        - role
      properties:
        appointedDate:
          type: string
          format: date
        id:
          type: integer
          format: int64
        resignedDate:
          type: string
          format: date
        role:
          type: string
      title: CRPRoleRequestDto
  securitySchemes:
    OAuth2_Client_Credentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://crm.cynopsis.co/oauth/token
          scopes: {}
    OAuth2_Password:
      type: oauth2
      flows:
        password:
          tokenUrl: https://crm.cynopsis.co/oauth/token
          scopes: {}

````