Skip to content

Commit 806759b

Browse files
authored
feat(custom-objects): add list-all instances endpoint docs (#461)
1 parent bbaac00 commit 806759b

1 file changed

Lines changed: 93 additions & 26 deletions

File tree

descriptions/0/api.intercom.io.yaml

Lines changed: 93 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10327,30 +10327,54 @@ paths:
1032710327
order_number: ORDER-12345
1032810328
total_amount: 99.99
1032910329
get:
10330-
summary: Get Custom Object Instance by External ID
10330+
summary: List Custom Object Instances
1033110331
parameters:
10332+
- name: references_contact_id
10333+
in: query
10334+
required: false
10335+
description: Return instances associated with the given contact ID.
10336+
schema:
10337+
type: string
10338+
- name: references_conversation_id
10339+
in: query
10340+
required: false
10341+
description: Return instances associated with the given conversation ID.
10342+
schema:
10343+
type: string
1033210344
- name: external_id
1033310345
in: query
10334-
style: form
10335-
required: true
10346+
required: false
10347+
description: Return the single instance with this external ID. When provided,
10348+
the response is a single object rather than a list.
1033610349
schema:
1033710350
type: string
10338-
description: The unique identifier for the instance in the external system
10339-
it originated from.
10340-
title: Find by external_id
10341-
properties:
10342-
external_id:
10343-
type: string
10344-
required:
10345-
- external_id
10351+
- name: page
10352+
in: query
10353+
required: false
10354+
description: Page number of results to fetch.
10355+
schema:
10356+
type: integer
10357+
- name: per_page
10358+
in: query
10359+
required: false
10360+
description: Number of results per page. Maximum 150.
10361+
schema:
10362+
type: integer
10363+
maximum: 150
1034610364
- name: Intercom-Version
1034710365
in: header
1034810366
schema:
1034910367
"$ref": "#/components/schemas/intercom_version"
1035010368
tags:
1035110369
- Custom Object Instances
10352-
operationId: getCustomObjectInstancesByExternalId
10353-
description: Fetch a Custom Object Instance by external_id.
10370+
operationId: listCustomObjectInstances
10371+
description: |-
10372+
List instances of a custom object type. Three modes are supported:
10373+
- **No filter** — returns all instances for the type.
10374+
- **`references_contact_id`** — returns instances associated with the given contact.
10375+
- **`references_conversation_id`** — returns instances associated with the given conversation.
10376+
10377+
When **`external_id`** is provided, returns a single matching instance (not a list).
1035410378
responses:
1035510379
'200':
1035610380
description: successful
@@ -10359,22 +10383,40 @@ paths:
1035910383
examples:
1036010384
successful:
1036110385
value:
10362-
id: '24'
10363-
type: Order
10364-
custom_attributes:
10365-
order_number: ORDER-12345
10366-
total_amount: 99.99
10367-
external_id: '123'
10368-
external_created_at:
10369-
external_updated_at:
10370-
created_at: 1734537748
10371-
updated_at: 1734537748
10372-
schema:
10373-
"$ref": "#/components/schemas/custom_object_instance"
10386+
type: list
10387+
pages:
10388+
type: pages
10389+
page: 1
10390+
per_page: 20
10391+
total_pages: 1
10392+
total_count: 2
10393+
data:
10394+
- id: '2'
10395+
type: Order
10396+
custom_attributes:
10397+
order_number: ORDER-98765
10398+
total_amount: 149.99
10399+
external_id: order_002
10400+
external_created_at:
10401+
external_updated_at:
10402+
created_at: 1734537800
10403+
updated_at: 1734537800
10404+
- id: '1'
10405+
type: Order
10406+
custom_attributes:
10407+
order_number: ORDER-12345
10408+
total_amount: 99.99
10409+
external_id: order_001
10410+
external_created_at: 1734537100
10411+
external_updated_at: 1734537100
10412+
created_at: 1734537100
10413+
updated_at: 1734537100
10414+
schema:
10415+
"$ref": "#/components/schemas/custom_object_instances_paginated_list"
1037410416
'401':
1037510417
$ref: "#/components/responses/Unauthorized"
1037610418
'404':
10377-
$ref: "#/components/responses/ObjectNotFound"
10419+
$ref: "#/components/responses/TypeNotFound"
1037810420
delete:
1037910421
summary: Delete a Custom Object Instance by External ID
1038010422
parameters:
@@ -23213,6 +23255,31 @@ components:
2321323255
reference attribute on the parent object.
2321423256
items:
2321523257
"$ref": "#/components/schemas/custom_object_instance"
23258+
custom_object_instances_paginated_list:
23259+
title: Custom Object Instances
23260+
type: object
23261+
x-tags:
23262+
- Custom Object Instances
23263+
description: A paginated list of custom object instances.
23264+
nullable: false
23265+
properties:
23266+
type:
23267+
type: string
23268+
description: The type of the object - `list`.
23269+
enum:
23270+
- list
23271+
example: list
23272+
pages:
23273+
"$ref": "#/components/schemas/pages_link"
23274+
total_count:
23275+
type: integer
23276+
description: A count of the total number of custom object instances.
23277+
example: 2
23278+
data:
23279+
type: array
23280+
description: An array of Custom Object Instance objects.
23281+
items:
23282+
"$ref": "#/components/schemas/custom_object_instance"
2321623283
customer_request:
2321723284
type: object
2321823285
nullable: true

0 commit comments

Comments
 (0)