Skip to content
Navigation

Record patient interaction evidence

Append documented interaction evidence for a patient: report or decide on an alert, or record a message, call, rights check or participation decision (content.kind). Content is stored encrypted; nothing is sent to anyone. Create with expectedVersion "0". Only open alerts accept later versions (alert_decision with the alert's current version). Rights and participation need expectedCurrentId; the latest negative one blocks contact under the contract. Returns the stored interaction. Idempotency: the same requestKey with the same input returns the original result; a different input with that key fails with IDEMPOTENCY_CONFLICT. CONFLICT: stale expectedVersion or expectedCurrentId, an id already in use, a closed alert, or a decision not allowed (escalation not higher, record_management without topic, full history). INVALID_INPUT: malformed content, a time in the future, or a missing contractId. ACCESS_DENIED: missing scope (alerts and calls need ambar:patients:review; closing an alert also needs an approve grant) or patient not covered by contractId; do not retry. COMMIT_UNCERTAIN: retry with the same requestKey and input to learn the outcome.

POST
https://api-ambar.getarbol.com/v1/patient-interactions/record

Authorization

  • bearer_auth
    HTTP Bearer (JWT)
    required
    Authorization: Bearer <token>

Request body JSON required

  • content
    required

    What to record. Its JSON form must not exceed 65,536 bytes.

    One of the following:

    • object
      • data
        object
        required

        Report a new alert (expectedVersion "0"); needs contractId.

        • reason
          string
          required

          Why the alert is raised, 10 to 4,000 characters, trimmed, no control characters.

        • severity
          follow_up
          or
          priority
          or
          immediate
          required

          Initial severity.

        • reportEvidence
          optional

          One of the following:

          • PatientAlertReportEvidence
          • null
        • topic
          optional

          One of the following:

          • AlertTopic
          • null
      • kind
        alert_report
        required
    • object
      • data
        object
        required

        Decide on an open alert; expectedVersion is the alert's current version.

        • action
          escalate
          or
          close
          or
          record_management
          required

          Decision to take.

        • reason
          string
          required

          Why, 10 to 4,000 characters, trimmed, no control characters.

        • management
          optional

          One of the following:

          • AlertManagement
          • null
        • severity
          optional

          One of the following:

          • AlertSeverity
          • null
      • kind
        alert_decision
        required
    • object
      • data
        object
        required

        Record message evidence as a new record.

        • direction
          inbound
          or
          outbound
          required

          Inbound or outbound.

        • occurredAt
          string
          required

          When the message happened (RFC 3339); not in the future.

        • recipient
          string
          required

          Recipient address or name, 1 to 320 characters.

        • sender
          string
          required

          Sender address or name, 1 to 320 characters.

        • sourceReference
          string
          required

          Reference to the source system record, 3 to 2,000 characters.

        • status
          received
          or
          sending
          or
          sent
          or
          delivered
          or
          deferred
          or
          bounced
          +4 more
          required

          Status reported by the source.

        • subject
          string
          required

          Subject, 1 to 500 characters.

        • text
          string
          required

          Message text, 1 to 4,000 characters.

      • kind
        message
        required
    • object
      • data
        object
        required

        Record call evidence as a new record.

        • sourceReference
          string
          required

          Reference to the source system record, 3 to 2,000 characters.

        • status
          not_started
          or
          open
          or
          closed
          required

          Transcript state.

        • turns
          array of
          object
          required

          Transcript turns, at most 50.

          • at
            integer
            required

            When the turn happened, Unix epoch milliseconds; positive and not in the future.

            format: int64
          • kind
            agent
            or
            person
            or
            step
            required

            Who produced the turn.

          • text
            string
            required

            Turn text, 1 to 2,000 characters, trimmed, no control characters.

          • ok
            optional
            boolean | null

            Whether the turn succeeded, as reported by the source; null when not reported.

        • durationSeconds
          optional
          integer | null

          Duration in seconds, 0 to 86,400; null when unknown.

          format: int32 · minimum: 0
        • ending
          optional
          string | null

          How the call ended, 1 to 500 characters; null when unknown.

        • sentiment
          optional

          One of the following:

          • TranscriptSentiment
          • null
        • startedAt
          optional
          integer | null

          When the call started, Unix epoch milliseconds; positive, not in the future, or null.

          format: int64
        • summary
          optional
          string | null

          Summary, 1 to 2,000 characters; null when none.

      • kind
        call
        required
    • object
      • data
        object
        required

        Record a rights check as a new record; needs contractId and expectedCurrentId.

        • checkedAt
          string
          required

          When the rights were checked (RFC 3339); not in the future.

        • source
          string
          required

          Name of the source checked, 3 to 200 characters, trimmed, no control characters.

        • sourceKind
          portal
          or
          affiliation_change
          required

          Kind of source.

        • status
          active
          or
          inactive
          or
          unknown
          required

          Result of the check.

        • validUntil
          optional
          string | null

          When the check stops being valid (RFC 3339), after checkedAt; null for no expiry. After it passes, contact under the contract is blocked until a new check.

      • kind
        rights
        required
    • object
      • data
        object
        required

        Record a participation decision as a new record; needs contractId and expectedCurrentId.

        • reason
          participation_accepted
          or
          patient_declined
          or
          specialist_referral
          or
          palliative_care
          or
          diagnosis_ruled_out
          or
          contract_transfer
          +2 more
          required

          Reason for the decision; it determines the participation status.

      • kind
        participation
        required
  • expectedVersion
    string
    required

    "0" to create; for an alert decision, the alert's current version.

  • id
    string
    required

    Interaction identifier; choose a new one to create (^[a-z][a-z0-9_-]{0,127}$).

  • patientId
    string
    required

    Patient identifier (canonical lowercase UUID).

  • requestKey
    string
    required

    Idempotency key: 32 lowercase hexadecimal characters, scoped to the calling user.

  • contractId
    optional
    string | null

    Contract the interaction belongs to; required for alerts, rights and participation. The patient must be covered by it. null for a message or call without a contract.

  • expectedCurrentId
    optional
    string | null

    Rights and participation only: id of the latest record of that family for this patient and contract, or null when there is none. Ignored for other families.

Returns

200

JSON
  • data
    object
    required

    The latest version of a documented patient interaction.

    • authorId
      string
      required

      Opaque actor identifier of the person who recorded this version.

    • content
      required

      Decrypted content.

      One of the following:

      • object
        • data
          object
          required

          Current state of an alert, including its history.

          • history
            array of
            object
            required

            Steps in order, starting with the report. At 20 entries no further decision is accepted.

            • action
              string
              required

              report, escalate, close or record_management.

            • at
              integer
              required

              When the step was recorded, Unix epoch milliseconds.

              format: int64
            • reason
              string
              required

              Reason given for this step.

            • severity
              follow_up
              or
              priority
              or
              immediate
              required

              Alert severity after this step.

            • subject
              string
              required

              User subject of the person who took this step.

            • management
              optional

              One of the following:

              • AlertManagement
              • null
          • reason
            string
            required

            Reason given in the original report.

          • severity
            follow_up
            or
            priority
            or
            immediate
            required

            Current severity.

          • status
            open
            or
            closed
            required

            open or closed.

          • reportEvidence
            optional

            One of the following:

            • PatientAlertReportEvidence
            • null
          • topic
            optional

            One of the following:

            • AlertTopic
            • null
        • kind
          alert
          required
      • object
        • data
          object
          required

          Message evidence.

          • direction
            inbound
            or
            outbound
            required

            Inbound or outbound.

          • occurredAt
            string
            required

            When the message happened (RFC 3339); not in the future.

          • recipient
            string
            required

            Recipient address or name, 1 to 320 characters.

          • sender
            string
            required

            Sender address or name, 1 to 320 characters.

          • sourceReference
            string
            required

            Reference to the source system record, 3 to 2,000 characters.

          • status
            received
            or
            sending
            or
            sent
            or
            delivered
            or
            deferred
            or
            bounced
            +4 more
            required

            Status reported by the source.

          • subject
            string
            required

            Subject, 1 to 500 characters.

          • text
            string
            required

            Message text, 1 to 4,000 characters.

        • kind
          message
          required
      • object
        • data
          object
          required

          Call evidence.

          • sourceReference
            string
            required

            Reference to the source system record, 3 to 2,000 characters.

          • status
            not_started
            or
            open
            or
            closed
            required

            Transcript state.

          • turns
            array of
            object
            required

            Transcript turns, at most 50.

            • at
              integer
              required

              When the turn happened, Unix epoch milliseconds; positive and not in the future.

              format: int64
            • kind
              agent
              or
              person
              or
              step
              required

              Who produced the turn.

            • text
              string
              required

              Turn text, 1 to 2,000 characters, trimmed, no control characters.

            • ok
              optional
              boolean | null

              Whether the turn succeeded, as reported by the source; null when not reported.

          • durationSeconds
            optional
            integer | null

            Duration in seconds, 0 to 86,400; null when unknown.

            format: int32 · minimum: 0
          • ending
            optional
            string | null

            How the call ended, 1 to 500 characters; null when unknown.

          • sentiment
            optional

            One of the following:

            • TranscriptSentiment
            • null
          • startedAt
            optional
            integer | null

            When the call started, Unix epoch milliseconds; positive, not in the future, or null.

            format: int64
          • summary
            optional
            string | null

            Summary, 1 to 2,000 characters; null when none.

        • kind
          call
          required
      • object
        • data
          object
          required

          Rights check.

          • checkedAt
            string
            required

            When the rights were checked (RFC 3339); not in the future.

          • source
            string
            required

            Name of the source checked, 3 to 200 characters, trimmed, no control characters.

          • sourceKind
            portal
            or
            affiliation_change
            required

            Kind of source.

          • status
            active
            or
            inactive
            or
            unknown
            required

            Result of the check.

          • validUntil
            optional
            string | null

            When the check stops being valid (RFC 3339), after checkedAt; null for no expiry. After it passes, contact under the contract is blocked until a new check.

        • kind
          rights
          required
      • object
        • data
          object
          required

          Participation decision.

          • reason
            participation_accepted
            or
            patient_declined
            or
            specialist_referral
            or
            palliative_care
            or
            diagnosis_ruled_out
            or
            contract_transfer
            +2 more
            required

            Reason for the decision; it determines the participation status.

        • kind
          participation
          required
    • createdAt
      string
      required

      When the interaction was first recorded (RFC 3339).

    • family
      alert
      or
      message
      or
      call
      or
      rights
      or
      participation
      required

      Kind of interaction.

    • id
      string
      required

      Interaction identifier.

    • patientId
      string
      required

      Patient identifier (canonical lowercase UUID).

    • recordedAt
      string
      required

      When this version was recorded (RFC 3339).

    • version
      string
      required

      Version (decimal string); alerts gain one per decision, other records stay at "1".

    • contractId
      optional
      string | null

      Contract the interaction belongs to; null when it has none.

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    true
    required

    Always true in a success envelope.

400

Failure. The error.code is one of:

  • INVALID_INPUT: Do not retry unchanged. Fix the request against the operation's schema.
  • USER_PAYMENT_REFUSED: Check the collection basis and caps in details.paymentProblem before recording the payment.
  • INVALID_INVENTORY: Do not retry unchanged. Fix the request against the operation's schema.
  • ANALYTICS_QUERY_REJECTED: Rewrite the query as one read-only statement over the published catalog.
  • MINOR_UNIT_SCALE_MISMATCH: Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

401

Failure. The error.code is one of:

  • UNAUTHORIZED: Obtain a fresh access token and repeat the request.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

403

Failure. The error.code is one of:

  • ACCESS_DENIED: Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
  • MODULE_DISABLED: Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

404

Failure. The error.code is one of:

  • NOT_FOUND: Check the identifier. The record may not exist or may not be visible to this actor.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

409

Failure. The error.code is one of:

  • CONFLICT: Read the current state with the matching get operation, then decide again.
  • IDEMPOTENCY_CONFLICT: The requestKey was already used for a different request. Use a new key for a new action.
  • TRANSACTION_ABORTED: Nothing was written. Retry the same request.
  • INVENTORY_INTEGRITY_CONFLICT: Do not retry. Report the integrity failure to an operator.
  • TEAM_PRIOR_UNRESOLVED: Reconcile the earlier team command (see details.commandId) before a new change.
  • COHORT_ACTIVE_REQUIRED: Read the current state with the matching get operation, then decide again.
  • COHORT_CUT_CHANGED: Restart the paginated read from the first page.
  • COHORT_READ_REQUIRES_ACTIVE: Read the current state with the matching get operation, then decide again.
  • COHORT_CUT_NEEDS_RECONCILIATION: Read the current state with the matching get operation, then decide again.
  • PROGRAM_NEW_ASSESSMENT_REQUIRED: Read the current state with the matching get operation, then decide again.
  • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED: Read the current state with the matching get operation, then decide again.
  • INVOICE_COMPONENT_AMBIGUOUS: Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
  • SITE_SUBSTITUTION_REFUSED: Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

413

Failure. The error.code is one of:

  • BODY_TOO_LARGE: Send a smaller body, or split the content into several requests.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

422

Failure. The error.code is one of:

  • RESOURCE_LIMIT_EXCEEDED: Do not retry. Reduce the request or archive records first.
  • MODULE_NOT_CONTRACTED: Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
  • MODULE_REQUIREMENT_MISSING: Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
  • CAPABILITY_NOT_CONFIGURED: Do not retry. The capability is not enabled for this organization.
  • INSTALLATION_NOT_READY: Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
  • EVIDENCE_NOT_READABLE: Leave the evidence pending until its source content is readable.
  • ANALYTICS_QUERY_LIMIT: Narrow the query (filters, columns or range) and retry.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

500

Failure. The error.code is one of:

  • INVALID_CONFIGURATION: Retry once later; if it persists, report the requestId to support.
  • INTERNAL: Retry once later; if it persists, report the requestId to support.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

503

Failure. The error.code is one of:

  • AUTHENTICATION_UNAVAILABLE: Retry later with backoff; for a write, reuse the same requestKey.
  • COMMIT_UNCERTAIN: The write may have happened. Repeat it with the same requestKey or read the record first.
  • DATABASE_UNAVAILABLE: Retry later with backoff; for a write, reuse the same requestKey.
  • PIPELINE_UNAVAILABLE: The write may have happened. Repeat it with the same requestKey or read the record first.
  • ASSISTANT_UNAVAILABLE: Do not retry. The capability is not enabled for this organization.
  • SERVICE_BUSY: Retry later with backoff; for a write, reuse the same requestKey.
JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

default

JSON
  • error
    object
    required

    The stable failure code, its message and optional details.

    • code
      UNAUTHORIZED
      or
      AUTHENTICATION_UNAVAILABLE
      or
      ACCESS_DENIED
      or
      MODULE_DISABLED
      or
      INVALID_INPUT
      or
      USER_PAYMENT_REFUSED
      +33 more
      required

      Stable failure code. Branch on this value, never on message.

      • UNAUTHORIZED (HTTP 401): A valid access token is required. Obtain a fresh access token and repeat the request.
      • AUTHENTICATION_UNAVAILABLE (HTTP 503): Identity verification is temporarily unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • ACCESS_DENIED (HTTP 403): Access denied. Do not retry. The signed-in actor lacks this purpose or grant; ask an administrator.
      • MODULE_DISABLED (HTTP 403): This operation belongs to a module the organization does not use. Do not retry. The organization does not use the module in details.module (getSession lists the ones it uses); an administrator turns it on with setOrganizationModules.
      • INVALID_INPUT (HTTP 400): The request does not match the documented contract. Do not retry unchanged. Fix the request against the operation's schema.
      • USER_PAYMENT_REFUSED (HTTP 400): The collection exceeds the applicable payment rules. Check the collection basis and caps in details.paymentProblem before recording the payment.
      • INVALID_INVENTORY (HTTP 400): The content does not match the selected inventory contract. Do not retry unchanged. Fix the request against the operation's schema.
      • ANALYTICS_QUERY_REJECTED (HTTP 400): Use one read-only query over the admitted catalog and its supported functions. Rewrite the query as one read-only statement over the published catalog.
      • BODY_TOO_LARGE (HTTP 413): The request body exceeds the supported limit. Send a smaller body, or split the content into several requests.
      • NOT_FOUND (HTTP 404): The resource does not exist. Check the identifier. The record may not exist or may not be visible to this actor.
      • METHOD_NOT_ALLOWED (HTTP 405): The method is not supported for this resource. Use the HTTP method documented for this path.
      • CONFLICT (HTTP 409): The resource conflicts with its current state. Read the current state with the matching get operation, then decide again.
      • IDEMPOTENCY_CONFLICT (HTTP 409): The command key already identifies a different request. The requestKey was already used for a different request. Use a new key for a new action.
      • TRANSACTION_ABORTED (HTTP 409): The transaction rolled back without committing changes. Nothing was written. Retry the same request.
      • INVENTORY_INTEGRITY_CONFLICT (HTTP 409): The current build failed integrity verification. Do not retry. Report the integrity failure to an operator.
      • TEAM_PRIOR_UNRESOLVED (HTTP 409): Reconcile the existing team command before preparing another change. Reconcile the earlier team command (see details.commandId) before a new change.
      • COHORT_ACTIVE_REQUIRED (HTTP 409): Only an active cohort can create a new candidate snapshot. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_CHANGED (HTTP 409): The current cohort cut changed. Restart this read from the first page. Restart the paginated read from the first page.
      • COHORT_READ_REQUIRES_ACTIVE (HTTP 409): Only an active cohort has a current care-facts view. Read the current state with the matching get operation, then decide again.
      • COHORT_CUT_NEEDS_RECONCILIATION (HTTP 409): The cohort cut needs reconciliation before its care facts can be read. Read the current state with the matching get operation, then decide again.
      • PROGRAM_NEW_ASSESSMENT_REQUIRED (HTTP 409): Select a new eligible assessment recorded after the last participation change. Read the current state with the matching get operation, then decide again.
      • CONTRACT_CLOSED_WINDOW_CHANGE_UNSUPPORTED (HTTP 409): The proposed terms change component identities already fixed by an accepted close. Read the current state with the matching get operation, then decide again.
      • MINOR_UNIT_SCALE_MISMATCH (HTTP 400): A component's money is not in the minor units of its currency (ISO 4217). Write each component's money in the minor units of its currency (minorUnitScale 2 for COP, PEN, MXN and BRL; 0 for CLP) and propose again.
      • INVOICE_COMPONENT_AMBIGUOUS (HTTP 409): Invoice lines have no unique fee-for-service component. Route the lines in details.lineIds to their paying component, then request the proposal again. At most 100 identifiers are returned.
      • SITE_SUBSTITUTION_REFUSED (HTTP 409): The contract does not let this site serve for the contracted site as booked. Book at the contracted site, or at a site its contract lets serve for it on the appointment's day (listContractSites), recording what details.reason says is missing: the patient's acceptance or the payer's authorization.
      • RESOURCE_LIMIT_EXCEEDED (HTTP 422): This resource has reached its supported capacity. Do not retry. Reduce the request or archive records first.
      • MODULE_NOT_CONTRACTED (HTTP 422): The organization did not contract this module. Leave the module in details.module off: the organization did not contract it. Árbol adds it to the contract when the organization buys it.
      • MODULE_REQUIREMENT_MISSING (HTTP 422): This module needs one of the modules it requires to be on. Turn on, in the same request, one of the modules the module in details.module requires (getOrganizationModules lists them).
      • CAPABILITY_NOT_CONFIGURED (HTTP 422): This operation requires its governed native implementation before it can be activated. Do not retry. The capability is not enabled for this organization.
      • INSTALLATION_NOT_READY (HTTP 422): The installation cannot be activated: its app version is not certified or a credential its app declares is missing. Do not retry unchanged. Wait for a certified app version, record examples that cover every operation and change of a custom-http installation, or add the missing credentials to the deployment, then activate again.
      • EVIDENCE_NOT_READABLE (HTTP 422): Accepting evidence requires readable content and independent reporter provenance. Leave it pending until its source is readable. Leave the evidence pending until its source content is readable.
      • ANALYTICS_QUERY_LIMIT (HTTP 422): The query exceeded its bounded work, memory or output budget. Narrow the query. Narrow the query (filters, columns or range) and retry.
      • COMMIT_UNCERTAIN (HTTP 503): The commit outcome is unknown. Reconcile before retrying. The write may have happened. Repeat it with the same requestKey or read the record first.
      • DATABASE_UNAVAILABLE (HTTP 503): The database is unavailable. Retry later with backoff; for a write, reuse the same requestKey.
      • PIPELINE_UNAVAILABLE (HTTP 503): The pipeline is unavailable. Reconcile using the same request key. The write may have happened. Repeat it with the same requestKey or read the record first.
      • ASSISTANT_UNAVAILABLE (HTTP 503): The assistant is not available for this workspace. Do not retry. The capability is not enabled for this organization.
      • SERVICE_BUSY (HTTP 503): The service is handling its current request limit. Retry later with backoff; for a write, reuse the same requestKey.
      • INVALID_CONFIGURATION (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
      • INTERNAL (HTTP 500): The request could not be completed. Retry once later; if it persists, report the requestId to support.
    • message
      string
      required

      Fixed English explanation for people; it may change without notice.

    • details
      optional
      object

      Extra data for the codes that need it; absent for every other code.

      • commandId
        optional
        string

        Identifier (tcm_ prefix) of the earlier team command to reconcile before retrying.

      • lineIds
        optional
        array of
        string

        Unassigned invoice lines that prevent a unique component proposal; at most 100.

      • module
        optional
        pgp
        or
        capitation
        or
        fee_for_service
        or
        results_payment
        or
        service_record
        or
        cac
        +11 more

        The module the failure is about, for example agenda.

      • paymentProblem
        optional
        rules_unavailable
        or
        not_collectable
        or
        not_for_this_person
        or
        basis_incomplete
        or
        moderator_fee_value
        or
        service_value_unavailable
        +3 more

        Why the collection was refused.

      • reason
        optional
        not_contracted
        or
        not_a_substitute
        or
        patient_acceptance_missing
        or
        payer_authorization_missing

        Why the booking's site was refused: not_contracted (the contracted site is not one of the contract that day), not_a_substitute (no substitution in force that day lets the site serve for it), patient_acceptance_missing or payer_authorization_missing (the substitution asks for them).

  • metadata
    object
    required

    Request metadata, including the request identifier.

    • requestId
      string
      required

      Server-assigned request identifier (opaque). Quote it when reporting a problem.

  • success
    false
    required

    Always false in a failure envelope.

Escribe para buscar…

↑↓ navegar↵ seleccionarEsc cerrar