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

# Upsert the tenant's receipt request configs for every country at once

> **Scopes:** `tenant:update`



## OpenAPI

````yaml /api-reference/openapi.json patch /v0/tenant/rules/receipts
openapi: 3.1.0
info:
  title: Asset API
  version: '0.1'
servers:
  - url: https://api.sandbox.getasset.com
    description: Sandbox
  - url: https://api.getasset.com
    description: Production
security: []
paths:
  /v0/tenant/rules/receipts:
    patch:
      tags:
        - Tenant
      summary: Upsert the tenant's receipt request configs for every country at once
      description: '**Scopes:** `tenant:update`'
      operationId: upsert_receipt_request_configs_v0_tenant_rules_receipts_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReceiptRequestConfigsRequest'
            example:
              configs:
                CA:
                  is_enabled: true
                  threshold_amount: 30
                US:
                  is_enabled: true
                  threshold_amount: 75
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  $ref: '#/components/schemas/ReceiptRequestConfigSettings-Output'
                propertyNames:
                  $ref: '#/components/schemas/BusinessCountry'
                type: object
                title: >-
                  Response Upsert Receipt Request Configs V0 Tenant Rules
                  Receipts Patch
              example:
                data:
                  CA:
                    is_enabled: true
                    threshold_amount: 30
                  US:
                    is_enabled: true
                    threshold_amount: 75
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - OAuth2PasswordBearer:
            - tenant:update
components:
  schemas:
    ReceiptRequestConfigsRequest:
      properties:
        configs:
          additionalProperties:
            $ref: '#/components/schemas/ReceiptRequestConfigSettings-Input'
          propertyNames:
            $ref: '#/components/schemas/BusinessCountry'
          type: object
          minProperties: 1
          title: Configs
          description: Per-country settings, keyed by country.
          examples:
            - US:
                is_enabled: true
                threshold_amount: 75
      type: object
      required:
        - configs
      title: ReceiptRequestConfigsRequest
      description: >-
        The tenant's receipt request configs, keyed by country. Used to create
        the

        full set at once, and to update every country at once. The map keys make
        the

        countries unique and validate that each is a real country.
    ReceiptRequestConfigSettings-Output:
      properties:
        is_enabled:
          type: boolean
          title: Is Enabled
          description: Whether receipt requests are enabled for this country
          default: true
        threshold_amount:
          type: number
          title: Threshold Amount
          description: >-
            Request a receipt for spend at or above this amount. 0 means request
            for every spend while enabled.
          default: 0
          examples:
            - 75
      type: object
      title: ReceiptRequestConfigSettings
      description: |-
        One country's receipt request settings. Serves as both the request value
        and the response value; the country is the map key, not a field here.
    ErrorResponse:
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: A description of the error
        data:
          title: Data
          description: Data associated with the error
      type: object
      required:
        - error
        - data
      title: ErrorResponse
    ReceiptRequestConfigSettings-Input:
      properties:
        is_enabled:
          type: boolean
          title: Is Enabled
          description: Whether receipt requests are enabled for this country
          default: true
        threshold_amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Threshold Amount
          description: >-
            Request a receipt for spend at or above this amount. 0 means request
            for every spend while enabled.
          default: '0'
          examples:
            - 75
      type: object
      title: ReceiptRequestConfigSettings
      description: |-
        One country's receipt request settings. Serves as both the request value
        and the response value; the country is the map key, not a field here.
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /v0/auth/token

````