> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sibipro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update offer buyout amount

> Updates the buyout amount on an offer. The offer must be in "pending" or "awaiting_customer" status.



## OpenAPI

````yaml https://api.sibipro.com/offers/openapi.json post /{id}/buyout
openapi: 3.0.0
info:
  title: Offers API
  version: 1.0.0
  description: RESTful API for managing offers
servers:
  - url: https://api.sibipro.com/prod/offers
    description: API endpoint
security: []
paths:
  /{id}/buyout:
    post:
      summary: Update offer buyout amount
      description: >-
        Updates the buyout amount on an offer. The offer must be in "pending" or
        "awaiting_customer" status.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the offer to update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOfferBuyoutRequest'
      responses:
        '200':
          description: Offer buyout amount updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateOfferBuyoutResponse'
        '400':
          description: Bad request - Offer buyout could not be updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                offerBuyoutUpdateNotAllowed:
                  value:
                    code: OFFER_BUYOUT_UPDATE_NOT_ALLOWED
                    message: >-
                      Offer buyout cannot be updated because it is in "canceled"
                      status
                updateBuyoutAmountError:
                  value:
                    code: UPDATE_BUYOUT_AMOUNT_ERROR
                    message: Failed to update offer buyout amount
        '401':
          description: Unauthorized - Missing or invalid authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    code: UNAUTHORIZED
                    message: Missing authentication token
        '403':
          description: >-
            Forbidden - Caller can view this offer but is not allowed to update
            it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                permissionDenied:
                  value:
                    code: FORBIDDEN
                    message: User does not have permission to update this offer
        '404':
          description: Not found - Offer does not exist or caller is not allowed to view it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  value:
                    code: OFFER_NOT_FOUND
                    message: Offer not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                serverError:
                  value:
                    code: INTERNAL_SERVER_ERROR
                    message: An unexpected error occurred
components:
  schemas:
    UpdateOfferBuyoutRequest:
      type: object
      properties:
        buyoutAmount:
          type: number
          minimum: 0
          description: >-
            Buyout amount in cents (e.g., 50000 = $500.00). Customer can opt to
            receive this amount instead of a replacement product.
          example: 50000
      required:
        - buyoutAmount
    UpdateOfferBuyoutResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the offer buyout amount was updated successfully
          example: true
        buyoutAmount:
          type: number
          minimum: 0
          description: >-
            The buyout amount in cents that was persisted on the offer, read
            back after the update.
          example: 50000
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the offer buyout amount was updated
          example: '2024-01-20T12:00:00Z'
      required:
        - success
        - buyoutAmount
        - updatedAt
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code indicating the type of error
        message:
          type: string
          description: Human-readable error message explaining what went wrong
          example: The request contains invalid parameters
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              error:
                type: string
            required:
              - field
              - error
          description: Detailed validation errors when applicable
          example:
            - field: customer.email
              error: Invalid email
            - field: address.postalCode
              error: Invalid
      required:
        - code
        - message

````