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

# Apply a partial update to a card's spending constraint

> Apply a partial update to a card's spending constraint while preserving current properties applied. Properties set to "null" will be removed from the spending constraint.



## OpenAPI

````yaml patch /card/{cardId}/spending-constraint
openapi: 3.1.0
info:
  title: Slash Public API
  description: API description
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.slash.com
    description: production
security:
  - api_key: []
  - partner_api_key: []
  - bearer: []
  - developer_application: []
paths:
  /card/{cardId}/spending-constraint:
    parameters:
      - name: cardId
        in: path
        schema:
          type: string
        required: true
    patch:
      description: >-
        Apply a partial update to a card's spending constraint while preserving
        current properties applied. Properties set to "null" will be removed
        from the spending constraint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartialSpendingConstraint'
              x-entrypoint:
                virtualPath: schemas/PartialSpendingConstraint
                sourcePath: schemas/PartialSpendingConstraint.yaml
                title: PartialSpendingConstraint
                origin: ./src/publicApi
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendingConstraint'
                x-entrypoint:
                  virtualPath: schemas/SpendingConstraint
                  sourcePath: schemas/SpendingConstraint.yaml
                  title: SpendingConstraint
                  origin: ./src/publicApi
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: TooManyRequests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - api_key: []
        - bearer: []
components:
  schemas:
    PartialSpendingConstraint:
      type: object
      description: >-
        A partial spending constraint update that can be applied to a
        CardGroupSpendingRule
      properties:
        merchantCategoryRule:
          type: object
          nullable: true
          properties:
            merchantCategories:
              type: array
              items:
                type: string
            restriction:
              $ref: '#/components/schemas/Restriction'
              x-entrypoint:
                virtualPath: schemas/Restriction
                sourcePath: schemas/Restriction.yaml
                title: Restriction
                origin: ./src/publicApi
        merchantRule:
          type: object
          nullable: true
          properties:
            merchants:
              type: array
              items:
                type: string
            restriction:
              $ref: '#/components/schemas/Restriction'
              x-entrypoint:
                virtualPath: schemas/Restriction
                sourcePath: schemas/Restriction.yaml
                title: Restriction
                origin: ./src/publicApi
        spendingRule:
          type: object
          nullable: true
          properties:
            utilizationLimit:
              type: object
              properties:
                timezone:
                  type: string
                  description: >-
                    IANA timezone string. Limits always reset at midnight of the
                    timezone specified. If no timezone is specified, then UTC
                    time is used.
                limitAmount:
                  $ref: '#/components/schemas/Money'
                  x-entrypoint:
                    virtualPath: schemas/Money
                    sourcePath: schemas/Money.yaml
                    title: Money
                    origin: ./src/publicApi
                preset:
                  type: string
                  enum:
                    - daily
                    - weekly
                    - monthly
                    - yearly
                    - collective
                startDate:
                  type: string
                  description: >-
                    Format ISO-8601. A day that equals today or the past. This
                    is optional.If the `preset` is "daily", this value is
                    ignored. If the `preset` is "weekly", "monthly" or "yearly",
                    then the this value is used to compute when the limit should
                    start limit.
            utilizationLimitV2:
              type: array
              items:
                type: object
                properties:
                  timezone:
                    type: string
                    description: >-
                      IANA timezone string. Limits always reset at midnight of
                      the timezone specified. If no timezone is specified, then
                      UTC time is used.
                  limitAmount:
                    $ref: '#/components/schemas/Money'
                    x-entrypoint:
                      virtualPath: schemas/Money
                      sourcePath: schemas/Money.yaml
                      title: Money
                      origin: ./src/publicApi
                  preset:
                    type: string
                    enum:
                      - daily
                      - weekly
                      - monthly
                      - yearly
                      - collective
                  startDate:
                    type: string
                    description: >-
                      Format ISO-8601. A day that equals today or the past. This
                      is optional.If the `preset` is "daily", this value is
                      ignored. If the `preset` is "weekly", "monthly" or
                      "yearly", then the this value is used to compute when the
                      limit should start limit.
            transactionSizeLimit:
              type: object
              properties:
                minimum:
                  $ref: '#/components/schemas/Money'
                  x-entrypoint:
                    virtualPath: schemas/Money
                    sourcePath: schemas/Money.yaml
                    title: Money
                    origin: ./src/publicApi
                maximum:
                  $ref: '#/components/schemas/Money'
                  x-entrypoint:
                    virtualPath: schemas/Money
                    sourcePath: schemas/Money.yaml
                    title: Money
                    origin: ./src/publicApi
        countryRule:
          type: object
          nullable: true
          properties:
            countries:
              description: A 2 digit country code
              type: array
              items:
                type: string
            restriction:
              $ref: '#/components/schemas/Restriction'
              x-entrypoint:
                virtualPath: schemas/Restriction
                sourcePath: schemas/Restriction.yaml
                title: Restriction
                origin: ./src/publicApi
        merchantCategoryCodeRule:
          type: object
          nullable: true
          properties:
            merchantCategoryCodes:
              type: array
              items:
                type: string
            restriction:
              $ref: '#/components/schemas/Restriction'
              x-entrypoint:
                virtualPath: schemas/Restriction
                sourcePath: schemas/Restriction.yaml
                title: Restriction
                origin: ./src/publicApi
      x-entrypoint:
        virtualPath: schemas/PartialSpendingConstraint
        sourcePath: schemas/PartialSpendingConstraint.yaml
        title: PartialSpendingConstraint
        origin: ./src/publicApi
      title: PartialSpendingConstraint
    SpendingConstraint:
      type: object
      description: A constraint that can be applied to a CardGroupSpendingRule
      properties:
        merchantCategoryRule:
          type: object
          nullable: true
          properties:
            merchantCategories:
              type: array
              items:
                type: string
            restriction:
              $ref: '#/components/schemas/Restriction'
              x-entrypoint:
                virtualPath: schemas/Restriction
                sourcePath: schemas/Restriction.yaml
                title: Restriction
                origin: ./src/publicApi
          required:
            - merchantCategories
            - restriction
        merchantRule:
          type: object
          nullable: true
          properties:
            merchants:
              type: array
              items:
                type: string
            restriction:
              $ref: '#/components/schemas/Restriction'
              x-entrypoint:
                virtualPath: schemas/Restriction
                sourcePath: schemas/Restriction.yaml
                title: Restriction
                origin: ./src/publicApi
          required:
            - merchants
            - restriction
        spendingRule:
          type: object
          nullable: true
          properties:
            utilizationLimit:
              type: object
              properties:
                timezone:
                  type: string
                  description: >-
                    IANA timezone string. Limits always reset at midnight of the
                    timezone specified. If no timezone is specified, then UTC
                    time is used.
                limitAmount:
                  $ref: '#/components/schemas/Money'
                  x-entrypoint:
                    virtualPath: schemas/Money
                    sourcePath: schemas/Money.yaml
                    title: Money
                    origin: ./src/publicApi
                preset:
                  type: string
                  enum:
                    - daily
                    - weekly
                    - monthly
                    - yearly
                    - collective
                startDate:
                  type: string
                  description: >-
                    Format ISO-8601. A day that equals today or the past. This
                    is optional.If the `preset` is "daily", this value is
                    ignored. If the `preset` is "weekly", "monthly" or "yearly",
                    then the this value is used to compute when the limit should
                    start limit.
              required:
                - limitAmount
                - preset
            utilizationLimitV2:
              type: array
              items:
                type: object
                properties:
                  timezone:
                    type: string
                    description: >-
                      IANA timezone string. Limits always reset at midnight of
                      the timezone specified. If no timezone is specified, then
                      UTC time is used.
                  limitAmount:
                    $ref: '#/components/schemas/Money'
                    x-entrypoint:
                      virtualPath: schemas/Money
                      sourcePath: schemas/Money.yaml
                      title: Money
                      origin: ./src/publicApi
                  preset:
                    type: string
                    enum:
                      - daily
                      - weekly
                      - monthly
                      - yearly
                      - collective
                  startDate:
                    type: string
                    description: >-
                      Format ISO-8601. A day that equals today or the past. This
                      is optional.If the `preset` is "daily", this value is
                      ignored. If the `preset` is "weekly", "monthly" or
                      "yearly", then the this value is used to compute when the
                      limit should start limit.
                required:
                  - limitAmount
                  - preset
            transactionSizeLimit:
              type: object
              properties:
                minimum:
                  $ref: '#/components/schemas/Money'
                  x-entrypoint:
                    virtualPath: schemas/Money
                    sourcePath: schemas/Money.yaml
                    title: Money
                    origin: ./src/publicApi
                maximum:
                  $ref: '#/components/schemas/Money'
                  x-entrypoint:
                    virtualPath: schemas/Money
                    sourcePath: schemas/Money.yaml
                    title: Money
                    origin: ./src/publicApi
        countryRule:
          type: object
          nullable: true
          properties:
            countries:
              description: A 2 digit country code
              type: array
              items:
                type: string
            restriction:
              $ref: '#/components/schemas/Restriction'
              x-entrypoint:
                virtualPath: schemas/Restriction
                sourcePath: schemas/Restriction.yaml
                title: Restriction
                origin: ./src/publicApi
          required:
            - countries
            - restriction
        merchantCategoryCodeRule:
          type: object
          nullable: true
          properties:
            merchantCategoryCodes:
              type: array
              items:
                type: string
            restriction:
              $ref: '#/components/schemas/Restriction'
              x-entrypoint:
                virtualPath: schemas/Restriction
                sourcePath: schemas/Restriction.yaml
                title: Restriction
                origin: ./src/publicApi
          required:
            - merchantCategoryCodes
            - restriction
      x-entrypoint:
        virtualPath: schemas/SpendingConstraint
        sourcePath: schemas/SpendingConstraint.yaml
        title: SpendingConstraint
        origin: ./src/publicApi
      title: SpendingConstraint
    Error:
      type: object
      properties:
        message:
          type: string
        name:
          type: string
        identifier:
          type: string
        rawStatus:
          type: number
        meta:
          type: object
          additionalProperties: true
      required:
        - message
        - name
        - identifier
        - rawStatus
      x-entrypoint:
        origin: ./src/publicApi
        sourcePath: ./src/publicApi/main.yaml
        title: Error
        virtualPath: components/Error
      title: Error
    Restriction:
      type: string
      enum:
        - allowlist
        - blacklist
      x-entrypoint:
        virtualPath: schemas/Restriction
        sourcePath: schemas/Restriction.yaml
        title: Restriction
        origin: ./src/publicApi
      title: Restriction
    Money:
      type: object
      description: Represents a monetary value
      properties:
        amountCents:
          type: integer
          description: The amount in cents
      required:
        - amountCents
      x-entrypoint:
        virtualPath: schemas/Money
        sourcePath: schemas/Money.yaml
        title: Money
        origin: ./src/publicApi
      title: Money
  securitySchemes:
    api_key:
      type: apiKey
      description: |
        API key authentication for public API requests.

        Keys come in two flavors:

        - *Legal-entity-scoped keys* are pinned to a single legal entity.
          Minted via the dashboard under a specific entity; every request
          acts on that entity.
        - *User-scoped keys* are pinned to a user and span every legal
          entity that user has access to. Every request made with a
          user-scoped key (except `GET /legal-entity`, which lists the
          legal entities the user can access) must include an
          `x-legal-entity` header naming the legal entity the request is
          operating on. Requests without the header are rejected with
          `400`. The authenticated user must have an active permission
          role on the supplied legal entity, otherwise the request is
          rejected with `403`.
      name: X-API-Key
      in: header
    partner_api_key:
      type: apiKey
      description: |
        Partner-program API key authentication.

        Keys are minted in the partner dashboard (Developers → API Keys),
        are scoped to a single partner program, and are prefixed with
        `sk_partner_`. Partner keys are only accepted by routes that
        declare this scheme; they are rejected by `api_key` routes and
        vice versa.
      name: X-API-Key
      in: header
    bearer:
      type: http
      scheme: bearer
    developer_application:
      type: http
      scheme: basic

````