> ## Documentation Index
> Fetch the complete documentation index at: https://loyalty-interchange.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Adjust accrual after refund, void, or correction



## OpenAPI

````yaml /api-reference/openapi.yaml post /orders/adjust
openapi: 3.1.2
info:
  title: Loyalty Interchange Protocol
  version: 0.1.0
  description: Vendor-neutral loyalty transaction API with the foodservice/1.0 profile.
  license:
    name: Apache-2.0
    identifier: Apache-2.0
servers:
  - url: https://loyalty.example.com/lip/v1
security:
  - bearerAuth: []
tags:
  - name: Discovery
  - name: Programs
  - name: Accounts
  - name: Ledger
  - name: Members
  - name: Orders
  - name: Accruals
  - name: Redemptions
  - name: Issued Rewards
paths:
  /orders/adjust:
    post:
      tags:
        - Orders
      summary: Adjust accrual after refund, void, or correction
      operationId: adjustOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderAdjustmentRequest'
      responses:
        '201':
          description: Adjust accrual after refund, void, or correction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerResponse'
        default:
          $ref: '#/components/responses/Problem'
components:
  schemas:
    OrderAdjustmentRequest:
      title: OrderAdjustmentRequest
      additionalProperties: false
      type: object
      required:
        - context
        - member_id
        - program_id
        - adjustment
      properties:
        context:
          additionalProperties: false
          type: object
          required:
            - protocol_version
            - profile
            - request_id
            - idempotency_key
            - occurred_at
            - source
          properties:
            protocol_version:
              const: '1.0'
              type: string
            profile:
              const: foodservice/1.0
              type: string
            request_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            idempotency_key:
              minLength: 8
              maxLength: 255
              type: string
            occurred_at:
              format: date-time
              type: string
            source:
              additionalProperties: false
              type: object
              required:
                - system
              properties:
                system:
                  minLength: 1
                  maxLength: 128
                  pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                  description: Opaque, stable identifier within the owning system.
                  type: string
                instance:
                  minLength: 1
                  maxLength: 128
                  pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                  description: Opaque, stable identifier within the owning system.
                  type: string
        member_id:
          minLength: 1
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
          description: Opaque, stable identifier within the owning system.
          type: string
        program_id:
          minLength: 1
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
          description: Opaque, stable identifier within the owning system.
          type: string
        adjustment:
          additionalProperties: false
          type: object
          required:
            - adjustment_id
            - original_order_id
            - type
            - reason
            - occurred_at
            - order_total_delta
            - eligible_spend_delta
          properties:
            adjustment_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            original_order_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            type:
              anyOf:
                - const: partial_refund
                  type: string
                - const: full_refund
                  type: string
                - const: void
                  type: string
                - const: correction
                  type: string
            reason:
              minLength: 1
              maxLength: 255
              type: string
            occurred_at:
              format: date-time
              type: string
            order_total_delta:
              additionalProperties: false
              type: object
              required:
                - amount
                - currency
              properties:
                amount:
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                  description: Signed amount in the currency's minor unit.
                  type: integer
                currency:
                  pattern: ^[A-Z]{3}$
                  type: string
            eligible_spend_delta:
              additionalProperties: false
              type: object
              required:
                - amount
                - currency
              properties:
                amount:
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                  description: Signed amount in the currency's minor unit.
                  type: integer
                currency:
                  pattern: ^[A-Z]{3}$
                  type: string
            lines:
              minItems: 1
              type: array
              items:
                additionalProperties: false
                type: object
                required:
                  - line_id
                  - quantity_delta
                  - subtotal_delta
                properties:
                  line_id:
                    minLength: 1
                    maxLength: 128
                    pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                    description: Opaque, stable identifier within the owning system.
                    type: string
                  quantity_delta:
                    type: integer
                  subtotal_delta:
                    additionalProperties: false
                    type: object
                    required:
                      - amount
                      - currency
                    properties:
                      amount:
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: Signed amount in the currency's minor unit.
                        type: integer
                      currency:
                        pattern: ^[A-Z]{3}$
                        type: string
    LedgerResponse:
      title: LedgerResponse
      additionalProperties: false
      type: object
      required:
        - context
        - entry
        - balances
      properties:
        context:
          additionalProperties: false
          type: object
          required:
            - protocol_version
            - profile
            - request_id
            - processed_at
          properties:
            protocol_version:
              const: '1.0'
              type: string
            profile:
              const: foodservice/1.0
              type: string
            request_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: >-
                Echoes the request's request_id. On an idempotent replay it
                echoes the replaying request's request_id, not the original.
              type: string
            processed_at:
              format: date-time
              type: string
        entry:
          additionalProperties: false
          type: object
          required:
            - entry_id
            - member_id
            - program_id
            - account_id
            - operation
            - unit
            - amount
            - occurred_at
          properties:
            entry_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            member_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            program_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            account_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            operation:
              anyOf:
                - const: accrual
                  type: string
                - const: redemption
                  type: string
                - const: reversal
                  type: string
                - const: adjustment
                  type: string
                - const: expiration
                  type: string
                - const: manual
                  type: string
            unit:
              anyOf:
                - const: points
                  type: string
                - const: visits
                  type: string
                - const: stamps
                  type: string
                - const: credits
                  type: string
                - const: custom
                  type: string
            amount:
              type: integer
            occurred_at:
              format: date-time
              type: string
            expires_at:
              format: date-time
              type: string
            related_entry_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            order_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            location_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            adjustment_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            reservation_id:
              minLength: 1
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
              description: Opaque, stable identifier within the owning system.
              type: string
            classification:
              anyOf:
                - const: bonus
                  type: string
                - const: gift
                  type: string
                - const: migration
                  type: string
                - const: service_recovery
                  type: string
                - const: correction
                  type: string
            reason:
              minLength: 1
              maxLength: 255
              type: string
            qualifies_for_tier:
              type: boolean
        entries:
          minItems: 1
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - entry_id
              - member_id
              - program_id
              - account_id
              - operation
              - unit
              - amount
              - occurred_at
            properties:
              entry_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              member_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              program_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              account_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              operation:
                anyOf:
                  - const: accrual
                    type: string
                  - const: redemption
                    type: string
                  - const: reversal
                    type: string
                  - const: adjustment
                    type: string
                  - const: expiration
                    type: string
                  - const: manual
                    type: string
              unit:
                anyOf:
                  - const: points
                    type: string
                  - const: visits
                    type: string
                  - const: stamps
                    type: string
                  - const: credits
                    type: string
                  - const: custom
                    type: string
              amount:
                type: integer
              occurred_at:
                format: date-time
                type: string
              expires_at:
                format: date-time
                type: string
              related_entry_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              order_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              location_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              adjustment_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              reservation_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              classification:
                anyOf:
                  - const: bonus
                    type: string
                  - const: gift
                    type: string
                  - const: migration
                    type: string
                  - const: service_recovery
                    type: string
                  - const: correction
                    type: string
              reason:
                minLength: 1
                maxLength: 255
                type: string
              qualifies_for_tier:
                type: boolean
        balances:
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - account_id
              - member_id
              - program_id
              - unit
              - amount
              - reserved
              - available
              - as_of
            properties:
              account_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              member_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              program_id:
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
                description: Opaque, stable identifier within the owning system.
                type: string
              unit:
                anyOf:
                  - const: points
                    type: string
                  - const: visits
                    type: string
                  - const: stamps
                    type: string
                  - const: credits
                    type: string
                  - const: custom
                    type: string
              unit_label:
                minLength: 1
                maxLength: 64
                type: string
              amount:
                type: integer
              reserved:
                minimum: 0
                type: integer
              available:
                type: integer
              as_of:
                format: date-time
                type: string
    ProblemDetails:
      title: ProblemDetails
      additionalProperties: true
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          format: uri-reference
          type: string
        title:
          minLength: 1
          type: string
        status:
          minimum: 400
          maximum: 599
          type: integer
        detail:
          type: string
        instance:
          format: uri-reference
          type: string
        code:
          minLength: 1
          maxLength: 128
          type: string
        errors:
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - path
              - message
            properties:
              path:
                type: string
              message:
                type: string
  responses:
    Problem:
      description: RFC 9457 problem details
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````