Skip to content
Navigation

Propose the settlement of a component period

Computes the settlement of one component's whole period of an approved contract version, in any payment mode, with the arithmetic the settlement applies. Capitation: the price per member for the period times the member-days of the component's current, eligible coverages (under any version of the contract that keeps the component's key), over the days of the period; with a pricing another person confirmed (listCapitationPricing), each month's covered days are priced by the tariff the payer's listing in force that day matches, on the pricing's day basis (proposal.basis.priced), and a pricing nobody confirmed yet is the note pricing_unconfirmed. PGP: the agreed value; a per-member PGP is paid its period's population times the value per member, and the difference is one adjustment. The approved technical notes that bind the component give that value when they pay per member (paymentBasis: fixed_per_member): what their priced lines are worth over the period, each day at the newest note in force, ÷ the people each is priced for (valuePerMemberFromNotes); otherwise send valuePerMemberMinor. Fee for service: the invoices of the period's services minus what the objections take. Each confirmed clause that moves money is one more adjustment; unconfirmed ones are only shown. A band clause reads what the line-execution worker measured over the period's months for the notes that bind the component (execution, when every month was measured through its end; else executionGap says why not), each line against its own note's bands, whatever other PGP components the version has; a note that binds two of them cannot be split between them and leaves the period unmeasured (shared_note): below its lower band it loses what it misses of the band and above its upper band the payer recognizes what it executes beyond it, as the clause says, at the note's prices; a line never makes up for another, and bands for monitoring move nothing. A per-member PGP is paid for the people its coverages hold in the period, which the payer's population file derives, unless population says otherwise. A population clause of a global PGP reads that same paid population against the population the value is priced for; a per-member PGP already pays it, so the clause moves nothing there. The payer's SA55 objections that name a PGP period as the one they adjust (recordObjection, adjusts) are one adjustment each, for what they take as their course stands; the band clause (SA5502) and the population clause that lowers the value (SA5501) of that period then move no money, so the deviation counts once, and what the objections take beyond them is flagged. The cut is complete once the period has ended in the contract's time zone. Use it at the end of each period: review the proposal and its notes (lines not invoiced, open objections, unconfirmed clauses, an unmeasured execution, bands for monitoring), correct what is wrong saying why in methodology, then send settlement with an id and a requestKey to createContractSettlement; another person accepts it with acceptContractSettlement. Nothing is written here except the audit of the read. Returns the proposal, the proposed total against the period's payments (those naming its component, whatever their dates in it, and those naming none with exactly its dates), the manifest it comes from (its SHA-256 is the cut's manifest and every adjustment's evidence), and the settlement body, with the close it must supersede. Requires ambar:contracts:read and ambar:settlements:read and a read grant on the contract. INVALID_INPUT: malformed identifiers, population without a value per member (the notes' or valuePerMemberMinor), either for a component that is not PGP, or values out of range; fix them. NOT_FOUND: the version or the component is not this contract's. CONFLICT: the version is not approved, a payment, an invoice line or a binding note of the period is in another currency, or valuePerMemberMinor is not the value the notes give, or an SA55 objection adjusts a component whose currency or precision is not its invoice's; read the version, the period or the notes. RESOURCE_LIMIT_EXCEEDED: the contract holds more than 2,000 SA55 objections. INVOICE_COMPONENT_AMBIGUOUS (409): lines have no routed payer and the version has several fee-for-service components. error.details.lineIds lists at most 100 unique line identifiers in lexical order; route them before retrying. Only the selected component's lines and their objections enter its proposal. A version's sole fee-for-service component also includes genuinely unrouted lines. ACCESS_DENIED: missing scope or grant; do not retry.

GET
https://api-ambar.getarbol.com/v1/contract-settlements/propose

Authorization

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

Query parameters

  • contractId
    string
    required

    The contract.

  • versionId
    string
    required

    The approved version that holds the component.

  • componentKey
    string
    required

    The component whose whole period is settled.

  • population
    optional
    integer

    A per-member PGP: the period's paid population, when it is not the people the component's coverages hold in the period.

    format: int64 · minimum: 0
  • valuePerMemberMinor
    optional
    integer

    A per-member PGP whose technical notes do not price the member: what one member pays for the period, in minor units. When the approved notes that bind the component pay per member, they give it; send none, or the same.

    format: int64

Returns

200

JSON
  • data
    object
    required

    A proposed settlement of one component period, ready for a person to review.

    • currency
      COP
      or
      PEN
      or
      MXN
      or
      CLP
      or
      BRL
      required

      The currency of every amount.

    • endsAt
      string
      required

      When the period ends in the contract's time zone; a complete cut needs it past.

      format: date-time
    • execution
      required

      One of the following:

      • PeriodExecution
        • belowMinor
          integer
          required

          What the lines below their lower band miss of it, at the notes' prices, in minor units of the settled precision, rounded once.

          format: int64
        • beyondMinor
          integer
          required

          What the lines above their upper band execute beyond it, at the notes' prices, in minor units of the settled precision, rounded once.

          format: int64
        • economic
          boolean
          required

          Whether some month's note declares its bands an economic clause: only those months count toward belowMinor and beyondMinor.

        • linesAbove
          integer
          required

          Lines that executed more than their upper band over the economic months.

          format: int32 · minimum: 0
        • linesBelow
          integer
          required

          Lines that executed less than their lower band over the economic months.

          format: int32 · minimum: 0
        • projected
          boolean
          required

          Whether a month still running counts at its pace: a preview, never a settlement.

        • complianceHundredths
          optional
          integer | null

          Σ executed ÷ Σ expected value of the priced lines the notes compare, over every month, in hundredths of a percent; null when nothing is expected.

          format: int64 · minimum: 0
      • null
    • executionGap
      required

      One of the following:

      • ExecutionGap
      • null
    • executionMeasured
      boolean
      required

      Whether the line-execution worker measured every month of the period through its end for the notes that bind the component, so execution is what the band clauses read.

    • manifest
      object
      required

      The document the cut comes from, with every clause's effect.

      • asOf
        string
        required

        When the data was read: the cut's knowledge cutoff.

        format: date-time
      • basis
        required

        What the period is settled from.

        One of the following:

        • object
          • memberDays
            integer
            required

            Covered days of every person in the period, each day counted once.

            format: int64 · minimum: 0
          • members
            integer
            required

            People with at least one covered day in the period.

            format: int64 · minimum: 0
          • mode
            capitation
            required
          • priced
            optional

            One of the following:

            • PricedDays
            • null
        • object
          • mode
            pgp
            required
          • perMember
            optional

            One of the following:

            • PerMemberPopulation
            • null
        • object
          • mode
            fee_for_service
            required
          • totals
            object
            required

            The period's invoice lines and objections, totalled.

            • expectedMinor
              integer
              required

              What the payer is expected to pay: invoicedMinor - lostObjectionsMinor.

              format: int64
            • invoicedMinor
              integer
              required

              What those lines bill once on an invoice.

              format: int64
            • lines
              integer
              required

              Lines of the period's services that still bill.

              format: int32 · minimum: 0
            • lostObjectionsMinor
              integer
              required

              What the objections take: accepted amounts, expired objections in full, what answers conceded and what conciliations left standing.

              format: int64
            • notInvoicedMinor
              integer
              required

              What those lines would bill but are not on an invoice yet.

              format: int64
            • objectionsToAnswer
              integer
              required

              Objections still waiting for the provider's answer.

              format: int32 · minimum: 0
            • openObjectionsMinor
              integer
              required

              What open objections (received, answered or escalated) still dispute.

              format: int64
      • clauseEffects
        object
        required

        What every clause of the version does to the period, confirmed or not.

        • appliedMinor
          integer
          required

          What the confirmed clauses add to the payment, in minor units.

          format: int64
        • effects
          array of
          object
          required

          One entry per clause, by position.

          • amountMinor
            integer
            required

            Signed amount the clause adds to the payment, in minor units: negative withholds or discounts.

            format: int64
          • detail
            required

            What Ambar computed.

            One of the following:

            • object
              • kind
                pay_for_results_retention
                required
              • retention
                object
                required

                Withheld, released, pending and kept.

                • atRisk
                  array of
                  string
                  required

                  The indicators putting the retention at risk: breached or not measured yet.

                • keptMinor
                  integer
                  required

                  Kept by the payer because indicators were breached.

                  format: int64
                • pendingMinor
                  integer
                  required

                  Waiting for indicators not measured yet; released if they are met.

                  format: int64
                • releasedMinor
                  integer
                  required

                  Released by met indicators.

                  format: int64
                • withheldMinor
                  integer
                  required

                  Withheld from the period's payment, in minor units.

                  format: int64
            • object
              • kind
                penalty_escalation
                required
              • penalty
                object
                required

                The listed indicators and the discount.

                • discountMinor
                  integer
                  required

                  Discounted from the period's payment, in minor units: the clause's share of each month's part of it while any listed indicator is penalized that month, else 0.

                  format: int64
                • indicators
                  array of
                  object
                  required

                  The listed indicators after the period's last month, in the clause's order.

                  • indicatorId
                    string
                    required

                    The indicator.

                  • status
                    object
                    required

                    Its status after its latest recorded month; compliant with no breaches when none is recorded.

                    • consecutiveBreaches
                      integer
                      required

                      Consecutive months the target was missed.

                      format: int32 · minimum: 0
                    • escalation
                      compliant
                      or
                      breached
                      or
                      improvement_plan
                      or
                      cure_period
                      or
                      penalty
                      or
                      termination_risk
                      required

                      Escalation state.

                  • measuredMonth
                    optional

                    One of the following:

                    • BillingMonth
                    • null
                  • next
                    optional

                    One of the following:

                    • NextEscalation
                    • null
                • penalizedMonths
                  array of
                  string
                  required

                  The months of the period with a listed indicator penalized, in order.

            • object
              • chargebacks
                object
                required

                The period's chargebacks and their leakage.

                • avoidableCount
                  integer
                  required

                  Avoidable leakage: chargebacks no site of the organization delivered whose order reached this provider first.

                  format: int32 · minimum: 0
                • avoidableMinor
                  integer
                  required

                  Their amount, in minor units.

                  format: int64
                • byProcedure
                  array of
                  object
                  required

                  Leakage by procedure, ordered by code.

                  • amountMinor
                    integer
                    required

                    Their amount, in minor units.

                    format: int64
                  • avoidable
                    integer
                    required

                    Of them, the avoidable ones: the order had reached this provider first.

                    format: int32 · minimum: 0
                  • count
                    integer
                    required

                    Chargebacks in the group.

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

                    The procedure code, or the reason why people went elsewhere (null: not explained yet).

                • byReason
                  array of
                  object
                  required

                  Leakage by reason, the unexplained ones first.

                  • amountMinor
                    integer
                    required

                    Their amount, in minor units.

                    format: int64
                  • avoidable
                    integer
                    required

                    Of them, the avoidable ones: the order had reached this provider first.

                    format: int32 · minimum: 0
                  • count
                    integer
                    required

                    Chargebacks in the group.

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

                    The procedure code, or the reason why people went elsewhere (null: not explained yet).

                • count
                  integer
                  required

                  Chargebacks counted, leakage or not.

                  format: int32 · minimum: 0
                • deliveredHere
                  object
                  required

                  The ones whose service the organization's own sites delivered: to dispute, and left out of the leakage below.

                  • amountMinor
                    integer
                    required

                    Their amount, in minor units.

                    format: int64
                  • count
                    integer
                    required

                    Chargebacks counted.

                    format: int32 · minimum: 0
                  • substitutions
                    integer
                    required

                    Of them, the ones another of the organization's sites delivered for the contract's contracted site: substitutions the contract allows.

                    format: int32 · minimum: 0
                • discountedMinor
                  integer
                  required

                  Accepted ones: what the payer discounts, in minor units.

                  format: int64
                • openMinor
                  integer
                  required

                  Reported or disputed ones, still to be decided.

                  format: int64
              • kind
                chargeback
                required
            • object
              • kind
                excluded_technologies
                required
              • label
                string
                required

                The contract's label for what is excluded.

              • procedures
                array of
                string
                required

                The excluded procedures, ordered by code: never in the fixed value, billed apart.

              • servicesApart
                integer
                required

                The period's services the router paid to a PGP or capitation component of the version with an excluded procedure: never in that value, billed apart.

                format: int32 · minimum: 0
            • object
              • band
                object
                required

                The execution against the bands.

                • aboveUpperBand
                  alert_only
                  or
                  recognize
                  required

                  What the clause does above the upper band.

                • belowLowerBand
                  discount
                  or
                  alert_only
                  required

                  What the clause does below the lower band.

                • belowMinor
                  integer
                  required

                  What those lines miss of their lower band at the note's prices, in minor units.

                  format: int64
                • beyondMinor
                  integer
                  required

                  What those lines execute beyond their upper band at the note's prices.

                  format: int64
                • linesAbove
                  integer
                  required

                  Lines that executed more than their upper band over the period.

                  format: int32 · minimum: 0
                • linesBelow
                  integer
                  required

                  Lines that executed less than their lower band over the period.

                  format: int32 · minimum: 0
                • projected
                  boolean
                  required

                  Whether a month still running counts at its pace (a preview; a settlement never projects).

                • reading
                  measured
                  or
                  not_measured
                  or
                  monitoring_only
                  required

                  What it could read.

                • complianceHundredths
                  optional
                  integer | null

                  The period's execution, Σ executed ÷ Σ expected value, in hundredths of a percent; null when not measured.

                  format: int64 · minimum: 0
              • kind
                band_adjustment
                required
            • object
              • kind
                population_adjustment
                required
              • population
                object
                required

                The population against its base.

                • basePopulation
                  integer
                  required

                  People the agreed value is priced for.

                  format: int64 · minimum: 0
                • directionApplies
                  boolean
                  required

                  Whether the clause's direction lets this deviation move the value.

                • position
                  within
                  or
                  above
                  or
                  below
                  or
                  not_measured
                  or
                  priced_per_member
                  required

                  Where the population falls.

                • deviationHundredths
                  optional
                  integer | null

                  (population − base) ÷ base, in hundredths of a percent, toward zero; null when the population was not read.

                  format: int64
                • population
                  optional
                  integer | null

                  The period's paid population; null when it was not read.

                  format: int64 · minimum: 0
            • object
              • kind
                risk_adjustment
                required
              • risk
                object
                required

                The period's risk mix against the technical note's.

                • baseWeightTenThousandths
                  integer
                  required

                  The note's average weight, in ten-thousandths, rounded once.

                  format: int64
                • directionApplies
                  boolean
                  required

                  Whether the clause's direction lets this deviation move the value.

                • groups
                  array of
                  object
                  required

                  Each group, in the clause's order.

                  • basePeople
                    integer
                    required

                    People of the note's characterized population in it.

                    format: int64 · minimum: 0
                  • label
                    string
                    required

                    How the annex names it.

                  • weightTenThousandths
                    integer
                    required

                    Its relative weight, in ten-thousandths.

                    format: int32 · minimum: 0
                  • cohortId
                    optional

                    One of the following:

                    • CohortId
                    • null
                  • people
                    optional
                    integer | null

                    People the period covers in it; null when the mix was not counted.

                    format: int64 · minimum: 0
                • position
                  within
                  or
                  heavier
                  or
                  lighter
                  or
                  not_measured
                  required

                  Where the period's mix falls.

                • deviationHundredths
                  optional
                  integer | null

                  R − 1, the risk index's deviation from the note's mix, in hundredths of a percent, toward zero; null when not measured.

                  format: int64
                • observedWeightTenThousandths
                  optional
                  integer | null

                  The period's average weight, in ten-thousandths, rounded once; null when the mix was not counted or the period covers nobody.

                  format: int64
          • movesMoney
            boolean
            required

            Whether it moves money: only a clause a second person confirmed does; otherwise it is shown and moves nothing.

          • seq
            integer
            required

            The clause's position in the version.

            format: int32 · minimum: 0
        • shownMinor
          integer
          required

          What the unconfirmed clauses would add; shown, never applied.

          format: int64
      • componentKey
        string
        required

        The component settled.

      • contractId
        string
        required

        The contract.

      • deviation
        object
        required

        The payer's SA55 objections attributed to a PGP period, as their course stood when read, and the clauses they replace.

        • beyondClausesMinor
          integer
          required

          What they take beyond what the measured clauses they replace compute, in minor units: 0 within it, or when no measured clause of their kind computes it.

          format: int64
        • lostMinor
          integer
          required

          What the objections that apply take, together, in minor units.

          format: int64
        • objections
          array of
          object
          required

          The SA55 objections attributed to the period, by arrival.

          • amountMinor
            integer
            required

            What the payer objected, in minor units.

            format: int64
          • applies
            boolean
            required

            Whether it moves the settlement: an SA5501 does not on a PGP paid per member, whose payment already is the period's population.

          • invoiceRef
            string
            required

            The invoice it objects to.

          • kind
            population
            or
            frequency
            or
            other
            required

            Which deviation it adjusts.

          • lostMinor
            integer
            required

            What it takes now, in minor units.

            format: int64
          • objectionId
            string
            required

            The objection.

          • openMinor
            integer
            required

            What it still disputes, in minor units.

            format: int64
          • reasonCode
            string
            required

            Its code, as the payer sent it.

          • receivedOn
            string
            required

            The day it arrived.

            format: date
          • state
            received
            or
            answered
            or
            accepted
            or
            rejected
            or
            expired
            or
            lapsed
            +2 more
            required

            Where its course stands.

          • objectionRef
            optional
            string | null

            The payer's record number of it.

        • openMinor
          integer
          required

          What they still dispute, in minor units.

          format: int64
        • replaced
          array of
          object
          required

          The clauses they replace, by position.

          • amountMinor
            integer
            required

            What it computes for the period, in minor units.

            format: int64
          • keptMinor
            integer
            required

            What of it the objections do not replace and still moves, in minor units: what a band clause recognizes beyond the upper band; 0 otherwise.

            format: int64
          • seq
            integer
            required

            The clause's position in the version.

            format: int32 · minimum: 0
      • executionComplianceHundredths
        integer | null
        required

        The PGP execution over the period, Σ executed ÷ Σ expected value of its notes' lines, in hundredths of a percent; null when not measured. The band clauses read each line against its own note's bands (clauseEffects).

        format: int64 · minimum: 0
      • paymentBeforeClausesMinor
        integer
        required

        The period's payment before the clauses, in minor units.

        format: int64
      • periodEnd
        string
        required

        The day after the last day of the period.

        format: date
      • periodStart
        string
        required

        First day of the period.

        format: date
      • valuePerMemberFromNotes
        boolean
        required

        Whether the value per member is what the approved technical notes that bind the component give, rather than a figure sent with the request.

      • versionId
        string
        required

        The approved version applied.

    • mode
      pgp
      or
      capitation
      or
      fee_for_service
      required

      The component's payment mode.

    • payments
      object
      required

      The proposed total against the payments received for exactly the period.

      • differenceMinor
        integer
        required

        paidMinor - expectedMinor; negative when underpaid.

        format: int64
      • expectedMinor
        integer
        required

        What Ambar expects, in minor units.

        format: int64
      • paidMinor
        integer
        required

        Sum of the live payments of the period, in minor units.

        format: int64
      • payments
        integer
        required

        Live payments counted.

        format: int32 · minimum: 0
      • status
        matches
        or
        underpaid
        or
        overpaid
        or
        not_paid
        required

        How they compare.

    • periodEnd
      string
      required

      The day after the last day of the period.

      format: date
    • periodStart
      string
      required

      First day of the period.

      format: date
    • proposal
      object
      required

      The proposal: its basis, the payment before clauses, the adjustments, the settlement's arithmetic, whether the cut is complete, and what to check.

      • adjustments
        array of
        object
        required

        The adjustments proposed: the per-member population first, then by clause, then the SA55 objections by arrival, then the fee-for-service ceiling.

        • amountMinor
          integer
          required

          Signed amount added to the total, in minor units.

          format: int64
        • clauseReference
          string
          required

          The contract clause behind it: the clause's source passage, or the component's clause for the per-member population.

        • key
          string
          required

          Its key in the settlement: per-member-population, clause-<seq>, objection-<id> for an SA55 objection, or component-ceiling.

        • label
          string
          required

          What it is.

        • clauseSeq
          optional
          integer | null

          The version clause it comes from; null for the per-member population, an objection and the ceiling.

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

          The payer's SA55 objection it comes from; null for the others.

      • basis
        required

        What the period is settled from.

        One of the following:

        • object
          • memberDays
            integer
            required

            Covered days of every person in the period, each day counted once.

            format: int64 · minimum: 0
          • members
            integer
            required

            People with at least one covered day in the period.

            format: int64 · minimum: 0
          • mode
            capitation
            required
          • priced
            optional

            One of the following:

            • PricedDays
            • null
        • object
          • mode
            pgp
            required
          • perMember
            optional

            One of the following:

            • PerMemberPopulation
            • null
        • object
          • mode
            fee_for_service
            required
          • totals
            object
            required

            The period's invoice lines and objections, totalled.

            • expectedMinor
              integer
              required

              What the payer is expected to pay: invoicedMinor - lostObjectionsMinor.

              format: int64
            • invoicedMinor
              integer
              required

              What those lines bill once on an invoice.

              format: int64
            • lines
              integer
              required

              Lines of the period's services that still bill.

              format: int32 · minimum: 0
            • lostObjectionsMinor
              integer
              required

              What the objections take: accepted amounts, expired objections in full, what answers conceded and what conciliations left standing.

              format: int64
            • notInvoicedMinor
              integer
              required

              What those lines would bill but are not on an invoice yet.

              format: int64
            • objectionsToAnswer
              integer
              required

              Objections still waiting for the provider's answer.

              format: int32 · minimum: 0
            • openObjectionsMinor
              integer
              required

              What open objections (received, answered or escalated) still dispute.

              format: int64
      • calculation
        object
        required

        The settlement's arithmetic over the proposed cut and adjustments.

        • adjustmentTotalMinor
          string
          required

          Sum of all adjustment amounts.

        • baseNumeratorMinor
          string
          required

          PGP: amountMinor. Capitation: amountMinor × memberDays. Fee for service: invoicedMinor − lostObjectionsMinor.

        • denominator
          string
          required

          Capitation: number of days in the component period. PGP and fee for service: "1".

        • roundingStage
          string
          required

          Where rounding happens; currently component_total.

        • roundingTie
          string
          required

          How exact halves round; currently half_away_from_zero.

        • totalMinor
          string
          required

          Settled total in minor units: totalNumeratorMinor / denominator, rounded once.

        • totalNumeratorMinor
          string
          required

          baseNumeratorMinor + adjustmentTotalMinor × denominator, before rounding.

        • version
          string
          required

          Calculation version; currently contract-period-exact-v1.

      • complete
        boolean
        required

        Whether the cut covers the whole period, so the settlement is a draft that can be accepted.

      • deviation
        object
        required

        The SA55 objections attributed to the period and the clauses they replace.

        • beyondClausesMinor
          integer
          required

          What they take beyond what the measured clauses they replace compute, in minor units: 0 within it, or when no measured clause of their kind computes it.

          format: int64
        • lostMinor
          integer
          required

          What the objections that apply take, together, in minor units.

          format: int64
        • objections
          array of
          object
          required

          The SA55 objections attributed to the period, by arrival.

          • amountMinor
            integer
            required

            What the payer objected, in minor units.

            format: int64
          • applies
            boolean
            required

            Whether it moves the settlement: an SA5501 does not on a PGP paid per member, whose payment already is the period's population.

          • invoiceRef
            string
            required

            The invoice it objects to.

          • kind
            population
            or
            frequency
            or
            other
            required

            Which deviation it adjusts.

          • lostMinor
            integer
            required

            What it takes now, in minor units.

            format: int64
          • objectionId
            string
            required

            The objection.

          • openMinor
            integer
            required

            What it still disputes, in minor units.

            format: int64
          • reasonCode
            string
            required

            Its code, as the payer sent it.

          • receivedOn
            string
            required

            The day it arrived.

            format: date
          • state
            received
            or
            answered
            or
            accepted
            or
            rejected
            or
            expired
            or
            lapsed
            +2 more
            required

            Where its course stands.

          • objectionRef
            optional
            string | null

            The payer's record number of it.

        • openMinor
          integer
          required

          What they still dispute, in minor units.

          format: int64
        • replaced
          array of
          object
          required

          The clauses they replace, by position.

          • amountMinor
            integer
            required

            What it computes for the period, in minor units.

            format: int64
          • keptMinor
            integer
            required

            What of it the objections do not replace and still moves, in minor units: what a band clause recognizes beyond the upper band; 0 otherwise.

            format: int64
          • seq
            integer
            required

            The clause's position in the version.

            format: int32 · minimum: 0
      • notes
        array of
        required

        What a person should check before creating the settlement.

        One of the following:

        • object
          • code
            period_open
            required
        • object
          • code
            no_member_days
            required
        • object
          • amountMinor
            integer
            required

            What they would bill, in minor units.

            format: int64
          • code
            lines_not_invoiced
            required
        • object
          • amountMinor
            integer
            required

            What they put at risk, in minor units.

            format: int64
          • code
            objections_open
            required
          • toAnswer
            integer
            required

            How many still wait for the provider's answer.

            format: int32 · minimum: 0
        • object
          • amountMinor
            integer
            required

            What they would add, in minor units.

            format: int64
          • code
            unconfirmed_clauses
            required
        • object
          • code
            execution_not_measured
            required
        • object
          • code
            bands_for_monitoring
            required
        • object
          • code
            population_not_read
            required
        • object
          • code
            pricing_unconfirmed
            required
        • object
          • code
            risk_mix_not_read
            required
        • object
          • amountMinor
            integer
            required

            What the objections replace of them together, in minor units.

            format: int64
          • code
            clauses_replaced_by_objections
            required
          • seqs
            array of
            integer
            required

            The clauses' positions.

            format: int32 · minimum: 0
        • object
          • amountMinor
            integer
            required

            What they still dispute, in minor units.

            format: int64
          • code
            deviation_objections_open
            required
          • count
            integer
            required

            How many are open.

            format: int32 · minimum: 0
        • object
          • code
            deviation_beyond_clauses
            required
          • excessMinor
            integer
            required

            The excess, in minor units.

            format: int64
        • object
          • code
            deviation_objections_unattributed
            required
          • count
            integer
            required

            How many.

            format: int32 · minimum: 0
        • object
          • amountMinor
            integer
            required

            What they take, in minor units.

            format: int64
          • code
            objections_for_other_periods
            required
        • object
          • code
            ceiling_reached
            required
          • excessMinor
            integer
            required

            What passes the ceiling, in minor units.

            format: int64
      • paymentBeforeClausesMinor
        integer
        required

        The period's payment before the clauses, in minor units: what the clauses apply to.

        format: int64
    • settlement
      object
      required

      What to send to createContractSettlement.

      • adjustments
        array of
        object
        required

        The proposed adjustments, each backed by the manifest.

        • amountMinor
          string
          required

          Signed integer string in minor units, up to 15 digits (e.g. -1500); -0 is invalid.

        • clauseReference
          string
          required

          Contract clause that allows the adjustment (1 to 512 characters).

        • evidence
          object
          required

          Document that supports the adjustment.

          • reference
            string
            required

            artifact:<id> for a file uploaded with reserveContractArtifact (it must be ready and match sha256), or any other reference: 1 to 512 characters, trimmed, without control characters.

          • sha256
            string
            required

            SHA-256 of the document bytes: 64 lowercase hexadecimal characters.

        • key
          string
          required

          Adjustment identifier, unique within the settlement (^[a-z][a-z0-9_-]{0,127}$).

        • label
          string
          required

          Display label (1 to 160 characters, trimmed, no control characters).

      • componentKey
        string
        required

        The component settled.

      • contractId
        string
        required

        The contract.

      • inputCut
        object
        required

        The proposed input cut.

        • complete
          boolean
          required

          true when the cut covers the whole period; false gives a not_evaluable settlement.

        • knowledgeCutoff
          string
          required

          When the source data was cut: RFC 3339 timestamp with offset, not in the future. A complete capitation or fee-for-service cut may not be earlier than the period end in the contract time zone.

        • manifest
          object
          required

          Document that lists the source data of the cut.

          • reference
            string
            required

            artifact:<id> for a file uploaded with reserveContractArtifact (it must be ready and match sha256), or any other reference: 1 to 512 characters, trimmed, without control characters.

          • sha256
            string
            required

            SHA-256 of the document bytes: 64 lowercase hexadecimal characters.

        • methodology
          string
          required

          How the figures were produced (1 to 512 characters, trimmed, no control characters).

        • dayBasis
          optional

          One of the following:

          • DayBasis
          • null
        • denominatorDefinition
          optional
          string | null

          Capitation: must equal the component's denominatorDefinition. Otherwise null.

        • denominatorVersion
          optional
          string | null

          Capitation: must equal the component's denominatorVersion. Otherwise null.

        • invoicedMinor
          optional
          string | null

          Fee for service: what the invoices of the period's services bill (integer string in minor units, up to 15 digits); null when unknown, which gives not_evaluable. PGP and capitation: must be null.

        • lostObjectionsMinor
          optional
          string | null

          Fee for service: what the payer's objections take from those invoices (accepted amounts, and expired objections in full), at most invoicedMinor; present exactly when invoicedMinor is.

        • memberDays
          optional
          string | null

          Capitation: member-days in the period (integer string, up to 12 digits); null when unknown, which gives not_evaluable. PGP and fee for service: must be null.

        • tariffDays
          optional
          array | null

          Capitation with a confirmed pricing, when memberDays is given: the covered calendar days each tariff prices in each month of the period (tariffKey null for the component's own price), each month and tariff once, adding up to memberDays; at most 1,000 entries. Otherwise null.

      • supersedesId
        string | null
        required

        The accepted close in force for the period, which the new settlement amends; null for the period's first settlement.

      • versionId
        string
        required

        The approved version applied.

  • 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.

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