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

# Full Preference

> API to fetch object preferences across all channels and categories.



## OpenAPI

````yaml GET /v1/object/{object_type}/{id}/preference/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v1/object/{object_type}/{id}/preference/:
    get:
      summary: Full Preference
      description: API to fetch object preferences across all channels and categories.
      operationId: fetch-object-full-preference
      parameters:
        - name: object_type
          in: path
          description: >-
            Used to group similar objects together. Give plural namespace like
            teams, organizations, and roles.
          schema:
            type: string
          required: true
        - name: tenant_id
          in: query
          description: to fetch object preferences for a particular tenant
          schema:
            type: string
        - name: show_opt_out_channels
          in: query
          description: >-
            set this flag to `true` if you want to fetch channel list for
            opt-out categories.
          schema:
            type: boolean
            default: false
        - name: id
          in: path
          description: Unique identifier of the object in your system
          schema:
            type: string
          required: true
        - name: tags
          in: query
          description: >
            Filter preference categories with tags assigned to them. Used to
            filter preference categories relevant to the user on UI based on
            their roles, department or teams.

            You can apply single tag filter like `tags=tag1` or build nested
            conditions using logical operators - `and`, `or`, `not`, `exists`.


            Example:

            ```

            tags=admin

            tags={"or":[{"and":["admin","sales"]},{"and":["admin","manager"]}]}

            tags={"not":"admin"}

            tags={"exists":true}
          schema:
            type: string
        - name: locale
          in: query
          description: >
            Locale code (e.g., `es`, `fr`, `de`, `ja`, `es-AR`) to fetch
            preference translations in user's locale. When provided, the API
            looks for category and section names and descriptions in the
            respective locale file.

            If a translation is missing for the requested locale, the system
            automatically falls back in this order: `locale-region` (e.g.,
            `es-AR`) → `locale` (e.g., `es`) → `en` (English - always
            available).
          schema:
            type: string
          example: es
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    sections:
                      - subcategories:
                          - name: Newsletter
                            category: newsletter
                            description: Send me updates on new product updates
                            preference: opt_in
                            is_editable: true
                            channels:
                              - channel: androidpush
                                preference: opt_in
                                is_editable: true
                              - channel: email
                                preference: opt_in
                                is_editable: true
                    channel_preferences:
                      - channel: email
                        is_restricted: false
              schema:
                type: object
                properties:
                  sections:
                    type: array
                    items:
                      type: object
                      properties:
                        subcategories:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                description: Display name of the notification category.
                                type: string
                                example: Newsletter
                              category:
                                description: Slug of the notification category.
                                type: string
                                example: newsletter
                              description:
                                description: Description of the notification category.
                                type: string
                                example: Send me updates on new product updates
                              preference:
                                type: string
                                enum:
                                  - opt_in
                                  - opt_out
                                example: opt_in
                              is_editable:
                                type: boolean
                                description: >-
                                  false when category default preference is set
                                  to can't unsubscribe
                              channels:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    channel:
                                      type: string
                                      example: email
                                    preference:
                                      type: string
                                      enum:
                                        - opt_in
                                        - opt_out
                                      example: opt_in
                                    is_editable:
                                      type: boolean
                                      description: >-
                                        false when category default preference
                                        is set to can't unsubscribe
                              digest_schedule_options:
                                type: object
                                nullable: true
                                description: >-
                                  All digest schedule options configured on the
                                  category, with the recipient's current
                                  selection. `null` if digest schedule is not
                                  enabled on the category.
                                properties:
                                  options:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          description: >-
                                            Unique identifier of the digest schedule
                                            option.
                                          type: string
                                        label:
                                          type: string
                                          description: >-
                                            Display label shown to the recipient for
                                            this option.
                                        frequency:
                                          type: string
                                          description: Frequency of the digest schedule.
                                          enum:
                                            - instantly
                                            - minutely
                                            - hourly
                                            - daily
                                            - weekly
                                            - weekly_mo2fr
                                            - monthly
                                        interval:
                                          description: >-
                                            Recurrence multiplier for the frequency
                                            (for example, every 2 weeks).
                                          type: integer
                                        time:
                                          type: object
                                          description: >-
                                            Time of day to send the digest, with its
                                            edit policy and the recipient's
                                            override.
                                          properties:
                                            edit_policy:
                                              type: string
                                              enum:
                                                - locked
                                                - editable
                                              description: >-
                                                `editable` means the recipient can
                                                change this value; `locked` means it is
                                                fixed.
                                            default_value:
                                              type: string
                                              description: Default time in HH:MM (24-hour) format.
                                            value:
                                              type: string
                                              nullable: true
                                              description: Recipient's overridden value, if any.
                                        weekdays:
                                          type: object
                                          description: >-
                                            Days of the week to send on (for
                                            `weekly` frequency), with edit policy
                                            and recipient override.
                                          properties:
                                            edit_policy:
                                              description: >-
                                                `editable` means the value can be
                                                overridden; `locked` means it is fixed.
                                              type: string
                                              enum:
                                                - locked
                                                - editable
                                            default_value:
                                              description: >-
                                                Default value applied when not
                                                overridden.
                                              type: array
                                              items:
                                                type: string
                                            value:
                                              type: array
                                              nullable: true
                                              items:
                                                type: string
                                        monthdays:
                                          type: object
                                          description: >-
                                            Days of the month to send on (for
                                            `monthly` frequency), with edit policy
                                            and recipient override.
                                          properties:
                                            edit_policy:
                                              description: >-
                                                `editable` means the value can be
                                                overridden; `locked` means it is fixed.
                                              type: string
                                              enum:
                                                - locked
                                                - editable
                                            default_value:
                                              description: >-
                                                Default value applied when not
                                                overridden.
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  pos:
                                                    description: >-
                                                      Position in the month (1-31; use a
                                                      negative value to count from the end).
                                                    type: integer
                                                  day:
                                                    description: >-
                                                      Optional day of the week (su, mo, tu,
                                                      we, th, fr, sa).
                                                    type: string
                                            value:
                                              type: array
                                              nullable: true
                                              items:
                                                type: object
                                        dtstart:
                                          type: object
                                          description: >-
                                            Start datetime from which the recurring
                                            schedule is calculated, with edit policy
                                            and recipient override.
                                          properties:
                                            edit_policy:
                                              description: >-
                                                `editable` means the value can be
                                                overridden; `locked` means it is fixed.
                                              type: string
                                              enum:
                                                - locked
                                                - editable
                                            default_value:
                                              description: >-
                                                Default value applied when not
                                                overridden.
                                              type: string
                                              format: date-time
                                            value:
                                              type: string
                                              nullable: true
                                        is_default:
                                          type: boolean
                                          description: >-
                                            Whether this option is the category
                                            default.
                                        is_user_selected:
                                          type: boolean
                                          description: >-
                                            Whether the recipient has selected this
                                            option.
                              digest_schedule:
                                type: object
                                nullable: true
                                description: >-
                                  The recipient's currently active digest
                                  schedule, resolved in order recipient
                                  selection -> tenant default -> category
                                  default. `null` if digest schedule is not
                                  enabled on the category.
                                properties:
                                  id:
                                    description: >-
                                      Unique identifier of the digest schedule
                                      option.
                                    type: string
                                  label:
                                    description: Display label shown to the recipient.
                                    type: string
                                  frequency:
                                    description: >-
                                      Frequency of the digest schedule
                                      (instantly, hourly, daily, weekly,
                                      weekly_mo2fr, monthly).
                                    type: string
                                    enum:
                                      - instantly
                                      - minutely
                                      - hourly
                                      - daily
                                      - weekly
                                      - weekly_mo2fr
                                      - monthly
                                  interval:
                                    description: >-
                                      Recurrence multiplier for the frequency
                                      (for example, every 2 weeks).
                                    type: integer
                                  time:
                                    type: string
                                    description: Resolved time in HH:MM (24-hour) format.
                                  weekdays:
                                    description: >-
                                      Days of the week to send on (for weekly
                                      frequency), with edit policy and value.
                                    type: array
                                    items:
                                      type: string
                                  monthdays:
                                    description: >-
                                      Days of the month to send on (for monthly
                                      frequency), with edit policy and value.
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        pos:
                                          description: >-
                                            Position in the month (1-31; use a
                                            negative value to count from the end).
                                          type: integer
                                        day:
                                          description: >-
                                            Optional day of the week (su, mo, tu,
                                            we, th, fr, sa).
                                          type: string
                                  is_default:
                                    description: >-
                                      Whether this option is the default
                                      selection.
                                    type: boolean
                                  is_user_selected:
                                    type: boolean
                              properties:
                                type: array
                                nullable: true
                                description: >-
                                  Category condition properties with the
                                  recipient's overrides. Referenced in workflows
                                  as `$category.properties.<key>`.
                                items:
                                  type: object
                                  properties:
                                    key:
                                      description: >-
                                        Property key identifier, referenced in
                                        workflows as
                                        `$category.properties.<key>`.
                                      type: string
                                    label:
                                      type: string
                                      description: Display label for the property.
                                    value_type:
                                      description: Data type of the property value.
                                      type: string
                                      enum:
                                        - integer
                                        - string
                                        - string_choice
                                        - list_choice
                                        - string_dynamic
                                        - list_dynamic
                                    default_value:
                                      nullable: true
                                      description: >-
                                        Default value applied when the recipient
                                        has not set a value.
                                    is_optional:
                                      description: Whether this property is optional.
                                      type: boolean
                                    edit_policy:
                                      type: string
                                      enum:
                                        - locked
                                        - editable
                                      description: >-
                                        `editable` means the recipient can
                                        override the value; `locked` means it is
                                        fixed.
                                    is_overridden:
                                      type: boolean
                                      description: >-
                                        Whether the recipient has overridden the
                                        default value.
                                    value:
                                      nullable: true
                                      description: Recipient-overridden value, if any.
                  channel_preferences:
                    type: array
                    items:
                      type: object
                      properties:
                        channel:
                          type: string
                          description: channel name
                          example: androidpush
                        is_restricted:
                          type: boolean
                          description: >-
                            True means notification will be sent in categories
                            where this channel is marked as mandatory channel.
                            False means opt_in on channel.
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 404
                    message: object 'object_type/id' not found
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: object 'object_type/id' not found
      deprecated: false
      security:
        - BearerAuth: []
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.

````