Bridgit ProjectFields API

The ProjectFields API from Bridgit — 2 operation(s) for projectfields.

OpenAPI Specification

bridgit-projectfields-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Bench AccountActivities ProjectFields API
  description: "<h2>Versioning</h2>\n<p>\n    The API is currently at version <code>1.0</code>. All API endpoints (other than\n    authentication) require you to specify the API version as part of the path.\n</p>\n\n<h2>URL Paths</h2>\n<p>\n    Authentication requests should be made to <code>/auth/signin</code>,\n    as documented below. All other API requests should be made to\n    sub-paths of <code>/rp/api/1.0/...</code>.\n</p>\n\n<h2>Authentication</h2>\n<p>\n    API requests are authenticated using an OAuth Bearer token.\n    You can get a token by authenticating your user by sending a\n    POST request to <code>/auth/signin</code>, with \"username and \"password\"\n    parameters form-encoded in the body of the request.\n\n    POST /auth/signin HTTP/1.1\n    Content-Type: application/x-www-form-urlencoded\n\n    username=user@example.com&password=some-secret-password\n</p>\n<p>\n    The response will be a JSON object including both\n    <b>\"access_token\"</b> and <b>\"refresh_token\"</b> property.\n    All other requests against the Bench API should include an\n    authorization header: <code>Authorization: Bearer xxxYYYzzz</code>,\n    where <b>xxxYYYzzz</b> is the value of <b>\"access_token\"</b> in the response.\n    <br><br>\n    For example:\n\n    $ curl https://bench.gobridgit.com/auth/signin -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'username=someone@example.com' --data-urlencode 'password=[...snip...]'\n    {\n        \"access_token\": \"...snip...\",\n        \"token_type\": \"Bearer\",\n        \"refresh_token\": \"...snip...\"\n        \"expiry\": \"2020-01-01T00:00:00.413440849Z\"\n    }\n\n</p>\n\n<p>\n    The refresh token can be used to generate new session by request with <code>/auth/token</code> endpoint:\n\n    POST /auth/token HTTP/1.1\n    Content-Type: application/x-www-form-urlencoded\n\n    grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA\n</p>\n<p>\n    Note that once the refresh token is used, the previous access and refresh token is no longer valid.\n    <br><br>\n    For example:\n\n    $ curl https://bench.gobridgit.com/auth/token -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=refresh_token' --data-urlencode 'refresh_token=[...snip...]'\n    {\n        \"access_token\": \"...snip...\",\n        \"token_type\": \"Bearer\",\n        \"refresh_token\": \"...snip...\"\n        \"expiry\": \"2020-01-01T00:00:00.413440849Z\"\n    }\n</p>\n\n<h2>Pagination</h2>\n<p>\n    Several of the API endpoints are paginated. These are denoted by\n    including the <code>offset</code> (zero-based offset) and <code>limit</code> query\n    parameters. For example, to request the <code>10</code> items,\n    set the <code>offset=0</code> to <code>limit=10</code>.\n    <br>\n    NOTE: the result set contains items with index of 0-9\n    <br>\n    To request the next 10 items (starting at index 10),\n    set the <code>offset=10</code> to <code>limit=10</code>\n</p>\n<p>\n    Responses to paginated API endpoints return a JSON array of objects.\n    If there are results beyond the page you have requested, the server\n    will set a <code>query-has-more: true</code> header in the response.\n</p>\n\n<h2>Request Encoding</h2>\n<p>\n    <code>GET</code> and <code>DELETE</code> requests should have parameters encoded as URL query\n    parameters. Boolean values should be encoded as <code>true</code> and\n    <code>false</code>, not as <code>1</code> and <code>0</code>.\n</p>\n\n<h2>Errors</h2>\n<p>\n    Errors are returned for some response codes such as <code>400 Bad Request</code> in the\n    following format:\n\n    {\n      \"errors\": [\n        {\n          \"errorType\": \"ValidationError\",\n          \"description\": \"The value of Name must be a string with a minimum length of 1 and a maximum length of 8 and not whitespace.\",\n          \"field\": \"Name\",\n          \"values\": [\n            null\n          ]\n        }\n      ],\n      \"title\": \"One or more validation errors occurred.\",\n      \"status\": 400,\n      \"instance\": \"api/v1/accounts/0/persons\",\n      \"requestUid\": \"123e4567-e89b-12d3-a456-426614174000\"\n    }\n</p>\n"
  version: '1.0'
servers:
- url: https://bench.gobridgit.com
  description: Bridgit Bench production
security:
- {}
tags:
- name: ProjectFields
paths:
  /rp/api/v1/accounts/{id}/project-fields:
    get:
      tags:
      - ProjectFields
      summary: Gets all project field definitions in the given account.
      description: '<br/><strong>Permissions</strong><br/>Account: Read<br/>Private: Read<br/>Finance: Read'
      operationId: ProjectFields_Query
      parameters:
      - name: id
        in: path
        description: The Account ID
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: 'Success: List of field definitions'
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    post:
      tags:
      - ProjectFields
      summary: Adds or updates field definitions on the given account
      description: 'If you pass in a FieldDefRequest object without an "id" this endpoint will add a new one to the account if the name isn''t reserved or in use.


        If you pass in a FieldDefRequest object with an "id" this endpoint will update an existing one that matches the id.


        To add a value or multiple values to a selection list you must pass an array of "definedValues" that contain objects with a "definedValue" property of the value you want to add.


        To update a value or multiple values in a selection list you must pass an array of "definedValues" that contain objects with a "valueId" property of the value id to update and a "definedValue" property of the value you want to update it to.


        To remove a value or multiple values from a selection list you must pass an array of "definedValues" that contain objects with a "valueId" property of the value id to remove, a "definedValue" property of the value you want to remove, and a "forRemoval" property set to true.


        Example: You have a list of "Years" and you want to change "5" to "5-9" and remove values "6" through "9" and add a value of "10+"

        <code>[<br/>&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;"id":&nbsp;123,<br/>&nbsp;&nbsp;&nbsp;&nbsp;"name":&nbsp;"Years",<br/>&nbsp;&nbsp;&nbsp;&nbsp;"type":&nbsp;"SingleSelect",<br/>&nbsp;&nbsp;&nbsp;&nbsp;"definedValues":&nbsp;[<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"valueId":&nbsp;584,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"definedValue":&nbsp;"5-9",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"forRemoval":&nbsp;false,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"deleteExperienceFieldValues":&nbsp;false<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"valueId":&nbsp;585,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"definedValue":&nbsp;"6",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"forRemoval":&nbsp;true,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"deleteExperienceFieldValues":&nbsp;false<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"valueId":&nbsp;586,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"definedValue":&nbsp;"7",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"forRemoval":&nbsp;true,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"deleteExperienceFieldValues":&nbsp;false<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"valueId":&nbsp;587,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"definedValue":&nbsp;"8",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"forRemoval":&nbsp;true,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"deleteExperienceFieldValues":&nbsp;false<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"valueId":&nbsp;588,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"definedValue":&nbsp;"9",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"forRemoval":&nbsp;true,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"deleteExperienceFieldValues":&nbsp;false<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"valueId":&nbsp;0,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"definedValue":&nbsp;"10+",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"forRemoval":&nbsp;false,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"deleteExperienceFieldValues":&nbsp;false<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;],<br/>&nbsp;&nbsp;&nbsp;&nbsp;"isRequired":&nbsp;true,<br/>&nbsp;&nbsp;&nbsp;&nbsp;"isPrivate":&nbsp;false,<br/>&nbsp;&nbsp;&nbsp;&nbsp;"isLocked":&nbsp;false<br/>&nbsp;&nbsp;}<br/>]</code>

        <strong>NOTE:</strong> There are a few reserved field names that cannot be used.


        "Project ID", "Project Name", "Colour", "Start Date", "End Date", "Roles", "Status", "Active Phase", "Issues", "Allocated People", "Notes", "Group"

        <h2>Validation</h2><b>Other</b>: Free text. Max length: 2400


        <b>Address</b>: Free text. Max length: 250


        <b>Project Number</b>: Free text. Max length: 250


        <b>Budget</b>: Currency. Starts with 0 to 15 digits of ```0-9``` then optionally followed by ```.``` with 0 to 2 digits of ```0-9```


        <b>External ID</b>: Free text. Max length: 250


        <b>Labor Hours (Salaried)</b>: Positive integer. Must be greater than 0 and not exceed 2,147,483,647 (Int32.MaxValue). Decimals are not allowed. This is a system field that requires both Project Forecasting and Standard modules to be enabled.


        <b>Labor Hours (Hourly)</b>: Positive integer. Must be greater than 0 and not exceed 2,147,483,647 (Int32.MaxValue). Decimals are not allowed. This is a system field that requires both Project Forecasting and Hourly Profile modules to be enabled.


        <br/><strong>Permissions</strong><br/>Account: Write<br/>Private: Read<br/>Finance: Read'
      operationId: ProjectFields_Post
      parameters:
      - name: id
        in: path
        description: The Account ID
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        description: Array of field definition request objects
        content:
          application/json-patch+json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/FieldDefRequest'
            example:
            - id: 123
              name: Years
              type: SingleSelect
              definedValues:
              - valueId: 584
                definedValue: 5-9
                forRemoval: false
                deleteExperienceFieldValues: false
              - valueId: 585
                definedValue: '6'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 586
                definedValue: '7'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 587
                definedValue: '8'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 588
                definedValue: '9'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 0
                definedValue: 10+
                forRemoval: false
                deleteExperienceFieldValues: false
              isRequired: true
              isPrivate: false
              isLocked: false
          application/json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/FieldDefRequest'
            example:
            - id: 123
              name: Years
              type: SingleSelect
              definedValues:
              - valueId: 584
                definedValue: 5-9
                forRemoval: false
                deleteExperienceFieldValues: false
              - valueId: 585
                definedValue: '6'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 586
                definedValue: '7'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 587
                definedValue: '8'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 588
                definedValue: '9'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 0
                definedValue: 10+
                forRemoval: false
                deleteExperienceFieldValues: false
              isRequired: true
              isPrivate: false
              isLocked: false
          text/json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/FieldDefRequest'
            example:
            - id: 123
              name: Years
              type: SingleSelect
              definedValues:
              - valueId: 584
                definedValue: 5-9
                forRemoval: false
                deleteExperienceFieldValues: false
              - valueId: 585
                definedValue: '6'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 586
                definedValue: '7'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 587
                definedValue: '8'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 588
                definedValue: '9'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 0
                definedValue: 10+
                forRemoval: false
                deleteExperienceFieldValues: false
              isRequired: true
              isPrivate: false
              isLocked: false
          application/*+json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/FieldDefRequest'
            example:
            - id: 123
              name: Years
              type: SingleSelect
              definedValues:
              - valueId: 584
                definedValue: 5-9
                forRemoval: false
                deleteExperienceFieldValues: false
              - valueId: 585
                definedValue: '6'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 586
                definedValue: '7'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 587
                definedValue: '8'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 588
                definedValue: '9'
                forRemoval: true
                deleteExperienceFieldValues: false
              - valueId: 0
                definedValue: 10+
                forRemoval: false
                deleteExperienceFieldValues: false
              isRequired: true
              isPrivate: false
              isLocked: false
        required: true
      responses:
        '200':
          description: 'Success: Added/updated field definitions'
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
        '400':
          description: 'Bad Request: Example when trying to set system fields to private that aren''t allowed to be private:

            <code>{<br/>&nbsp;&nbsp;"errors":&nbsp;[<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"errorType":&nbsp;"CannotBeMadePrivate",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"description":&nbsp;"Fields&nbsp;in&nbsp;request&nbsp;cannot&nbsp;be&nbsp;made&nbsp;private.",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"errorCode":&nbsp;null,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"field":&nbsp;"Id",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"values":&nbsp;[<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"5"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"innerException":&nbsp;null,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"hResult":&nbsp;-2146233088<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;],<br/>&nbsp;&nbsp;"title":&nbsp;"One&nbsp;or&nbsp;more&nbsp;validation&nbsp;errors&nbsp;occurred.",<br/>&nbsp;&nbsp;"status":&nbsp;400,<br/>&nbsp;&nbsp;"instance":&nbsp;"/api/v1/accounts/2/project-fields",<br/>&nbsp;&nbsp;"requestUid":&nbsp;"3dd10d1b-392f-4d5a-b736-50ea1f072342"<br/>}</code>'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          description: "Conflict - Field definition with name already exists in the account or trying to add or update a field to a system field.\n\n            Example when trying to add a field that has the same name as an existing one:\n<code>{<br/>&nbsp;&nbsp;\"errors\":&nbsp;[<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"errorType\":&nbsp;\"Duplicate\",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"description\":&nbsp;\"A&nbsp;name&nbsp;in&nbsp;the&nbsp;request&nbsp;is&nbsp;already&nbsp;in&nbsp;use.\",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"errorCode\":&nbsp;null,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"innerException\":&nbsp;null,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"hResult\":&nbsp;-2146233088<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;],<br/>&nbsp;&nbsp;\"title\":&nbsp;\"One&nbsp;or&nbsp;more&nbsp;validation&nbsp;errors&nbsp;occurred.\",<br/>&nbsp;&nbsp;\"status\":&nbsp;409,<br/>&nbsp;&nbsp;\"instance\":&nbsp;\"/api/v1/accounts/2/project-fields\",<br/>&nbsp;&nbsp;\"requestUid\":&nbsp;\"8ba8f060-858b-46d9-b3cc-fa1c391ebc66\"<br/>}</code>"
        '422':
          description: "Unprocessable Entity - Couldn't remove all defined values from list.\n\n            Example when trying to remove a defined value in use from a required list:\n<code>{<br/>&nbsp;&nbsp;\"errors\":&nbsp;[<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"errorType\":&nbsp;\"DefinedValueError\",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"description\":&nbsp;\"23001:&nbsp;Cannot&nbsp;remove&nbsp;field&nbsp;defined&nbsp;value.&nbsp;It&nbsp;is&nbsp;in&nbsp;use&nbsp;for&nbsp;required&nbsp;field(s)\",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"errorCode\":&nbsp;null,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"innerException\":&nbsp;null,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"hResult\":&nbsp;-2146233088<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;],<br/>&nbsp;&nbsp;\"title\":&nbsp;\"One&nbsp;or&nbsp;more&nbsp;validation&nbsp;errors&nbsp;occurred.\",<br/>&nbsp;&nbsp;\"status\":&nbsp;422,<br/>&nbsp;&nbsp;\"instance\":&nbsp;\"/api/v1/accounts/2/project-fields\",<br/>&nbsp;&nbsp;\"requestUid\":&nbsp;\"fb8b2dd9-360f-4a81-852c-e5b70cfa5a85\"<br/>}</code>"
    delete:
      tags:
      - ProjectFields
      summary: Removes project field definitions in the given account.
      description: '<br/><strong>Permissions</strong><br/>Account: Write'
      operationId: ProjectFields_Delete
      parameters:
      - name: id
        in: path
        description: The Account ID
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        description: The Field Definition IDs
        content:
          application/json-patch+json:
            schema:
              minItems: 1
              type: array
              items:
                type: integer
                format: int64
          application/json:
            schema:
              minItems: 1
              type: array
              items:
                type: integer
                format: int64
          text/json:
            schema:
              minItems: 1
              type: array
              items:
                type: integer
                format: int64
          application/*+json:
            schema:
              minItems: 1
              type: array
              items:
                type: integer
                format: int64
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: "Unprocessable Entity: Attempted to remove system field(s)\n\n            Example Response:\n<code>{<br/>&nbsp;&nbsp;\"errors\":&nbsp;[<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"errorType\":&nbsp;\"NotAllowed\",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"description\":&nbsp;\"Cannot&nbsp;delete&nbsp;system&nbsp;field(s)\",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"errorCode\":&nbsp;null,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"innerException\":&nbsp;null,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"hResult\":&nbsp;-2146233088<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;],<br/>&nbsp;&nbsp;\"title\":&nbsp;\"One&nbsp;or&nbsp;more&nbsp;validation&nbsp;errors&nbsp;occurred.\",<br/>&nbsp;&nbsp;\"status\":&nbsp;422,<br/>&nbsp;&nbsp;\"instance\":&nbsp;\"/api/v1/accounts/2/project-fields\",<br/>&nbsp;&nbsp;\"requestUid\":&nbsp;\"3b3cbfaa-a809-4529-8870-317654a3311e\"<br/>}</code>"
  /rp/api/v1/accounts/{id}/project-fields/_reorder:
    put:
      tags:
      - ProjectFields
      summary: Update the display order of project field definitions for the given account.
      description: 'Accepts an array of objects containing fieldId and displayOrder.


        System fields cannot be reordered and should not be included in the request.


        All custom fields should be included with their new display order values.<br/><strong>Permissions</strong><br/>Account: Write'
      operationId: ProjectFields_UpdateFieldOrder
      parameters:
      - name: id
        in: path
        description: The account ID
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        description: Array of field order updates
        content:
          application/json-patch+json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/FieldOrderRequest'
          application/json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/FieldOrderRequest'
          text/json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/FieldOrderRequest'
          application/*+json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/FieldOrderRequest'
        required: true
      responses:
        '200':
          description: 'Success: Field order updated'
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectFieldDefinition'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
components:
  schemas:
    FieldDefinedValueRequest:
      type: object
      properties:
        valueId:
          type: integer
          format: int64
        definedValue:
          type: string
          nullable: true
        forRemoval:
          type: boolean
        deleteExperienceFieldValues:
          type: boolean
      additionalProperties: false
    ProjectFieldDefinition:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 1394
        name:
          type: string
          nullable: true
          example: Contact Number
        type:
          enum:
          - Boolean
          - Date
          - Email
          - PhoneNumber
          - Image
          - Text
          - LongText
          - SingleSelect
          - MultiSelect
          - Address
          - Currency
          - Phone
          - Integer
          - Number
          type: string
          example: PhoneNumber
        definedValues:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefinedValue'
          nullable: true
        isRequired:
          type: boolean
          example: false
        isSystem:
          type: boolean
          example: false
        isPrivate:
          type: boolean
          example: false
        isFinancials:
          type: boolean
          example: false
        isLocked:
          type: boolean
          example: false
        experienceFieldId:
          type: string
          format: uuid
          nullable: true
          example: 00000000-0000-0000-0000-000000000000
        displayOrder:
          type: integer
          format: int32
          nullable: true
          example: 1
      additionalProperties: false
    FieldDefRequest:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 1394
        name:
          type: string
          nullable: true
          example: Contact Number
        type:
          enum:
          - Boolean
          - Date
          - Email
          - PhoneNumber
          - Image
          - Text
          - LongText
          - SingleSelect
          - MultiSelect
          - Address
          - Currency
          - Phone
          - Integer
          - Number
          type: string
          example: PhoneNumber
        definedValues:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefinedValueRequest'
          nullable: true
        isRequired:
          type: boolean
          example: false
        isPrivate:
          type: boolean
          example: false
        isLocked:
          type: boolean
          example: false
      additionalProperties: false
    FieldDefinedValue:
      type: object
      properties:
        valueId:
          type: integer
          format: int64
          example: 13
        definedValue:
          type: string
          nullable: true
          example: Defined Value
        inUse:
          type: array
          items:
            type: integer
            format: int64
          nullable: true
      additionalProperties: false
    FieldOrderRequest:
      required:
      - displayOrder
      - fieldId
      type: object
      properties:
        fieldId:
          maximum: 9.223372036854776e+18
          minimum: 1
          type: integer
          description: The field ID to reorder
          format: int64
          example: 1234
        displayOrder:
          maximum: 2147483647
          minimum: 1
          type: integer
          description: The new display order position (1-indexed)
          format: int32
          example: 1
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: http
      description: Standard Authorization header using the Bearer scheme
      scheme: bearer
      bearerFormat: JWT