Skip to main content

List Party Roles

Retrieves all roles assigned to a party across different docks in the organization.
GET /v1/organizations/:orgId/parties/:partyId/roles

Path Parameters

ParameterTypeRequiredDescription
orgIdstringRequiredOrganization ID (prefix: org_)
partyIdstringRequiredParty ID (prefix: pty_)

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Maximum items to return
offsetinteger0Number of items to skip
rolestring-Filter by role: DISTRIBUTOR or RECIPIENT
dockIdstring-Filter by specific dock

Example Request

# List all roles for a party
curl https://api.docyard.io/v1/organizations/org_01HQ3K.../parties/pty_01HQ3L.../roles \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

# Filter by role type
curl "https://api.docyard.io/v1/organizations/org_01HQ3K.../parties/pty_01HQ3L.../roles?role=DISTRIBUTOR" \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

# Check specific dock
curl "https://api.docyard.io/v1/organizations/org_01HQ3K.../parties/pty_01HQ3L.../roles?dockId=dock_01HQ3M..." \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

Response

{
  "data": [
    {
      "id": "dpr_01HQ3K9B2...",
      "dockId": "dock_01HQ3M...",
      "dockName": "Underwriting Division",
      "partyId": "pty_01HQ3L...",
      "role": "DISTRIBUTOR",
      "createdAt": "2024-03-01T12:00:00.000Z"
    },
    {
      "id": "dpr_01HQ3L9C3...",
      "dockId": "dock_01HQ3N...",
      "dockName": "Agent Portal",
      "partyId": "pty_01HQ3L...",
      "role": "RECIPIENT",
      "createdAt": "2024-02-15T09:30:00.000Z"
    }
  ],
  "meta": {
    "total": 2,
    "page": 1,
    "pageSize": 20,
    "hasMore": false
  }
}

Response Fields

FieldTypeDescription
dataarrayList of role assignments
data[].idstringRole assignment identifier (prefix: dpr_)
data[].dockIdstringDock identifier
data[].dockNamestringHuman-readable dock name
data[].partyIdstringParty identifier
data[].rolestringDISTRIBUTOR or RECIPIENT
data[].createdAtstringISO 8601 timestamp
meta.totalintegerTotal role assignments
meta.hasMorebooleanWhether more results exist

Error Handling

StatusCondition
401Missing or invalid API key
404Organization or party not found

Use Cases

Party Profile: Display all docks where a party participates and their roles in each. Access Audit: Review all distribution and reception rights for a counterparty. Multi-Role Verification: Confirm a party’s capabilities across the organization (e.g., “Can this title company both send and receive documents?”)

Example: Multi-Role Party

{
  "data": [
    {
      "dockId": "dock_01HQ3M...",
      "dockName": "Mortgage Insurance",
      "role": "DISTRIBUTOR"
    },
    {
      "dockId": "dock_01HQ3N...",
      "dockName": "Commercial Real Estate",
      "role": "DISTRIBUTOR"
    },
    {
      "dockId": "dock_01HQ3P...",
      "dockName": "Agent Rate Sheets",
      "role": "RECIPIENT"
    }
  ]
}
This party acts as a distributor in two docks and a recipient in one dock.