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

# Update collection redirect settings



## OpenAPI

````yaml patch /v1/collections/{id}
openapi: 3.1.0
info:
  title: One of None API
  version: 1.0.0
  description: >-
    The One of None API manages product collections, registrations, short URLs,
    team operations, and rewards used by storefront integrations including
    Shopify discounts and redemption flows.
servers:
  - url: https://api.oneofnone.io
security:
  - ApiKeyAuth: []
paths:
  /v1/collections/{id}:
    patch:
      summary: Update collection redirect settings
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCollectionBody'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionResponse'
        '400':
          description: Invalid request body or redirect rules
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateCollectionBody:
      type: object
      properties:
        redirect_conditions:
          $ref: '#/components/schemas/RedirectConditions'
        redirect_type:
          type: string
          enum:
            - url
            - layout
        redirect_url:
          type:
            - string
            - 'null'
        layout_id:
          type:
            - string
            - 'null'
          format: uuid
        app_id:
          type:
            - integer
            - 'null'
          exclusiveMinimum: 0
      additionalProperties: false
    CollectionResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        type:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        quantity:
          type:
            - number
            - 'null'
        status:
          type: string
        slug:
          type: string
        keywords: {}
        redirect_type:
          type:
            - string
            - 'null'
        redirect_url:
          type:
            - string
            - 'null'
        layout_id:
          type:
            - string
            - 'null'
          format: uuid
        app_id:
          type:
            - integer
            - 'null'
        redirect_conditions:
          $ref: '#/components/schemas/RedirectConditions'
        registration_form_id:
          type:
            - string
            - 'null'
          format: uuid
        registration_settings:
          type:
            - object
            - 'null'
          additionalProperties: {}
        activity_settings:
          type:
            - object
            - 'null'
          additionalProperties: {}
        image:
          type:
            - object
            - 'null'
          properties:
            url:
              type:
                - string
                - 'null'
        video:
          type:
            - object
            - 'null'
          properties:
            url:
              type:
                - string
                - 'null'
            poster_url:
              type:
                - string
                - 'null'
        share_image:
          type:
            - object
            - 'null'
          properties:
            url:
              type:
                - string
                - 'null'
        gallery:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              url:
                type:
                  - string
                  - 'null'
              file_type:
                type:
                  - string
                  - 'null'
              poster_url:
                type:
                  - string
                  - 'null'
              order:
                type:
                  - number
                  - 'null'
              tags: {}
              variants: {}
        product_name_template:
          type:
            - string
            - 'null'
        retail_settings:
          type:
            - object
            - 'null'
          additionalProperties: {}
        launch_date:
          type:
            - string
            - 'null'
        attributes: {}
        variants: {}
        created_at:
          type: string
        updated_at:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - status
        - slug
        - created_at
      additionalProperties: {}
    GenericErrorResponse:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        details:
          type: object
          additionalProperties: {}
      required:
        - message
        - code
      additionalProperties: {}
    RedirectConditions:
      type:
        - array
        - 'null'
      items:
        $ref: '#/components/schemas/RedirectRule'
    RedirectRule:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        title:
          type: string
        conditions:
          $ref: '#/components/schemas/RedirectConditionGroup'
        onTrue:
          $ref: '#/components/schemas/RedirectTarget'
        onFalse:
          $ref: '#/components/schemas/RedirectTarget'
      required:
        - id
        - conditions
        - onTrue
    RedirectConditionGroup:
      type: object
      properties:
        type:
          type: string
          enum:
            - group
        conjunction:
          type: string
          enum:
            - AND
            - OR
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/RedirectConditionLeaf'
      required:
        - type
        - conjunction
        - conditions
    RedirectTarget:
      oneOf:
        - $ref: '#/components/schemas/RedirectTargetRedirect'
        - $ref: '#/components/schemas/RedirectTargetRule'
        - $ref: '#/components/schemas/RedirectTargetDefault'
      discriminator:
        propertyName: type
        mapping:
          redirect:
            $ref: '#/components/schemas/RedirectTargetRedirect'
          rule:
            $ref: '#/components/schemas/RedirectTargetRule'
          default:
            $ref: '#/components/schemas/RedirectTargetDefault'
    RedirectConditionLeaf:
      oneOf:
        - $ref: '#/components/schemas/RedirectDateCondition'
        - $ref: '#/components/schemas/RedirectRegisteredCondition'
        - $ref: '#/components/schemas/RedirectRegistrationModeCondition'
        - $ref: '#/components/schemas/RedirectTokenIdCondition'
        - $ref: '#/components/schemas/RedirectLanguageCondition'
        - $ref: '#/components/schemas/RedirectDeviceTypeCondition'
        - $ref: '#/components/schemas/RedirectLocationCondition'
        - $ref: '#/components/schemas/RedirectReferrerCondition'
        - $ref: '#/components/schemas/RedirectCustomQueryParamCondition'
        - $ref: '#/components/schemas/RedirectTapCountCondition'
        - $ref: '#/components/schemas/RedirectBrowserCondition'
        - $ref: '#/components/schemas/RedirectOsCondition'
        - $ref: '#/components/schemas/RedirectCountryCondition'
      discriminator:
        propertyName: field
        mapping:
          date:
            $ref: '#/components/schemas/RedirectDateCondition'
          registered:
            $ref: '#/components/schemas/RedirectRegisteredCondition'
          registration_mode:
            $ref: '#/components/schemas/RedirectRegistrationModeCondition'
          token_id:
            $ref: '#/components/schemas/RedirectTokenIdCondition'
          language:
            $ref: '#/components/schemas/RedirectLanguageCondition'
          device_type:
            $ref: '#/components/schemas/RedirectDeviceTypeCondition'
          location:
            $ref: '#/components/schemas/RedirectLocationCondition'
          referrer:
            $ref: '#/components/schemas/RedirectReferrerCondition'
          custom_query_param:
            $ref: '#/components/schemas/RedirectCustomQueryParamCondition'
          tap_count:
            $ref: '#/components/schemas/RedirectTapCountCondition'
          browser:
            $ref: '#/components/schemas/RedirectBrowserCondition'
          os:
            $ref: '#/components/schemas/RedirectOsCondition'
          country:
            $ref: '#/components/schemas/RedirectCountryCondition'
    RedirectTargetRedirect:
      type: object
      properties:
        type:
          type: string
          enum:
            - redirect
        redirectType:
          type: string
          enum:
            - url
            - layout
        redirectUrl:
          type: string
        layoutId:
          type: string
          format: uuid
        layoutTitle:
          type: string
      required:
        - type
        - redirectType
    RedirectTargetRule:
      type: object
      properties:
        type:
          type: string
          enum:
            - rule
        ruleId:
          type: string
          minLength: 1
      required:
        - type
        - ruleId
    RedirectTargetDefault:
      type: object
      properties:
        type:
          type: string
          enum:
            - default
      required:
        - type
    RedirectDateCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - date
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: object
          properties:
            date:
              type: string
            time:
              type: object
              properties:
                hour:
                  type: integer
                  minimum: 0
                  maximum: 12
                minute:
                  type: integer
                  minimum: 0
                  maximum: 59
                period:
                  type: string
                  enum:
                    - AM
                    - PM
              required:
                - hour
                - minute
                - period
            timezone:
              type: string
          required:
            - date
            - time
            - timezone
      required:
        - type
        - field
        - operator
    RedirectRegisteredCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - registered
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: boolean
      required:
        - type
        - field
        - operator
    RedirectRegistrationModeCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - registration_mode
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: string
          enum:
            - PER_LINK
            - UNIVERSAL
      required:
        - type
        - field
        - operator
    RedirectTokenIdCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - token_id
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          anyOf:
            - type: number
            - type: string
      required:
        - type
        - field
        - operator
    RedirectLanguageCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - language
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: string
      required:
        - type
        - field
        - operator
    RedirectDeviceTypeCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - device_type
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: string
          enum:
            - desktop
            - mobile
            - tablet
      required:
        - type
        - field
        - operator
    RedirectLocationCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - location
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: string
          enum:
            - america
            - europe
            - asia
            - pacific
            - na
            - eu
            - uk
            - apac
      required:
        - type
        - field
        - operator
    RedirectReferrerCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - referrer
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: string
      required:
        - type
        - field
        - operator
    RedirectCustomQueryParamCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - custom_query_param
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: object
          properties:
            param:
              type: string
              minLength: 1
            value:
              type: string
          required:
            - param
      required:
        - type
        - field
        - operator
    RedirectTapCountCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - tap_count
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: number
      required:
        - type
        - field
        - operator
    RedirectBrowserCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - browser
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: string
          enum:
            - chrome
            - firefox
            - safari
            - edge
            - opera
            - other
      required:
        - type
        - field
        - operator
    RedirectOsCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - os
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: string
          enum:
            - windows
            - macos
            - ios
            - android
            - linux
            - other
      required:
        - type
        - field
        - operator
    RedirectCountryCondition:
      type: object
      properties:
        type:
          type: string
          enum:
            - condition
        field:
          type: string
          enum:
            - country
        operator:
          type: string
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - contains
            - before
            - after
            - startsWith
            - endsWith
            - isNull
            - isNotNull
        value:
          type: string
      required:
        - type
        - field
        - operator
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````