Skip to content
Navigation

Search services

Search the e-Oficlinic services by text over the connection's local index of the provider's complete master catalog and its professionals' configured services (GRID_PROCEDIMIENTOS), read through the connection and published only when complete. Results rank by an exact provider id, code or CUPS code, then the text as a phrase of the name, every word (accents ignored, prefixes allowed), then words within a small spelling distance. excludeTerms and excludeServiceIds are hard exclusions applied before ranking: no excluded service ever comes back, related ones included. configuredOnly (true by default) keeps services configured for at least one active professional; false searches the whole master catalog, which is not coverage. includeRelated adds, below every direct match, services configured for active professionals whose specialty matches the text, marked related_specialty: it is not a claim of clinical equivalence. Nothing here is coverage, an authorization or an open slot. The first search of a connection starts building the index and answers INDEX_NOT_READY until it is complete; an older index keeps serving while a refresh builds. Pass pageInfo.nextCursor with the same filters for more. agentMode true answers concise Spanish text instead.

  • Scope: oficlinic:services:read
  • Credentials: an API key, a client-credentials token or a person's access token
  • Effect: read-only; safe to retry
  • Limits: request body up to 8 KB, response up to 64 KB
  • CLI: arbol oficlinic services search · MCP tool: oficlinic_services_search
POST
https://api.getarbol.com/v1/oficlinic/services/search

Authorization

  • Authorization
    string
    required
    Bearer <token>, where the token is an API key, a client-credentials token or a person's access token with the scope oficlinic:services:read. Get an API key.

Request body JSON required

  • connectionId
    optional
    string

    An Account connection id of the caller's organization.

    pattern: ^con_[0-9A-Za-z]{26}$
  • q
    optional
    string

    Free text: a service name in Spanish, words of it, or a provider id, code or CUPS code. Without it, the filtered services are listed in the provider's order.

    maxLength: 200 · minLength: 1
  • excludeTerms
    optional
    array of
    string

    Hard exclusions: a service whose name or CUPS description has a word starting with any of these terms (accents ignored) is never answered.

    maxLength: 60 · minLength: 2 · default: []
  • excludeServiceIds
    optional
    array of
    string

    Hard exclusions by service id.

    pattern: ^[0-9A-Za-z._-]{1,32}$ · default: []
  • active
    optional
    boolean

    Only services whose master-catalog active flag is this value.

  • professionalId
    optional
    string

    Only services configured for this active professional (GRID_PROCEDIMIENTOS); PROFESSIONAL_NOT_FOUND when the index holds no such active professional.

    pattern: ^[0-9A-Za-z._-]{1,32}$
  • specialty
    optional
    string

    Only services configured for an active professional whose specialty contains these words (accents ignored).

    maxLength: 80 · minLength: 2
  • configuredOnly
    optional
    boolean

    true (the default) keeps services configured for at least one active professional; false searches the whole master catalog.

    default: true
  • includeRelated
    optional
    boolean

    Also answer, below every direct match, services configured for active professionals whose specialty matches q, marked related_specialty. Not a claim of clinical equivalence.

    default: false
  • cursor
    optional
    string

    An opaque cursor from a previous page's pageInfo.nextCursor or pageInfo.previousCursor.

    maxLength: 192 · minLength: 4 · pattern: ^[A-Za-z0-9_-]+$
  • direction
    optional
    forward
    or
    backward

    Direction to traverse the stable keyset ordering from the supplied cursor.

    default: "forward"
  • limit
    optional
    integer

    Maximum items returned in one page. Defaults to 10; larger reads require another cursor.

    maximum: 50 · minimum: 1 · default: 10
  • agentMode
    optional
    boolean

    true answers { text }: concise Spanish facts for a messaging or voice agent, with the short ids and the cursor needed to continue. false, the default, answers the structured object.

    default: false

Returns

200

Successful operation.

JSON
  • success
    true
    required
  • data
    required

    One of the following:

    • OficlinicServiceSearchPage
      • data
        array of
        object
        required

        Items admitted by this resource contract within the verified organization.

        • id
          string
          required

          The provider's service id (IdProced).

        • code
          string | null
          required

          The provider's own service code (CodProced).

        • name
          string
          required

          The service name (DesProced), as the provider spells it.

        • cupsCode
          string | null
          required

          The CUPS code (CUPSCodigo).

        • cupsDescription
          string | null
          required

          The CUPS description (CUPSDescripcion); null in a professional's configured list, which does not carry it.

        • specialPreparation
          string | null
          required

          The provider's PreparacionEspecial value, unchanged; null in a professional's configured list.

        • active
          boolean | null
          required

          The provider's active flag (Activo, t or f); null for an unrecognized value and in a professional's configured list.

        • studyType
          string | null
          required

          The provider's TipoEstudio value, unchanged.

        • configured
          boolean
          required

          Whether at least one professional the provider lists as active has the service configured (GRID_PROCEDIMIENTOS) in the indexed generation. Configuration is not coverage, an authorization or an open slot.

        • professionalCount
          integer
          required

          How many active professionals have the service configured.

          minimum: 0
        • match
          code
          or
          phrase
          or
          words
          or
          approximate
          or
          related_specialty
          or
          filter
          required

          code: q is the service's provider id, code or CUPS code. phrase: the name contains q. words: every word (or almost every word of a long q) matched exactly or as a prefix. approximate: some word matched only within a small spelling distance. related_specialty: includeRelated added it because an active professional configured for it has a specialty matching q; it is not an equivalent procedure. filter: no q, listed in the provider's order.

        • relatedSpecialty
          string | null
          required

          For match related_specialty, the matching specialty as the provider spells it; otherwise null.

        • indexedAt
          string
          required

          When the indexed generation was completed; results never mix generations, and an older one keeps serving while a refresh builds.

          format: date-time
      • object
        string
        required

        Discriminator for a resource list response.

      • pageInfo
        object
        required

        Opaque navigation cursors for this page’s stable keyset order.

        • hasNextPage
          boolean
          required

          Whether a later page exists in the current ordering.

        • hasPreviousPage
          boolean
          required

          Whether an earlier page exists in the current ordering.

        • nextCursor
          string | null
          required

          Opaque cursor for the next page, or null when there is none.

        • previousCursor
          string | null
          required

          Opaque cursor for the previous page, or null when there is none.

    • OficlinicAgentText
      • text
        string
        required

        Concise Spanish facts of the answer, with the ids and cursor to continue. Pending or unknown outcomes are stated as such.

  • error
    unknown
    required
  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

400

  • INVALID_INPUT: The request does not match the published schema.
  • INVALID_CURSOR: The cursor is invalid or belongs to another list.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    required

    One of the following:

    • InvalidInputFailure
      INVALID_INPUT
      • code
        INVALID_INPUT
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required
        • issues
          optional
          array of
          object
          • path
            string
            required

            RFC 6901 JSON Pointer to the refused field; empty for the whole input.

            maxLength: 256
          • message
            string
            required
            maxLength: 256
    • OficlinicInvalidCursorFailure
      INVALID_CURSOR
      • code
        INVALID_CURSOR
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

401

UNAUTHORIZED: A valid access token is required.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    object
    required

    A valid access token is required.

    • code
      UNAUTHORIZED
      required

      The failure code, stable across releases.

    • message
      string
      required

      What went wrong, for people; it never contains input values.

    • retryable
      false
      required

      Whether repeating the same request may succeed.

    • data
      object
      required

      No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

403

FORBIDDEN: The token does not authorize this operation.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    object
    required

    The token does not authorize this operation.

    • code
      FORBIDDEN
      required

      The failure code, stable across releases.

    • message
      string
      required

      What went wrong, for people; it never contains input values.

    • retryable
      false
      required

      Whether repeating the same request may succeed.

    • data
      object
      required

      No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

404

  • CONNECTION_NOT_FOUND: The connection does not exist in this organization.
  • PROFESSIONAL_NOT_FOUND: The professional is not an active professional of the connection's indexed directory.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    required

    One of the following:

    • OficlinicConnectionNotFoundFailure
      CONNECTION_NOT_FOUND
      • code
        CONNECTION_NOT_FOUND
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

    • OficlinicProfessionalNotFoundFailure
      PROFESSIONAL_NOT_FOUND
      • code
        PROFESSIONAL_NOT_FOUND
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

409

  • CONNECTION_REQUIRED: The organization has several active connections: select one.
  • CONNECTION_NOT_ACTIVE: The connection is not active.
  • REAUTHENTICATION_REQUIRED: Provider sign-in is stopped for this connection. Verify the connection again.
  • INDEX_UNAVAILABLE: The connection's service index could not be built. Staff must check the connection and sync the catalog.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    required

    One of the following:

    • OficlinicConnectionRequiredFailure
      CONNECTION_REQUIRED
      • code
        CONNECTION_REQUIRED
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

    • OficlinicConnectionNotActiveFailure
      CONNECTION_NOT_ACTIVE
      • code
        CONNECTION_NOT_ACTIVE
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

    • OficlinicReauthenticationRequiredFailure
      REAUTHENTICATION_REQUIRED
      • code
        REAUTHENTICATION_REQUIRED
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

    • OficlinicIndexUnavailableFailure
      INDEX_UNAVAILABLE
      • code
        INDEX_UNAVAILABLE
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

413

REQUEST_TOO_LARGE: The request exceeds the allowed size.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    object
    required

    The request exceeds the allowed size.

    • code
      REQUEST_TOO_LARGE
      required

      The failure code, stable across releases.

    • message
      string
      required

      What went wrong, for people; it never contains input values.

    • retryable
      false
      required

      Whether repeating the same request may succeed.

    • data
      object
      required

      No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

415

UNSUPPORTED_MEDIA_TYPE: The request content type is not supported.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    object
    required

    The request content type is not supported.

    • code
      UNSUPPORTED_MEDIA_TYPE
      required

      The failure code, stable across releases.

    • message
      string
      required

      What went wrong, for people; it never contains input values.

    • retryable
      false
      required

      Whether repeating the same request may succeed.

    • data
      object
      required

      No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

429

RATE_LIMITED: The request rate limit was exceeded. Try again later.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    object
    required

    The request rate limit was exceeded. Try again later.

    • code
      RATE_LIMITED
      required

      The failure code, stable across releases.

    • message
      string
      required

      What went wrong, for people; it never contains input values.

    • retryable
      true
      required

      Whether repeating the same request may succeed.

    • data
      object
      required

      No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

500

INTERNAL_ERROR: The service could not complete the operation.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    object
    required

    The service could not complete the operation.

    • code
      INTERNAL_ERROR
      required

      The failure code, stable across releases.

    • message
      string
      required

      What went wrong, for people; it never contains input values.

    • retryable
      false
      required

      Whether repeating the same request may succeed.

    • data
      object
      required

      No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

502

  • OUTCOME_UNKNOWN: The operation may have been applied; check its result before repeating it.
  • PROVIDER_PROTOCOL_CHANGED: The provider returned an unrecognized response.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    required

    One of the following:

    • OutcomeUnknownFailure
      OUTCOME_UNKNOWN
      • code
        OUTCOME_UNKNOWN
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

    • ProviderProtocolChangedFailure
      PROVIDER_PROTOCOL_CHANGED
      • code
        PROVIDER_PROTOCOL_CHANGED
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        false
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

503

  • UPSTREAM_UNAVAILABLE: The upstream service could not complete the request.
  • INDEX_NOT_READY: The connection's service index is being built. Try again shortly.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    required

    One of the following:

    • UpstreamUnavailableFailure
      UPSTREAM_UNAVAILABLE
      • code
        UPSTREAM_UNAVAILABLE
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        true
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

    • OficlinicIndexNotReadyFailure
      INDEX_NOT_READY
      • code
        INDEX_NOT_READY
        required

        The failure code, stable across releases.

      • message
        string
        required

        What went wrong, for people; it never contains input values.

      • retryable
        true
        required

        Whether repeating the same request may succeed.

      • data
        object
        required

        No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

504

UPSTREAM_TIMEOUT: The upstream service did not respond before its deadline.
JSON
  • success
    false
    required
  • data
    unknown
    required
  • error
    object
    required

    The upstream service did not respond before its deadline.

    • code
      UPSTREAM_TIMEOUT
      required

      The failure code, stable across releases.

    • message
      string
      required

      What went wrong, for people; it never contains input values.

    • retryable
      true
      required

      Whether repeating the same request may succeed.

    • data
      object
      required

      No fields.

  • metadata
    object
    required

    What every answer carries besides its data or error.

    • requestId
      string
      required

      Request correlation identifier, also sent as X-Request-Id.

Escribe para buscar…

↑↓ navegar↵ seleccionarEsc cerrar