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

# Upsert Expense Spending Cap

> Creates or updates an org spending cap by type, amount, category and contributor type.

Not available to API keys yet. It will need `expenses:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/upsert-expense-spending-cap
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/upsert-expense-spending-cap:
    post:
      operationId: upsertExpenseSpendingCap
      summary: Upsert Expense Spending Cap
      description: >-
        Creates or updates an org spending cap by type, amount, category and
        contributor type.


        Not available to API keys yet. It will need `expenses:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertExpenseSpendingCapRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpsertExpenseSpendingCapResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    UpsertExpenseSpendingCapRequest:
      type: object
      properties:
        capID:
          type: string
          format: uuid
        hrisExpenseCategoryID:
          type:
            - string
            - 'null'
          format: uuid
        capType:
          type: string
          enum:
            - PER_EXPENSE
            - MONTHLY_PER_SUBMITTER
            - MONTHLY_PER_CATEGORY_PER_SUBMITTER
        maxAmount:
          oneOf:
            - type: string
              minLength: 1
            - {}
            - type: number
          description: >-
            NOTE(ck): z.instanceof(Decimal) has no contract form; TGA still
            checks it
        contributorType:
          type:
            - string
            - 'null'
          enum:
            - EMPLOYEE
            - CONTRACTOR
            - null
      required:
        - capType
        - maxAmount
    UpsertExpenseSpendingCapResponse:
      type: object
      properties:
        capID:
          type: string
          format: uuid
      required:
        - capID
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
