List record associations
Code Mode: praxis.crm.associations.list
HTTP: GET /crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}
Read records linked to a source record, including association labels and type ids. Obtain source and destination object types from schemas.list and objectId from objects.list or objects.search. Follow paging.next.after to continue reading associated records.
签名
praxis.crm.associations.list(args:{path:{objectId:string;objectType:string;toObjectType:string};query?:{after?:string;/** e.g. 0 */ limit?:number}}):Promise<{/** Pagination links and opaque continuation cursors; absence of next marks the final page. */ paging?:{/** Continuation cursor for the following page; omit further calls when this member is absent. */ next?:{/** A paging cursor token for retrieving subsequent pages. */ after:string;/** A URL that can be used to retrieve the next page results. */ link?:string}};/** An array of objects, each representing an association with multiple labels. */ results:Array<{/** An array of association types with labels, defining the nature of the associations between objects. */ associationTypes:Array<{/** The category of the association, such as HUBSPOT_DEFINED, USER_DEFINED, or INTEGRATOR_DEFINED. e.g. "HUBSPOT_DEFINED" */ category:"HUBSPOT_DEFINED"|"INTEGRATOR_DEFINED"|"USER_DEFINED"|"WORK";/** A string representing the object type ID from which the association originates. */ fromObjectTypeId?:string;/** A label describing the association between two objects. */ label?:string;/** A string representing the object type ID to which the association is directed. */ toObjectTypeId?:string;/** The unique identifier for the type of association. e.g. 0 */ typeId:number}>;/** The unique identifier for the target object in the association. */ toObjectId:string}>}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| objectId | path | string | 是 | Record id from objects.list, objects.search or objects.create for this objectType. |
| objectType | path | string | 是 | Object type name from schemas.list, such as contacts, companies, deals or a custom p_<name>. |
| toObjectType | path | string | 是 | Destination object type from schemas.list; use the type of the record being linked. |
| after | query | string | 否 | The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. |
| limit | query | number | 否 | The maximum number of results to display per page. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | List record associations succeeded; inspect the returned resource or result collection. |
| 400 | application/json | VALIDATION_ERROR rejects invalid properties or stage rules; supply errors[0].context.properties when requirements are missing, or choose an allowed stage. BAD_REQUEST rejects malformed input; correct the request before retrying. |
| 401 | application/json | The bearer credential is missing or invalid; provide a valid platform API key before retrying. |
| 404 | application/json | OBJECT_NOT_FOUND means an object type, record or definition is unavailable in your organization; select an accessible identifier from its list operation. |