# Get Custom Object Instance by External ID

`GET /custom_object_instances/{custom_object_type_identifier}`

> This is a subset of the full specification, limited to the `GET /custom_object_instances/{custom_object_type_identifier}` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `GET /custom_object_instances/{custom_object_type_identifier}` operation.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Custom Object Instances
    description: |-
      Everything about your Custom Object instances.

      **Permission Requirements**

      From now on, to access this endpoint, you need additional permissions. Please head over to the [Developer Hub](https://app.intercom.com/a/apps/_/developer-hub) app package authentication settings to configure the required permissions.
paths:
  /custom_object_instances/{custom_object_type_identifier}:
    parameters:
      - name: custom_object_type_identifier
        in: path
        description: The unique identifier of the custom object type that defines the structure of the custom object instance.
        example: Order
        required: true
        schema:
          type: string
    get:
      summary: Get Custom Object Instance by External ID
      parameters:
        - name: external_id
          in: query
          style: form
          required: true
          schema:
            type: string
            description: The unique identifier for the instance in the external system it originated from.
            title: Find by external_id
            properties:
              external_id:
                type: string
            required:
              - external_id
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
      tags:
        - Custom Object Instances
      operationId: getCustomObjectInstancesByExternalId
      description: Fetch a Custom Object Instance by external_id.
      responses:
        '200':
          description: successful
          content:
            application/json:
              examples:
                successful:
                  value:
                    id: '24'
                    type: Order
                    custom_attributes:
                      order_number: ORDER-12345
                      total_amount: 99.99
                    external_id: '123'
                    external_created_at: null
                    external_updated_at: null
                    created_at: 1734537748
                    updated_at: 1734537748
              schema:
                $ref: '#/components/schemas/custom_object_instance'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/ObjectNotFound'
components:
  schemas:
    custom_object_instance:
      title: Custom Object Instance
      type: object
      x-tags:
        - Custom Object Instances
      nullable: true
      description: A Custom Object Instance represents an instance of a custom object type. This allows you to create and set custom attributes to store data about your customers that is not already captured by Intercom. The parent object includes recommended default attributes and you can add your own custom attributes.
      properties:
        id:
          type: string
          description: The Intercom defined id representing the custom object instance.
          example: 16032025
        external_id:
          type: string
          description: The id you have defined for the custom object instance.
          example: 0001d1c1e65a7a19e9f59ae2
        external_created_at:
          type: integer
          format: date-time
          nullable: true
          description: The time when the Custom Object instance was created in the external system it originated from.
          example: 1571672154
        external_updated_at:
          type: integer
          format: date-time
          nullable: true
          description: The time when the Custom Object instance was last updated in the external system it originated from.
          example: 1571672154
        created_at:
          type: integer
          format: date-time
          description: The time the attribute was created as a UTC Unix timestamp
          example: 1671028894
        updated_at:
          type: integer
          format: date-time
          description: The time the attribute was last updated as a UTC Unix timestamp
          example: 1671028894
        type:
          type: string
          description: The identifier of the custom object type that defines the structure of the custom object instance.
          example: Order
        custom_attributes:
          type: object
          description: The custom attributes you have set on the custom object instance.
          additionalProperties:
            type: string
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.15'
      default: '2.15'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          examples:
            Unauthorized:
              value:
                type: error.list
                request_id: 12a938a3-314e-4939-b773-5cd45738bd21
                errors:
                  - code: unauthorized
                    message: Access Token Invalid
          schema:
            $ref: '#/components/schemas/error'
    ObjectNotFound:
      description: Not Found
      content:
        application/json:
          examples:
            ObjectNotFound:
              value:
                type: error.list
                request_id: 12a938a3-314e-4939-b773-5cd45738bd21
                errors:
                  - code: not_found
                    message: Object not found
            CustomObjectNotFound:
              value:
                type: error.list
                request_id: 12a938a3-314e-4939-b773-5cd45738bd21
                errors:
                  - code: not_found
                    message: Custom object instance not found
            IntegrationNotFound:
              value:
                type: error.list
                request_id: 12a938a3-314e-4939-b773-5cd45738bd21
                errors:
                  - code: data_invalid
                    message: Integration not found
          schema:
            $ref: '#/components/schemas/error'
```
