Salesforce Lookups API

Lookup field search endpoints

Documentation

Specifications

Schemas & Data

OpenAPI Specification

salesforce-lookups-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Salesforce Bulk API 2.0 Abort Lookups API
  description: 'Salesforce Bulk API 2.0 is a simplified, REST-based interface for bulk data operations that improves on the original Bulk API. It uses a straightforward job model and supports CSV format for ingest and query jobs, enabling processing of millions of records asynchronously.

    '
  version: v63.0
  contact:
    name: Salesforce Developers
    url: https://developer.salesforce.com/
  license:
    name: Salesforce Developer Terms
    url: https://www.salesforce.com/company/legal/agreements/
servers:
- url: https://{instance}.salesforce.com/services/data/v{version}/jobs
  description: Salesforce Bulk API 2.0 jobs endpoint
  variables:
    instance:
      default: yourInstance
      description: 'The Salesforce instance identifier (e.g., na1, eu3, or a My Domain subdomain like mycompany).

        '
    version:
      default: '63.0'
      description: 'The Salesforce API version number (e.g., 63.0). Use the latest supported version for new integrations.

        '
security:
- BearerAuth: []
tags:
- name: Lookups
  description: Lookup field search endpoints
paths:
  /lookups/{objectApiName}/{fieldApiName}:
    get:
      operationId: getLookupRecords
      summary: Salesforce Search Lookup Field Records
      description: Returns matching records for a lookup field search. Used to populate the typeahead list in Lightning lookup components.
      tags:
      - Lookups
      parameters:
      - $ref: '#/components/parameters/ObjectApiName'
      - name: fieldApiName
        in: path
        required: true
        description: The API name of the lookup field
        schema:
          type: string
        example: example_value
      - name: searchTerm
        in: query
        required: true
        description: The search text to match against lookup records
        schema:
          type: string
        example: example_value
      - name: dependentFieldBindings
        in: query
        description: JSON-encoded field value pairs for dependent picklist filtering
        schema:
          type: string
        example: example_value
      - $ref: '#/components/parameters/PageSize'
      responses:
        '200':
          description: Lookup results retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupRecordsCollection'
              examples:
                Getlookuprecords200Example:
                  summary: Default getLookupRecords 200 response
                  x-microcks-default: true
                  value:
                    count: 42
                    lookupResults:
                    - displayValue: example_value
                      id: abc123
                      name: Example Title
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    LookupRecordsCollection:
      type: object
      description: Collection of records matching a lookup search
      properties:
        count:
          type: integer
          example: 42
        lookupResults:
          type: array
          items:
            type: object
            properties:
              displayValue:
                type: string
              id:
                type: string
              name:
                type: string
          example: []
  parameters:
    PageSize:
      name: pageSize
      in: query
      description: Number of records per page
      schema:
        type: integer
        minimum: 1
        maximum: 2000
        default: 50
    ObjectApiName:
      name: objectApiName
      in: path
      required: true
      description: The API name of the Salesforce object (e.g., Account, Contact, MyObject__c)
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'OAuth 2.0 Bearer token obtained from the Salesforce OAuth 2.0 token endpoint. Include this token in the Authorization header as "Bearer {access_token}".

        '