---
title: "Add Financial Line Item"
url: "https://developer.pexa.co.uk/apis/financials-v1-v1/versions/d3f169b2-8b77-47f6-8696-d6efa1bd09f2/operations/createLineItem"
---

> Full API specification: https://developer.pexa.co.uk/apis/financials-v1-v1/versions/d3f169b2-8b77-47f6-8696-d6efa1bd09f2.md

# Add Financial Line Item

`POST` `/partner/api/platformconnect/v1/financial-settlement-schedules/{financialSettlementScheduleId}/line-items`

Operation ID: `createLineItem`

This API is used in conjunction with 'Fetch financial settlement schedules' API to create an individual funds source or destination line item

## Path parameters

- `financialSettlementScheduleId` (string, uuid, required) - Financial Settlement Schedule id for which lineItems are created

## Header parameters

- `X-Request-Correlation-Id` (string, optional)

## Request body (required)

Content types: `application/json`

## Responses

- `200` - OK
- `400` - BAD REQUEST
- `500` - INTERNAL SERVER ERROR
- `503` - SERVICE UNAVAILABLE

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Financial
  version: v1
servers:
  - url: https://api.pexa.co.uk
    description: API Gateway URL
paths:
  /partner/api/platformconnect/v1/financial-settlement-schedules/{financialSettlementScheduleId}/line-items:
    post:
      tags:
        - lineItem
      summary: Add Financial Line Item
      description: This API is used in conjunction with 'Fetch financial settlement
        schedules' API  to create an individual funds source or destination line
        item
      operationId: createLineItem
      security:
        - oauth2:
            - add:fss_line_items
      parameters:
        - in: header
          name: X-Request-Correlation-Id
          schema:
            type: string
            description: The unique identifier for the request
        - name: financialSettlementScheduleId
          in: path
          required: true
          description: Financial Settlement Schedule id for which lineItems are created
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  pattern: ^(SOURCE|DESTINATION)$
                  example: SOURCE
                  description: |
                    Allowed values:
                     [`SOURCE`, `DESTINATION`]
                category:
                  type: string
                  description: >
                    Allowed values for source line item:
                     [`Mortgage Advance`]
                    <br> Allowed values for destination line item:
                     [`Redemption`, `Conveyancing Fees`, `Surplus`, `Onward Funds`]
                amount:
                  type: number
                  minimum: 1
                  maximum: 999999999999.99
                  description: Amount to be credited / debited
                  example: 10
                reference:
                  type: string
                  minLength: 1
                  maxLength: 18
                  pattern: ^[a-zA-Z0-9\/\-\\?:().,'#=!"%&*<>;@{+\s]*$
                  example: Nation wide
                bankAccount:
                  type: object
                  nullable: true
                  description: This field is required and can be updated only for type
                    DESTINATION.
                  properties:
                    accountName:
                      type: string
                      maxLength: 35
                      minLength: 1
                      pattern: ^[a-zA-Z0-9\/\-\\?:().,'#=!"%&*<>;@{+\s]*$
                      example: Bob Smith
                    accountNumber:
                      type: string
                      pattern: ^\d{8}$
                      example: "12345678"
                    bankCode:
                      type: string
                      pattern: ^\d{6}$
                      example: "123456"
                    accountType:
                      type: string
                      pattern: ^(BUSINESS|PERSONAL)$
                      example: BUSINESS
                      description: |
                        Allowed Values: [`BUSINESS`, `PERSONAL`]
                    displayName:
                      type: string
                      nullable: true
                      maxLength: 35
                      pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ !#$%&\*=^_`\{\|\}~";<>@\[\\\]]+$
                      example: Mortgage account
                  required:
                    - accountName
                    - accountNumber
                    - bankCode
                hasLinkedAccount:
                  type: boolean
                  description: Flag to indicate whether account is linked to a financial account
              required:
                - type
                - amount
                - reference
                - category
            examples:
              CreateSourceLineItem:
                value:
                  type: SOURCE
                  amount: 100
                  reference: test reference
                  category: Mortgage Advance
              CreateDestinationLineItem:
                value:
                  amount: 100
                  type: DESTINATION
                  reference: test reference
                  category: Redemption
                  bankAccount:
                    accountName: xyz account
                    accountNumber: "34235648"
                    bankCode: "453673"
                    accountType: BUSINESS
                    displayName: null
                  hasLinkedAccount: false
        required: true
      responses:
        "200":
          description: OK
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      lineItemId:
                        type: string
                        description: UUID of the corresponding line item
                        format: uuid
                        example: c7c0ee40-25c1-11ec-9621-0242ac130002
                      type:
                        type: string
                        pattern: ^(SOURCE|DESTINATION)$
                        example: SOURCE
                        description: |
                          Allowed values:
                           [`SOURCE`, `DESTINATION`]
                      amount:
                        type: number
                        minimum: 1
                        maximum: 999999999999.99
                        description: Amount to be credited / debited
                        example: 10
                      authorised:
                        type: boolean
                        example: true
                        nullable: true
                        description: Authorisation status of the line item
                      reference:
                        type: string
                        minLength: 1
                        maxLength: 18
                        pattern: ^[a-zA-Z0-9\/\-\\?:().,'#=!"%&*<>;@{+\s]*$
                        example: Nation wide
                      category:
                        type: string
                        description: >
                          Allowed values for source line item:
                           [`Mortgage Advance`]
                          <br> Allowed values for destination line item:
                           [`Redemption`, `Conveyancing Fees`, `Surplus`, `Onward Funds`]
                      lineItemReference:
                        type: string
                        example: PEXA220000003D01
                      bankAccount:
                        type: object
                        nullable: true
                        description: This field is required and can be updated only for type
                          DESTINATION.
                        properties:
                          accountName:
                            type: string
                            maxLength: 35
                            minLength: 1
                            pattern: ^[a-zA-Z0-9\/\-\\?:().,'#=!"%&*<>;@{+\s]*$
                            example: Bob Smith
                          accountNumber:
                            type: string
                            pattern: ^\d{8}$
                            example: "12345678"
                          bankCode:
                            type: string
                            pattern: ^\d{6}$
                            example: "123456"
                          accountType:
                            type: string
                            pattern: ^(BUSINESS|PERSONAL)$
                            example: BUSINESS
                            description: |
                              Allowed Values: [`BUSINESS`, `PERSONAL`]
                          displayName:
                            type: string
                            nullable: true
                            maxLength: 35
                            pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ !#$%&\*=^_`\{\|\}~";<>@\[\\\]]+$
                            example: Mortgage account
                        required:
                          - accountName
                          - accountNumber
                          - bankCode
                      verificationDetail:
                        type: object
                        nullable: true
                        properties:
                          status:
                            type: string
                            pattern: ^(MATCH|NAME_PARTIAL_MATCH|NAME_PARTIAL_MATCH_TYPE_NO_MATCH|NO_MATCH|UNABLE_TO_MATCH|ERROR|TIMEOUT|TYPE_NO_MATCH|ACCOUNT_VERIFICATION_NOT_RUN)$
                            example: NAME_PARTIAL_MATCH
                            description: >
                              status of account verification Allowed Values: [
                              `MATCH`, `NAME_PARTIAL_MATCH`,
                              `NAME_PARTIAL_MATCH_TYPE_NO_MATCH`, `NO_MATCH`,
                              `UNABLE_TO_MATCH`, `ERROR`, `TIMEOUT`,
                              `TYPE_NO_MATCH`, `ACCOUNT_VERIFICATION_NOT_RUN` ]
                          partnerReasonCode:
                            type: string
                            nullable: true
                            description: >
                              Reason code sent from third party system for
                              account verification.


                              | Code
                              |                Description                   |

                              | -------|----------------------------------|

                              | ANNM | Account Name does Not Match |

                              | MBAM | There may be a match on the Account name
                              |

                              | BANM | Business account, name matches |

                              | PANM | Personal account, name matches |

                              | BAMM | Business account, name may be a match |

                              | PAMM | Personal account, name may be a match |

                              | AC01 | Incorrect Account Number |

                              | IVCR | Invalid Customer Reference |

                              | ACNS | Account type Not Supported for CoP |

                              | OPTO | Opted out of CoP Scheme |

                              | CASS | Account has been switched |

                              | SCNS | Sort code not supported at endpoint |
                          verified:
                            type: boolean
                            description: denotes in the account details are verified
                          acceptedAt:
                            type: string
                            nullable: true
                            format: date-time
                            description: timestamp recorded when the consent was given for the account
                          acceptedBy:
                            type: string
                            nullable: true
                            description: id of the user who gave the consent for the account
                          actualName:
                            type: string
                            nullable: true
                            description: Actual name of given account received from CoP in case of partial
                              match
                          isManualOverrideAllowed:
                            type: boolean
                            description: Flag to indicate if manual override is allowed
                      hasLinkedAccount:
                        type: boolean
                        nullable: true
                        description: Flag to indicate whether account is a linked account
                  errors:
                    default: []
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              examples:
                SourceLineItem:
                  value:
                    data:
                      lineItemId: 5c39f824-4070-46fc-97c0-72c565542e09
                      type: SOURCE
                      amount: 19
                      authorised: false
                      reference: dfd
                      category: Mortgage Advance
                      lineItemReference: PEXA230044822S01
                      bankAccount: null
                      verificationDetail: null
                      hasLinkedAccount: null
                    errors: []
                DestinationLineItem:
                  value:
                    data:
                      lineItemId: ed781522-e4df-4a11-936c-6b5ec0ec9498
                      amount: 56
                      type: DESTINATION
                      authorised: null
                      reference: hdg
                      category: Redemption
                      lineItemReference: PEXA230044822D02
                      bankAccount:
                        accountName: acc name
                        accountNumber: "34235648"
                        bankCode: "453673"
                        accountType: BUSINESS
                        displayName: null
                      verificationDetail:
                        status: MATCH
                        partnerReasonCode: null
                        verified: true
                        acceptedAt: null
                        acceptedBy: null
                        actualName: null
                        isManualOverrideAllowed: false
                      hasLinkedAccount: false
                    errors: []
                DestinationLineItemWithLinkedAccount:
                  value:
                    data:
                      lineItemId: 85f301f6-11d2-4fc2-bd7f-17af37df1192
                      amount: 10
                      type: DESTINATION
                      authorised: null
                      reference: hh
                      category: Redemption
                      lineItemReference: PEXA230044822D01
                      bankAccount:
                        accountName: ReportsUpdates
                        accountNumber: "52352322"
                        bankCode: "543253"
                        accountType: BUSINESS
                        displayName: API394
                      verificationDetail: null
                      hasLinkedAccount: true
                    errors: []
        "400":
          description: BAD REQUEST
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      lineItemId:
                        type: string
                        description: UUID of the corresponding line item
                        format: uuid
                        example: c7c0ee40-25c1-11ec-9621-0242ac130002
                      type:
                        type: string
                        pattern: ^(SOURCE|DESTINATION)$
                        example: SOURCE
                        description: |
                          Allowed values:
                           [`SOURCE`, `DESTINATION`]
                      amount:
                        type: number
                        minimum: 1
                        maximum: 999999999999.99
                        description: Amount to be credited / debited
                        example: 10
                      authorised:
                        type: boolean
                        example: true
                        nullable: true
                        description: Authorisation status of the line item
                      reference:
                        type: string
                        minLength: 1
                        maxLength: 18
                        pattern: ^[a-zA-Z0-9\/\-\\?:().,'#=!"%&*<>;@{+\s]*$
                        example: Nation wide
                      category:
                        type: string
                        description: >
                          Allowed values for source line item:
                           [`Mortgage Advance`]
                          <br> Allowed values for destination line item:
                           [`Redemption`, `Conveyancing Fees`, `Surplus`, `Onward Funds`]
                      lineItemReference:
                        type: string
                        example: PEXA220000003D01
                      bankAccount:
                        type: object
                        nullable: true
                        description: This field is required and can be updated only for type
                          DESTINATION.
                        properties:
                          accountName:
                            type: string
                            maxLength: 35
                            minLength: 1
                            pattern: ^[a-zA-Z0-9\/\-\\?:().,'#=!"%&*<>;@{+\s]*$
                            example: Bob Smith
                          accountNumber:
                            type: string
                            pattern: ^\d{8}$
                            example: "12345678"
                          bankCode:
                            type: string
                            pattern: ^\d{6}$
                            example: "123456"
                          accountType:
                            type: string
                            pattern: ^(BUSINESS|PERSONAL)$
                            example: BUSINESS
                            description: |
                              Allowed Values: [`BUSINESS`, `PERSONAL`]
                          displayName:
                            type: string
                            nullable: true
                            maxLength: 35
                            pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ !#$%&\*=^_`\{\|\}~";<>@\[\\\]]+$
                            example: Mortgage account
                        required:
                          - accountName
                          - accountNumber
                          - bankCode
                      verificationDetail:
                        type: object
                        nullable: true
                        properties:
                          status:
                            type: string
                            pattern: ^(MATCH|NAME_PARTIAL_MATCH|NAME_PARTIAL_MATCH_TYPE_NO_MATCH|NO_MATCH|UNABLE_TO_MATCH|ERROR|TIMEOUT|TYPE_NO_MATCH|ACCOUNT_VERIFICATION_NOT_RUN)$
                            example: NAME_PARTIAL_MATCH
                            description: >
                              status of account verification Allowed Values: [
                              `MATCH`, `NAME_PARTIAL_MATCH`,
                              `NAME_PARTIAL_MATCH_TYPE_NO_MATCH`, `NO_MATCH`,
                              `UNABLE_TO_MATCH`, `ERROR`, `TIMEOUT`,
                              `TYPE_NO_MATCH`, `ACCOUNT_VERIFICATION_NOT_RUN` ]
                          partnerReasonCode:
                            type: string
                            nullable: true
                            description: >
                              Reason code sent from third party system for
                              account verification.


                              | Code
                              |                Description                   |

                              | -------|----------------------------------|

                              | ANNM | Account Name does Not Match |

                              | MBAM | There may be a match on the Account name
                              |

                              | BANM | Business account, name matches |

                              | PANM | Personal account, name matches |

                              | BAMM | Business account, name may be a match |

                              | PAMM | Personal account, name may be a match |

                              | AC01 | Incorrect Account Number |

                              | IVCR | Invalid Customer Reference |

                              | ACNS | Account type Not Supported for CoP |

                              | OPTO | Opted out of CoP Scheme |

                              | CASS | Account has been switched |

                              | SCNS | Sort code not supported at endpoint |
                          verified:
                            type: boolean
                            description: denotes in the account details are verified
                          acceptedAt:
                            type: string
                            nullable: true
                            format: date-time
                            description: timestamp recorded when the consent was given for the account
                          acceptedBy:
                            type: string
                            nullable: true
                            description: id of the user who gave the consent for the account
                          actualName:
                            type: string
                            nullable: true
                            description: Actual name of given account received from CoP in case of partial
                              match
                          isManualOverrideAllowed:
                            type: boolean
                            description: Flag to indicate if manual override is allowed
                      hasLinkedAccount:
                        type: boolean
                        nullable: true
                        description: Flag to indicate whether account is a linked account
                  errors:
                    default: []
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              examples:
                SourceLineItem:
                  value:
                    error:
                      field: type
                      message: type must be one of [SOURCE, DESTINATION]
                DestinationLineItem:
                  value:
                    error:
                      field: bankAccount
                      message: field is missing
                DestinationLineItemWithLinkedAccount:
                  value:
                    error:
                      field: amount
                      message: field is missing
        "500":
          description: INTERNAL SERVER ERROR
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      lineItemId:
                        type: string
                        description: UUID of the corresponding line item
                        format: uuid
                        example: c7c0ee40-25c1-11ec-9621-0242ac130002
                      type:
                        type: string
                        pattern: ^(SOURCE|DESTINATION)$
                        example: SOURCE
                        description: |
                          Allowed values:
                           [`SOURCE`, `DESTINATION`]
                      amount:
                        type: number
                        minimum: 1
                        maximum: 999999999999.99
                        description: Amount to be credited / debited
                        example: 10
                      authorised:
                        type: boolean
                        example: true
                        nullable: true
                        description: Authorisation status of the line item
                      reference:
                        type: string
                        minLength: 1
                        maxLength: 18
                        pattern: ^[a-zA-Z0-9\/\-\\?:().,'#=!"%&*<>;@{+\s]*$
                        example: Nation wide
                      category:
                        type: string
                        description: >
                          Allowed values for source line item:
                           [`Mortgage Advance`]
                          <br> Allowed values for destination line item:
                           [`Redemption`, `Conveyancing Fees`, `Surplus`, `Onward Funds`]
                      lineItemReference:
                        type: string
                        example: PEXA220000003D01
                      bankAccount:
                        type: object
                        nullable: true
                        description: This field is required and can be updated only for type
                          DESTINATION.
                        properties:
                          accountName:
                            type: string
                            maxLength: 35
                            minLength: 1
                            pattern: ^[a-zA-Z0-9\/\-\\?:().,'#=!"%&*<>;@{+\s]*$
                            example: Bob Smith
                          accountNumber:
                            type: string
                            pattern: ^\d{8}$
                            example: "12345678"
                          bankCode:
                            type: string
                            pattern: ^\d{6}$
                            example: "123456"
                          accountType:
                            type: string
                            pattern: ^(BUSINESS|PERSONAL)$
                            example: BUSINESS
                            description: |
                              Allowed Values: [`BUSINESS`, `PERSONAL`]
                          displayName:
                            type: string
                            nullable: true
                            maxLength: 35
                            pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ !#$%&\*=^_`\{\|\}~";<>@\[\\\]]+$
                            example: Mortgage account
                        required:
                          - accountName
                          - accountNumber
                          - bankCode
                      verificationDetail:
                        type: object
                        nullable: true
                        properties:
                          status:
                            type: string
                            pattern: ^(MATCH|NAME_PARTIAL_MATCH|NAME_PARTIAL_MATCH_TYPE_NO_MATCH|NO_MATCH|UNABLE_TO_MATCH|ERROR|TIMEOUT|TYPE_NO_MATCH|ACCOUNT_VERIFICATION_NOT_RUN)$
                            example: NAME_PARTIAL_MATCH
                            description: >
                              status of account verification Allowed Values: [
                              `MATCH`, `NAME_PARTIAL_MATCH`,
                              `NAME_PARTIAL_MATCH_TYPE_NO_MATCH`, `NO_MATCH`,
                              `UNABLE_TO_MATCH`, `ERROR`, `TIMEOUT`,
                              `TYPE_NO_MATCH`, `ACCOUNT_VERIFICATION_NOT_RUN` ]
                          partnerReasonCode:
                            type: string
                            nullable: true
                            description: >
                              Reason code sent from third party system for
                              account verification.


                              | Code
                              |                Description                   |

                              | -------|----------------------------------|

                              | ANNM | Account Name does Not Match |

                              | MBAM | There may be a match on the Account name
                              |

                              | BANM | Business account, name matches |

                              | PANM | Personal account, name matches |

                              | BAMM | Business account, name may be a match |

                              | PAMM | Personal account, name may be a match |

                              | AC01 | Incorrect Account Number |

                              | IVCR | Invalid Customer Reference |

                              | ACNS | Account type Not Supported for CoP |

                              | OPTO | Opted out of CoP Scheme |

                              | CASS | Account has been switched |

                              | SCNS | Sort code not supported at endpoint |
                          verified:
                            type: boolean
                            description: denotes in the account details are verified
                          acceptedAt:
                            type: string
                            nullable: true
                            format: date-time
                            description: timestamp recorded when the consent was given for the account
                          acceptedBy:
                            type: string
                            nullable: true
                            description: id of the user who gave the consent for the account
                          actualName:
                            type: string
                            nullable: true
                            description: Actual name of given account received from CoP in case of partial
                              match
                          isManualOverrideAllowed:
                            type: boolean
                            description: Flag to indicate if manual override is allowed
                      hasLinkedAccount:
                        type: boolean
                        nullable: true
                        description: Flag to indicate whether account is a linked account
                  errors:
                    default: []
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              examples:
                SourceLineItem:
                  value:
                    errors:
                      - message: Internal Server Error
                DestinationLineItem:
                  value:
                    errors:
                      - message: Internal Server Error
                DestinationLineItemWithLinkedAccount:
                  value:
                    errors:
                      - message: Internal Server Error
        "503":
          description: SERVICE UNAVAILABLE
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              example:
                errors:
                  - message: Service under maintenance
security:
  - oauth2:
      - add:fss_line_items
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://login.pexauk.co.uk/oauth/token
          scopes:
            x-api:accept:payee_account_details: Permission to accept payee account details (CoP override)
            x-api:authorise:funds: Permission to authorise funds for a workspace
            x-api:approve:financial_settlement_schedules: Permission to approve financial settlement schedules
            x-api:unapprove:financial_settlement_schedules: Permission to unapprove financial settlement schedules
            add:fss_line_items: Permission to add financial settlement schedule line items
            delete:fss_line_items: Permission to delete financial settlement schedule line items
            view:financial_settlement_schedules: Permission to view financial settlement schedules
            edit:financial_settlement_schedules: Permission to edit financial settlement schedules
            edit:fss_line_items: Permission to edit financial settlement schedule line items
            authorise:funds: Permission to authorise funds for a workspace
            approve:financial_settlement_schedules: Permission to approve financial settlement schedules
            unapprove:financial_settlement_schedules: Permission to unapprove financial settlement schedules
```
