# List counterparties

List counterparties

Endpoint: POST /v2/counterparties:list
Version: 2.0
Security: TokenAuth

## Request fields (application/json):

  - `pageSize` (integer)
    The number of results to return per page (default 50, max 1000)
    Example: 1000

  - `pageToken` (string)
    The token to retrieve the next page of results
    Example: "cGFnZV9zaXplPTEwJnBhZ2VfdG9rZW49MjA="

  - `pagination` (object)
    Pagination and sorting. Sortable fields: name, type, created_at, updated_at.

  - `pagination.pageSize` (integer)
    Number of results per page (default 50, max 1000)
    Example: 50

  - `pagination.pageToken` (string)
    Token for pagination from previous response
    Example: "cGFnZV9zaXplPTEwJnBhZ2VfdG9rZW49MjA="

  - `pagination.orderBy` (string)
    Field to order results by
    Example: "created_at"

  - `pagination.order` (string)
    Sort order (ASC or DESC)
    Enum: "SORT_ORDER_ASC", "SORT_ORDER_DESC"

  - `filter` (object)
    Optional counterparty filters. Each populated sub-filter is AND-ed.

  - `filter.id` (object)
    Filter by counterparty ID

  - `filter.id.eq` (string)
    Exact match

  - `filter.id.notEq` (string)
    Not equal to

  - `filter.id.contains` (string)
    Contains substring (case-insensitive)

  - `filter.id.startsWith` (string)
    Starts with prefix (case-insensitive)

  - `filter.id.endsWith` (string)
    Ends with suffix (case-insensitive)

  - `filter.id.in` (array)
    Value is in the list

  - `filter.id.notIn` (array)
    Value is not in the list

  - `filter.id.isNull` (boolean)
    Check if field is null

  - `filter.name` (object)
    Filter by counterparty name

  - `filter.name.eq` (string)
    Exact match

  - `filter.name.notEq` (string)
    Not equal to

  - `filter.name.contains` (string)
    Contains substring (case-insensitive)

  - `filter.name.startsWith` (string)
    Starts with prefix (case-insensitive)

  - `filter.name.endsWith` (string)
    Ends with suffix (case-insensitive)

  - `filter.name.in` (array)
    Value is in the list

  - `filter.name.notIn` (array)
    Value is not in the list

  - `filter.name.isNull` (boolean)
    Check if field is null

  - `filter.description` (object)
    Filter by counterparty description

  - `filter.description.eq` (string)
    Exact match

  - `filter.description.notEq` (string)
    Not equal to

  - `filter.description.contains` (string)
    Contains substring (case-insensitive)

  - `filter.description.startsWith` (string)
    Starts with prefix (case-insensitive)

  - `filter.description.endsWith` (string)
    Ends with suffix (case-insensitive)

  - `filter.description.in` (array)
    Value is in the list

  - `filter.description.notIn` (array)
    Value is not in the list

  - `filter.description.isNull` (boolean)
    Check if field is null

  - `filter.type` (string)
    Filter by counterparty type
    Enum: "ORGANIZATION", "INDIVIDUAL", "DAPP"

  - `filter.createdAt` (object)
    Filter by creation timestamp

  - `filter.createdAt.eq` (string)
    Exact timestamp match
    Example: "2024-08-08T10:00:00Z"

  - `filter.createdAt.notEq` (string)
    Not equal to timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.createdAt.before` (string)
    Before this timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.createdAt.after` (string)
    After this timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.createdAt.gte` (string)
    Greater than or equal to timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.createdAt.lte` (string)
    Less than or equal to timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.createdAt.between` (object)
    Between two timestamps (inclusive)

  - `filter.createdAt.between.start` (string)
    Start of time range (inclusive)
    Example: "2024-08-01T00:00:00Z"

  - `filter.createdAt.between.end` (string)
    End of time range (inclusive)
    Example: "2024-08-31T23:59:59Z"

  - `filter.createdAt.isNull` (boolean)
    Check if field is null

  - `filter.createdAt.relativeDays` (integer)
    Relative days from now (negative for past, positive for future)
    Example: -7

  - `filter.updatedAt` (object)
    Filter by last-update timestamp

  - `filter.updatedAt.eq` (string)
    Exact timestamp match
    Example: "2024-08-08T10:00:00Z"

  - `filter.updatedAt.notEq` (string)
    Not equal to timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.updatedAt.before` (string)
    Before this timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.updatedAt.after` (string)
    After this timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.updatedAt.gte` (string)
    Greater than or equal to timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.updatedAt.lte` (string)
    Less than or equal to timestamp
    Example: "2024-08-08T10:00:00Z"

  - `filter.updatedAt.between` (object)
    Between two timestamps (inclusive)

  - `filter.updatedAt.between.start` (string)
    Start of time range (inclusive)
    Example: "2024-08-01T00:00:00Z"

  - `filter.updatedAt.between.end` (string)
    End of time range (inclusive)
    Example: "2024-08-31T23:59:59Z"

  - `filter.updatedAt.isNull` (boolean)
    Check if field is null

  - `filter.updatedAt.relativeDays` (integer)
    Relative days from now (negative for past, positive for future)
    Example: -7

  - `search` (string)
    Case-insensitive search over counterparty ID, name, description, and counterparty details.
    Example: "Treasury"

## Response 200 fields (application/json):

  - `filter` (object)

  - `filter.previousPageToken` (string)
    The token to retrieve the previous page of results
    Example: "cGFnZV9zaXplPTEwJnBhZ2VfdG9rZW49MjA="

  - `filter.nextPageToken` (string)
    The token to retrieve the next page of results
    Example: "cGFnZV9zaXplPTEwJnBhZ2VfdG9rZW49MjA="

  - `filter.total` (integer, required)
    The total number of results
    Example: 100

  - `counterparties` (array)

  - `counterparties.id` (string, required)
    The counterparty ID
    Example: "ce4918bf-a199-4ce2-85a3-d0d296855384"

  - `counterparties.createdBy` (string, required)
    The ID of the user who created this counterparty
    Example: "ce4918bf-a199-4ce2-85a3-d0d296855384"

  - `counterparties.createdAt` (string, required)
    The date and time the counterparty was created
    Example: "2022-03-29T10:22:22.420Z"

  - `counterparties.updatedBy` (string, required)
    The ID of the user who updated this counterparty
    Example: "ce4918bf-a199-4ce2-85a3-d0d296855384"

  - `counterparties.updatedAt` (string, required)
    The date and time the counterparty was updated
    Example: "2022-03-29T10:22:22.420Z"

  - `counterparties.name` (string, required)
    The counterparty name
    Example: "Palisade"

  - `counterparties.description` (string)
    The counterparty description
    Example: "A counterparty used by the treasury department"

  - `counterparties.details` (object, required)
    The counterparty details

  - `counterparties.details.type` (string, required)
    The counterparty type
    Enum: same as `filter.type` (3 values)

  - `counterparties.details.individual` (object)

  - `counterparties.details.individual.firstName` (string, required)
    The persons first name
    Example: "Joe"

  - `counterparties.details.individual.lastName` (string, required)
    The persons last name
    Example: "Bloggs"

  - `counterparties.details.individual.address` (object)

  - `counterparties.details.individual.address.address1` (string, required)
    The first line of the address
    Example: "Flat B"

  - `counterparties.details.individual.address.address2` (string)
    The second line of the address
    Example: "10 Mayo Road"

  - `counterparties.details.individual.address.city` (string, required)
    The city of the address
    Example: "London"

  - `counterparties.details.individual.address.state` (string, required)
    The state of the address
    Example: "Greater London"

  - `counterparties.details.individual.address.postCode` (string, required)
    The postal code of the address
    Example: "W1 1AA"

  - `counterparties.details.individual.address.country` (string, required)
    The country of the address
    Example: "United Kingdom"

  - `counterparties.details.organization` (object)

  - `counterparties.details.organization.legalName` (string, required)
    The full legal name of the organization
    Example: "Palisade Financial"

  - `counterparties.details.organization.address` (object)

  - `counterparties.details.dApp` (object)

  - `counterparties.addressCount` (integer, required)
    The number of addresses associated with the counterparty
    Example: 5

## Response 400 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)


