> ## 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.

# Order custom fields

> This endpoint enables you to reorganize the order of custom fields and custom field sections within your organization. You can also move custom fields between sections by specifying a different section_id. `PROVIDER` users can pass `org_id` to reorder custom fields for a managed organization.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml post /custom_fields/order
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:
  /custom_fields/order:
    post:
      tags:
        - Custom Fields
      summary: Order custom fields
      description: >
        This endpoint enables you to reorganize the order of custom fields and
        custom field sections within your organization. You can also move custom
        fields between sections by specifying a different section_id. `PROVIDER`
        users can pass `org_id` to reorder custom fields for a managed
        organization.
      operationId: postOrderCustomFields
      parameters:
        - $ref: '#/components/parameters/query_org_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request object to reorder custom fields and optionally sections
              type: object
              required:
                - orders
              properties:
                orders:
                  $ref: '#/components/schemas/CustomFieldOrders'
                section_orders:
                  $ref: '#/components/schemas/CustomFieldSectionOrders'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  parameters:
    query_org_id:
      in: query
      name: org_id
      schema:
        type: integer
      required: false
      description: >
        Organization ID. Only `PROVIDER` users can specify a different
        organization. If not provided, defaults to your own organization.
  schemas:
    CustomFieldOrders:
      description: >
        On the Business Edit view of the Partoo App, custom fields will be
        displayed depending on their order.      

        The lowest number will be the first.
      type: array
      items:
        $ref: '#/components/schemas/CustomFieldOrdersObject'
    CustomFieldSectionOrders:
      description: >
        On the Business Edit view of the Partoo App, custom fields section will
        be displayed depending on their order.      

        The lowest number will be the first.
      type: array
      items:
        $ref: '#/components/schemas/CustomFieldSectionOrdersObject'
    RequestStatus:
      description: Request status
      type: string
      enum:
        - success
    CustomFieldOrdersObject:
      type: object
      required:
        - id
        - order
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldId'
        order:
          $ref: '#/components/schemas/CustomFieldOrder'
        section_id:
          $ref: '#/components/schemas/CustomFieldSectionId'
    CustomFieldSectionOrdersObject:
      type: object
      required:
        - id
        - order
      properties:
        id:
          $ref: '#/components/schemas/CustomFieldSectionId'
        order:
          $ref: '#/components/schemas/CustomFieldSectionOrder'
    CustomFieldId:
      description: Id of the custom field
      type: integer
      example: 42
    CustomFieldOrder:
      description: >-
        Describes where the custom field is displayed on the Business Edit view
        of the Partoo App. If the custom field is within a section, **order**
        specifies its position within the custom field section.
      type: integer
      default: 10
      example: 30
    CustomFieldSectionId:
      description: Id of the custom field section
      type: integer
      example: 6
    CustomFieldSectionOrder:
      description: >-
        Describes where the custom field section is displayed on the Business
        Edit view of the Partoo App.
      type: integer
      example: 18
  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

````