跳转到内容
EN

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}>}>;

参数

名称位置类型必填说明
objectIdpathstring是Record id from objects.list, objects.search or objects.create for this objectType.
objectTypepathstring是Object type name from schemas.list, such as contacts, companies, deals or a custom p_<name>.
toObjectTypepathstring是Destination object type from schemas.list; use the type of the record being linked.
afterquerystring否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.
limitquerynumber否The maximum number of results to display per page.

响应

状态码内容类型说明
200application/jsonList record associations succeeded; inspect the returned resource or result collection.
400application/jsonVALIDATION_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.
401application/jsonThe bearer credential is missing or invalid; provide a valid platform API key before retrying.
404application/jsonOBJECT_NOT_FOUND means an object type, record or definition is unavailable in your organization; select an accessible identifier from its list operation.