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

# Replace the primary/fallback routing policy for one approval kind (admins only)



## OpenAPI

````yaml /openapi/storefront.yaml put /api/v2/storefront/approval-routing/{kind}
openapi: 3.1.0
info:
  title: Semicola Exchange storefront API
  version: 2.0.0
  description: >-
    Seller (storefront) endpoints: storefront setup, inventory sources,
    products, AI Business Rules, playbook, demand inbox, proposals, approvals
    and seller reporting.
servers:
  - url: https://api.semicola.com
security:
  - bearerAuth: []
  - sessionCookie: []
tags:
  - name: Storefront
  - name: Inventory Sources
  - name: Products
  - name: Business Rules
  - name: Playbook
  - name: Library
  - name: Demand Inbox
  - name: Proposals
  - name: Approvals
  - name: Creative Reviews
  - name: Media Buys
  - name: Buyers
  - name: Reporting
  - name: Activity
  - name: Test Runs
paths:
  /api/v2/storefront/approval-routing/{kind}:
    put:
      tags:
        - Approvals
      summary: >-
        Replace the primary/fallback routing policy for one approval kind
        (admins only)
      operationId: putStorefrontApprovalRoutingByKind
      parameters:
        - name: kind
          in: path
          required: true
          schema:
            type: string
            enum:
              - MEDIA_BUY
              - CREATIVE_REVIEW
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                primaryUserIds:
                  default: []
                  maxItems: 25
                  type: array
                  items:
                    type: string
                fallbackUserIds:
                  default: []
                  maxItems: 25
                  type: array
                  items:
                    type: string
                primaryRoleKeys:
                  default: []
                  maxItems: 4
                  type: array
                  items:
                    type: string
                    enum:
                      - ADMIN
                      - PREMIUM
                      - BASIC
                fallbackRoleKeys:
                  default: []
                  maxItems: 4
                  type: array
                  items:
                    type: string
                    enum:
                      - ADMIN
                      - PREMIUM
                      - BASIC
                primaryChannels:
                  minItems: 1
                  maxItems: 3
                  type: array
                  items:
                    type: string
                    enum:
                      - in_app
                      - email
                fallbackChannels:
                  minItems: 1
                  maxItems: 3
                  type: array
                  items:
                    type: string
                    enum:
                      - in_app
                      - email
                reminderAfterMinutes:
                  type: integer
                  minimum: 5
                  maximum: 43200
                escalateAfterMinutes:
                  type: integer
                  minimum: 10
                  maximum: 86400
              required:
                - primaryChannels
                - fallbackChannels
                - reminderAfterMinutes
                - escalateAfterMinutes
              additionalProperties: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    anyOf:
                      - type: object
                        properties:
                          policies:
                            type: array
                            items:
                              type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - MEDIA_BUY
                                    - CREATIVE_REVIEW
                                primaryUserIds:
                                  type: array
                                  items:
                                    type: string
                                fallbackUserIds:
                                  type: array
                                  items:
                                    type: string
                                primaryRoleKeys:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - ADMIN
                                      - PREMIUM
                                      - BASIC
                                fallbackRoleKeys:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - ADMIN
                                      - PREMIUM
                                      - BASIC
                                primaryChannels:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - in_app
                                      - email
                                fallbackChannels:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - in_app
                                      - email
                                reminderAfterMinutes:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                escalateAfterMinutes:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                version:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                configured:
                                  type: boolean
                                updatedAt:
                                  anyOf:
                                    - type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                    - type: 'null'
                              required:
                                - kind
                                - primaryUserIds
                                - fallbackUserIds
                                - primaryRoleKeys
                                - fallbackRoleKeys
                                - primaryChannels
                                - fallbackChannels
                                - reminderAfterMinutes
                                - escalateAfterMinutes
                                - version
                                - configured
                                - updatedAt
                              additionalProperties: false
                          eligibleUsers:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                email:
                                  type: string
                                name:
                                  type:
                                    - string
                                    - 'null'
                                permissionLevel:
                                  type: string
                                  enum:
                                    - ADMIN
                                    - PREMIUM
                                    - BASIC
                              required:
                                - id
                                - email
                                - name
                                - permissionLevel
                              additionalProperties: false
                          eligibleRoles:
                            type: array
                            items:
                              type: object
                              properties:
                                key:
                                  type: string
                                  enum:
                                    - ADMIN
                                    - PREMIUM
                                    - BASIC
                                label:
                                  type: string
                                activeUserCount:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                              required:
                                - key
                                - label
                                - activeUserCount
                              additionalProperties: false
                          canManage:
                            type: boolean
                        required:
                          - policies
                          - eligibleUsers
                          - eligibleRoles
                          - canManage
                        additionalProperties: false
                      - type: 'null'
                  error:
                    anyOf:
                      - type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                          field:
                            type: string
                          details: {}
                        required:
                          - code
                          - message
                        additionalProperties: false
                      - type: 'null'
                required:
                  - data
                  - error
                additionalProperties: false
        default:
          description: >-
            Error envelope `{data: null, error: {code, message, field?,
            details?}}`.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or OAuth access token.
    sessionCookie:
      type: apiKey
      in: cookie
      name: sc_session

````