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

# Business fields configuration for an organization

> **⚠️ DEPRECATED** This endpoint is deprecated in favor of the new Custom Roles system; for migration information, see the [Custom Roles & Permissions guide](/guides/api/guides/custom-roles-and-permissions).
This endpoint provides the list of all fields available for a given organization.
For each field, it also indicates: - Whether you have permission to edit it, depending on the permissions configured by the `PROVIDER`. - Whether you have granted permission to edit it for `BUSINESS_MANAGER` and `GROUP_MANAGER` roles who have access to the organization's businesses.
Only users with the `ORG_ADMIN` or `PROVIDER` roles can access this information.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /org/{org_id}/business_fields
openapi: 3.1.0
info:
  title: Partoo Rest API
  version: v2
  license:
    name: © Copyright Partoo
    url: https://www.partoo.co/en/gtu-api/
  x-logo:
    url: >-
      https://partoo-client-images.s3.amazonaws.com/logo-partoo-restapi-white.png
  description: >
    ## Introduction

    The Partoo Rest API allows you to automate all the actions that are possible
    to do in the Partoo Web Application.


    The Partoo Rest API can be used for many different purposes:
      - Create/update/delete your businesses & users if you are a client.
      - Create/subscribe/manage organizations, businesses & users if you are a reseller.
      - Retrieve data on businesses you have access to if you are a publisher.
      - ...
servers:
  - url: https://api.partoo.co/v2
    description: Production server
  - url: https://api.sandbox.partoo.co/v2
    description: Sandbox server (dev environment for clients & partners)
security:
  - ApiKeyAuth: []
paths:
  /org/{org_id}/business_fields:
    get:
      tags:
        - Business Fields
      summary: Business fields configuration for an organization
      description: >
        **⚠️ DEPRECATED** This endpoint is deprecated in favor of the new Custom
        Roles system; for migration information, see the [Custom Roles &
        Permissions guide](/guides/api/guides/custom-roles-and-permissions).

        This endpoint provides the list of all fields available for a given
        organization.

        For each field, it also indicates: - Whether you have permission to edit
        it, depending on the permissions configured by the `PROVIDER`. - Whether
        you have granted permission to edit it for `BUSINESS_MANAGER` and
        `GROUP_MANAGER` roles who have access to the organization's businesses.

        Only users with the `ORG_ADMIN` or `PROVIDER` roles can access this
        information.
      operationId: getBusinessFieldsForOrg
      parameters:
        - $ref: '#/components/parameters/path_org_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessFields.SectionArray'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
      deprecated: true
components:
  parameters:
    path_org_id:
      in: path
      name: org_id
      required: true
      schema:
        type: integer
      description: >
        Unique ID of the organization to which the resource belongs. Only
        `PROVIDER` users can access resources from a different organization than
        their own. If you are not a `PROVIDER`, this will default to the ID of
        your organization.
  schemas:
    BusinessFields.SectionArray:
      description: Business Fields sections array
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/BusinessFields.SectionNormal'
          - $ref: '#/components/schemas/BusinessFields.SectionCustomFields'
      example:
        - name: address
          fields:
            - name: country
              enabled: true
              enabled_for_subroles: true
            - name: city
              enabled: true
              enabled_for_subroles: false
        - name: description
          fields:
            - name: categories
              enabled: true
              enabled_for_subroles: true
            - name: website_url
              enabled: true
              enabled_for_subroles: true
        - name: hours
          fields:
            - name: open_hours
              enabled: true
              enabled_for_subroles: true
        - name: photos
          fields:
            - name: cover
              enabled: false
              enabled_for_subroles: false
        - name: contact
          fields:
            - name: phone_number
              enabled: true
              enabled_for_subroles: false
        - name: custom_fields
          fields:
            - name: has_parking
              enabled: true
              enabled_for_subroles: true
              type: BOOLEAN
              id: 1
              order: 10
              section_id: 4
            - name: special_description
              enabled: true
              enabled_for_subroles: true
              type: TEXT
              id: 2
              order: 11
              max_len: 250
              section_id: 6
            - name: facilities
              enabled: true
              enabled_for_subroles: true
              type: MULTIPLE_SELECT
              id: 3
              order: 2
              possible_values:
                - handicapped access
                - toilets
                - break room
            - name: banner image
              enabled: true
              enabled_for_subroles: true
              id: 4
              type: MULTIPLE_SELECT_IMAGE
              order: 10
              possible_values:
                - image 1
                - image 2
                - image 3
              possible_images_labels:
                - label image 1
                - label image 2
                - label image 3
              possible_images_urls:
                - url_of_image_1
                - url_of_image_2
                - url_of_image_3
            - name: team members
              enabled: true
              enabled_for_subroles: true
              id: 5
              type: IMAGES_UPLOADER
              order: 11
              text_fields:
                - text_field: text 1
                  max_length: 10
                - text_field: text 2
                  max_length: 20
                - text_field: text 3
                  max_length: 30
    BusinessFields.SectionNormal:
      allOf:
        - $ref: '#/components/schemas/BusinessFields.Section'
        - description: Business Fields Section
          type: object
          properties:
            fields:
              type: array
              items:
                $ref: '#/components/schemas/BusinessFields.Field'
    BusinessFields.SectionCustomFields:
      allOf:
        - $ref: '#/components/schemas/BusinessFields.Section'
        - description: Business Fields Section of Custom Fields
          type: object
          properties:
            fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFields.Metadata'
    BusinessFields.Section:
      description: Business Fields sections permissions
      type: object
      properties:
        name:
          description: >
            Name of a the section. The structure of the fields inside it depends
            of the section and is described below.
          type: string
    BusinessFields.Field:
      description: Business Field
      type: object
      properties:
        name:
          description: Name of the field
          type: string
        enabled:
          description: Permission (enabled | disabled) of the field for the current user
          type: boolean
        enabled_for_subroles:
          description: >
            Permission (enabled | disabled) of the field for the users with a
            more restrictive role compared to the current user.

            E.g., if the user is ORG_ADMIN: enabled_for_subroles describes the
            permissions of the field for all the GROUP_MANAGER and
            BUSINESS_MANAGER of the given organization.

            E.g., if the user is PROVIDER: enabled_for_subroles describes the
            permissions of the field for all the ORG_ADMIN, GROUP_MANAGER, and
            BUSINESS_MANAGER of the given provider.
          type: boolean
    CustomFields.Metadata:
      allOf:
        - $ref: '#/components/schemas/BusinessFields.Field'
        - description: Business Fields permissions
          type: object
          properties:
            type:
              description: >
                Type of the custom field.

                Possible values are "TEXT", "INTEGER", "FLOAT", "BOOLEAN",
                "SINGLE_SELECT", "MULTIPLE_SELECT", "MULTIPLE_SELECT_IMAGE",
                "IMAGES_UPLOADER".
              type: string
              enum:
                - TEXT
                - INTEGER
                - FLOAT
                - BOOLEAN
                - SINGLE_SELECT
                - MULTIPLE_SELECT
                - MULTIPLE_SELECT_IMAGE
                - IMAGES_UPLOADER
            id:
              description: ID of the custom field.
              type: integer
            order:
              type: integer
  responses:
    '401':
      description: You are not authenticated
      content:
        application/json:
          schema:
            description: Error that occurs when you are not authenticated
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authentication:
                    type: string
                    default: User not authenticated
    '403':
      description: |
        You are not allowed to perform this action
      content:
        application/json:
          schema:
            description: >
              Error that occurs when you are authenticated but you are trying to
              perform an action you are not allowed to perform
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authorization:
                    type: string
                    default: Operation not allowed
    '404':
      description: Resource does not exist
      content:
        application/json:
          schema:
            description: >-
              Error that occcurs when you are trying to reach a resource that
              does not exist
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  json:
                    type: string
                    default: Resource not found
  securitySchemes:
    ApiKeyAuth:
      description: >
        The authentication system on Partoo API is using API Key that should be
        put in the header of the request (the name of the header is `x-APIKey`).
        An api_key is linked to a user. This user's role will give you different
        access level to the API features.
      type: apiKey
      in: header
      name: x-APIKey

````