Gupy Area API

The Area API from Gupy, for area.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /os/v1/areas List areas with pagination #
POST /os/v1/areas Create a new area #
PUT /os/v1/areas/external/{externalCode} Update an existing area #
DELETE /os/v1/areas/external/{externalCode} Delete area by external code #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gupy:gupy-area-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gupy-area-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gupy Admin Global Area API
  description: Public API for Estrutura Organizacional - Only requires Bearer token authentication. The central-company-id is automatically extracted from the token.
  version: '1.0'
  contact: {}
servers:
- url: https://api.gupy.io
tags:
- name: Area
paths:
  /os/v1/areas:
    get:
      description: Retrieves a paginated list of areas for the company, including organization unit and cost center external codes when linked. When `externalCode` is provided, results are filtered to areas whose code contains that value (case-insensitive substring). If nothing matches, `data` is empty and `total` is 0.
      operationId: AreaPublicController_listAllAreas_v1
      parameters:
      - name: externalCode
        required: false
        in: query
        description: Optional. Substring filter on area external code (case-insensitive). Empty list when no match.
        schema:
          example: AREA-001
          type: string
      - name: page
        required: false
        in: query
        description: Page number for pagination
        schema:
          minimum: 1
          default: 1
          example: 1
          type: number
      - name: maxPageSize
        required: false
        in: query
        description: Maximum page size for pagination
        schema:
          minimum: 1
          maximum: 100
          default: 10
          example: 20
          type: number
      responses:
        '200':
          description: Areas retrieved successfully
          content:
            application/json:
              example:
                result:
                  data:
                  - uuid: d20dc017-80c6-4706-bbfe-549c1cc4d2c1
                    name: Engineering
                    description: Software development
                    externalCode: AREA-001
                    similarity: ENGINEERING
                    costCenter:
                      externalCode: CC-001
                    organizationUnit:
                      externalCode: OU-001
                  page: 1
                  maxPageSize: 10
                  total: 1
                  totalPages: 1
        '400':
          description: Bad Request - Invalid query parameters
          content:
            application/json:
              examples:
                invalidPage:
                  summary: Invalid page parameter
                  value:
                    statusCode: 400
                    timestamp: '2025-05-29T21:00:00.000Z'
                    path: /os/v1/areas
                    method: GET
                    title: BadRequestException
                    message: Validation failed
                    errors:
                    - code: BadRequestException
                      target: ValidationPipe
                      message: externalCode should not be empty
                invalidMaxPageSize:
                  summary: Invalid maxPageSize parameter
                  value:
                    statusCode: 400
                    timestamp: '2025-05-29T21:00:00.000Z'
                    path: /os/v1/areas
                    method: GET
                    title: BadRequestException
                    message: Validation failed
                    errors:
                    - code: BadRequestException
                      target: ValidationPipe
                      message: maxPageSize must not be greater than 100
        '401':
          description: Unauthorized - Invalid or missing token
          content:
            application/json:
              example:
                statusCode: 401
                timestamp: '2026-05-25T17:24:50.392Z'
                path: /v1/resource
                method: GET
                title: UnauthorizedException
                message: Unauthorized
                errors:
                - code: UnauthorizedException
                  target: UnauthorizedException
                  message: Unauthorized
        '500':
          description: Internal Server Error - Unexpected failure
          content:
            application/json:
              example:
                statusCode: 500
                timestamp: '2026-05-25T17:24:50.392Z'
                path: /v1/resource
                method: GET
                title: InternalServerErrorException
                message: Unexpected error occurred
                errors:
                - code: UnprocessableEntityException
                  target: Server
                  message: An unexpected error occurred. Please try again later.
      security:
      - bearer: []
      - central-company-id: []
      - company-uuid: []
      summary: List areas with pagination
      tags:
      - Area
    post:
      description: 'Creates a new area in the company.


        **Business Rules:**

        - `name`: Required. Maximum 300 characters.

        - `externalCode`: Required. Maximum 50 characters. Must be unique within the company.

        - `similarity`: Required. Must be a valid area similarity value.

        - `description`: Optional. Maximum 900 characters.

        - `organizationUnit`: Optional. If provided, identify the department by `uuid` and/or `externalCode` (at least one). If both are sent, `uuid` is used for lookup.

        - `costCenter`: Optional. If provided, identify the cost center by `uuid` and/or `externalCode` (at least one). If both are sent, `uuid` is used for lookup.


        **Validation:**

        - All required fields must be provided and not empty.

        - The `externalCode` must not already exist for another area in the same company.'
      operationId: AreaPublicController_create_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAreaPublicRequestDto'
            examples:
              basic:
                summary: Area with required fields only
                value:
                  name: Produto Digital
                  externalCode: A-F98
                  similarity: ACCOUNTING
              full:
                summary: Area with all fields (nested OU/CC by uuid)
                value:
                  name: Produto Digital
                  externalCode: A-F98
                  similarity: PRODUCT
                  description: Área de produto
                  organizationUnit:
                    uuid: 550e8400-e29b-41d4-a716-446655440001
                  costCenter:
                    uuid: 550e8400-e29b-41d4-a716-446655440002
              byExternalCode:
                summary: Nested OU/CC by externalCode only
                value:
                  name: Produto Digital
                  externalCode: A-F99
                  similarity: ACCOUNTING
                  organizationUnit:
                    externalCode: OU-001
                  costCenter:
                    externalCode: CC-001
      responses:
        '201':
          description: The area has been successfully created.
          content:
            application/json:
              example:
                result:
                  uuid: 550e8400-e29b-41d4-a716-446655440000
        '400':
          description: Bad Request - Validation errors
          content:
            application/json:
              example:
                statusCode: 400
                timestamp: '2026-02-10T12:00:00.000Z'
                path: /os/v1/areas
                method: POST
                title: BadRequestException
                message: Validation failed
                errors:
                - code: ValidationError
                  target: name
                  message: name should not be empty
        '401':
          description: Unauthorized - Invalid or missing token
          content:
            application/json:
              example:
                statusCode: 401
                timestamp: '2026-05-25T17:24:50.391Z'
                path: /os/v1/areas
                method: POST
                title: UnauthorizedException
                message: Unauthorized
                errors:
                - code: UnauthorizedException
                  target: UnauthorizedException
                  message: Unauthorized
        '409':
          description: Conflict - area with the same external code already exists
          content:
            application/json:
              example:
                statusCode: 409
                timestamp: '2026-02-10T12:00:00.000Z'
                path: /os/v1/areas
                method: POST
                title: ConflictException
                message: An area with this external code already exists in the company
                errors:
                - code: AREA_ALREADY_EXISTS
                  target: externalCode
                  message: An area with this external code already exists in the company
        '422':
          description: Unprocessable Entity - cost center or department reference not found (by uuid or external code)
          content:
            application/json:
              example:
                statusCode: 422
                timestamp: '2026-02-10T12:00:00.000Z'
                path: /os/v1/areas
                method: POST
                title: UnprocessableEntityException
                message: cost-center with external code CC-UNKNOWN not found
                errors:
                - code: UnprocessableEntityException
                  message: cost-center with external code CC-UNKNOWN not found
        '500':
          description: Internal Server Error - Unexpected failure
          content:
            application/json:
              example:
                statusCode: 500
                timestamp: '2026-05-25T17:24:50.391Z'
                path: /os/v1/areas
                method: POST
                title: InternalServerErrorException
                message: Unexpected error occurred
                errors:
                - code: UnprocessableEntityException
                  target: Server
                  message: An unexpected error occurred. Please try again later.
      security:
      - bearer: []
      - central-company-id: []
      - company-uuid: []
      summary: Create a new area
      tags:
      - Area
  /os/v1/areas/external/{externalCode}:
    put:
      description: 'Updates an area identified by `externalCode` in the URL.


        **Business Rules:**

        - `name`: Required. Maximum 300 characters.

        - `externalCode`: Required. Maximum 50 characters. Must be unique within the company (must not match another area''s code).

        - `similarity`: Required. Must be a valid area similarity value.

        - `description`: Optional. Maximum 900 characters.

        - `organizationUnit`: Optional. If provided, identify the department by `uuid` and/or `externalCode` (at least one). If both are sent, `uuid` is used for lookup.

        - `costCenter`: Optional. If provided, identify the cost center by `uuid` and/or `externalCode` (at least one). If both are sent, `uuid` is used for lookup.


        **Validation:**

        - All required fields must be provided and not empty.

        - The area identified by `externalCode` in the URL must exist for the company.


        **Errors (HTTP):**

        - `404` when no area matches the URL `externalCode` for the company.

        - `422` when a nested cost center or organization unit reference cannot be resolved.

        - `500` for any other unexpected failure (generic `Internal server error` response).'
      operationId: AreaPublicController_update_v1
      parameters:
      - name: externalCode
        required: true
        in: path
        description: External code of the area to update
        schema:
          example: A-F99-51
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAreaPublicRequestDto'
            examples:
              basic:
                summary: Area with required fields only
                value:
                  name: Produto Digital
                  externalCode: A-F98
                  similarity: ACCOUNTING
              full:
                summary: Area with all fields (nested OU/CC by uuid)
                value:
                  name: Produto Digital
                  externalCode: A-F98
                  similarity: PRODUCT
                  description: Área de produto
                  organizationUnit:
                    uuid: 550e8400-e29b-41d4-a716-446655440001
                  costCenter:
                    uuid: 550e8400-e29b-41d4-a716-446655440002
              byExternalCode:
                summary: Nested OU/CC by externalCode only
                value:
                  name: Produto Digital
                  externalCode: A-F99
                  similarity: ACCOUNTING
                  organizationUnit:
                    externalCode: OU-001
                  costCenter:
                    externalCode: CC-001
      responses:
        '200':
          description: The area has been successfully updated.
          content:
            application/json:
              example:
                result:
                  uuid: 550e8400-e29b-41d4-a716-446655440000
        '400':
          description: Bad Request - Validation errors
          content:
            application/json:
              example:
                statusCode: 400
                timestamp: '2026-02-10T12:00:00.000Z'
                path: /os/v1/areas/external/A-F99-51
                method: PUT
                title: BadRequestException
                message: Validation failed
                errors:
                - code: ValidationError
                  target: name
                  message: name should not be empty
        '401':
          description: Unauthorized - Invalid or missing token
          content:
            application/json:
              example:
                statusCode: 401
                timestamp: '2026-05-25T17:24:50.395Z'
                path: /os/v1/areas/external/A-F99-51
                method: PUT
                title: UnauthorizedException
                message: Unauthorized
                errors:
                - code: UnauthorizedException
                  target: UnauthorizedException
                  message: Unauthorized
        '404':
          description: Not Found - no area for the company matches the externalCode in the URL (AreaNotFoundError)
          content:
            application/json:
              example:
                statusCode: 404
                timestamp: '2026-02-10T12:00:00.000Z'
                path: /os/v1/areas/external/A-F99-51
                method: PUT
                title: NotFoundException
                message: The area with the provided external code was not found
                errors:
                - code: NotFoundException
                  message: The area with the provided external code was not found
        '422':
          description: Unprocessable Entity - cost center or department reference not found (by uuid or external code)
          content:
            application/json:
              example:
                statusCode: 422
                timestamp: '2026-02-10T12:00:00.000Z'
                path: /os/v1/areas/external/A-F99-51
                method: PUT
                title: UnprocessableEntityException
                message: cost-center with external code CC-UNKNOWN not found
                errors:
                - code: UnprocessableEntityException
                  message: cost-center with external code CC-UNKNOWN not found
        '500':
          description: Internal Server Error - Unexpected failure
          content:
            application/json:
              example:
                statusCode: 500
                timestamp: '2026-05-25T17:24:50.393Z'
                path: /os/v1/areas/external/A-F99-51
                method: PUT
                title: InternalServerErrorException
                message: Unexpected error occurred
                errors:
                - code: UnprocessableEntityException
                  target: Server
                  message: An unexpected error occurred. Please try again later.
      security:
      - bearer: []
      - central-company-id: []
      - company-uuid: []
      summary: Update an existing area
      tags:
      - Area
    delete:
      description: 'Deletes an area by its external code.


        An area cannot be deleted if it has active relationships with position(s)'
      operationId: AreaPublicController_deleteByExternalCode_v1
      parameters:
      - name: externalCode
        required: true
        in: path
        description: The external code of the area to be deleted
        schema:
          type: string
          maxLength: 50
      responses:
        '204':
          description: Area successfully deleted
        '401':
          description: Unauthorized - Invalid or missing token
          content:
            application/json:
              example:
                statusCode: 401
                timestamp: '2026-05-25T17:24:50.395Z'
                path: /v1/resource
                method: GET
                title: UnauthorizedException
                message: Unauthorized
                errors:
                - code: UnauthorizedException
                  target: UnauthorizedException
                  message: Unauthorized
        '404':
          description: Not Found - Area not found
          content:
            application/json:
              example:
                statusCode: 404
                timestamp: '2025-05-29T21:00:00.000Z'
                path: /os/v1/areas/external/{externalCode}
                method: DELETE
                title: NotFoundException
                message: Area with external code AREA-000 not found
                errors:
                - code: NOT_FOUND
                  target: NotFoundException
                  message: Area with external code AREA-000 not found
        '409':
          description: Conflict - Area has active position relationships
          content:
            application/json:
              example:
                statusCode: 409
                timestamp: '2025-05-29T21:00:00.000Z'
                path: /os/v1/areas/external/{externalCode}
                method: DELETE
                title: ConflictException
                message: The area cannot be deleted because it has active relationships with 1 position(s)
                errors:
                - code: AREA_HAS_ACTIVE_POSITION_RELATIONSHIPS
                  target: ConflictException
                  message: The area cannot be deleted because it has active relationships with 1 position(s)
        '500':
          description: Internal Server Error - Unexpected failure
          content:
            application/json:
              example:
                statusCode: 500
                timestamp: '2026-05-25T17:24:50.395Z'
                path: /v1/resource
                method: GET
                title: InternalServerErrorException
                message: Unexpected error occurred
                errors:
                - code: UnprocessableEntityException
                  target: Server
                  message: An unexpected error occurred. Please try again later.
      security:
      - bearer: []
      - central-company-id: []
      - company-uuid: []
      summary: Delete area by external code
      tags:
      - Area
components:
  schemas:
    CreateAreaPublicRequestDto:
      type: object
      properties:
        name:
          type: string
          maxLength: 300
          description: area name
          example: Produto Digital
        organizationUnit:
          description: Optional department reference by uuid (preferred) and/or externalCode
          allOf:
          - $ref: '#/components/schemas/ExternalCodeOrUuidReferenceDto'
        costCenter:
          description: Optional cost center reference by uuid (preferred) and/or externalCode
          allOf:
          - $ref: '#/components/schemas/ExternalCodeOrUuidReferenceDto'
        similarity:
          enum:
          - ADMINISTRATIVE
          - FINANCIAL
          - AGRONOMY
          - ARCHITECTURE
          - AUDITING
          - QUALITY
          - CUSTOMER_SERVICE
          - COMMERCIAL
          - PURCHASING
          - COMMUNICATION
          - DESIGN
          - MARKETING
          - ACCOUNTING
          - CONTROLLING
          - ENGINEERING
          - MAINTENANCE
          - TECHNICAL_SERVICES
          - LEGAL
          - INNOVATION
          - PRODUCT
          - LOGISTICS
          - OPERATION
          - PROJECTS
          - PROCESSES
          - HUMAN_RESOURCES
          - SECURITY
          - TECHNOLOGY
          type: string
          description: Area Similarity
          example: ACCOUNTING
        externalCode:
          type: string
          maxLength: 50
          description: Area external code
          example: A-F98
        description:
          type: string
          maxLength: 900
          description: Area description
          example: Area Description
      required:
      - name
      - similarity
      - externalCode
    UpdateAreaPublicRequestDto:
      type: object
      properties:
        name:
          type: string
          maxLength: 300
          description: area name
          example: Produto Digital
        organizationUnit:
          description: Optional department reference by uuid (preferred) and/or externalCode
          allOf:
          - $ref: '#/components/schemas/ExternalCodeOrUuidReferenceDto'
        costCenter:
          description: Optional cost center reference by uuid (preferred) and/or externalCode
          allOf:
          - $ref: '#/components/schemas/ExternalCodeOrUuidReferenceDto'
        similarity:
          enum:
          - ADMINISTRATIVE
          - FINANCIAL
          - AGRONOMY
          - ARCHITECTURE
          - AUDITING
          - QUALITY
          - CUSTOMER_SERVICE
          - COMMERCIAL
          - PURCHASING
          - COMMUNICATION
          - DESIGN
          - MARKETING
          - ACCOUNTING
          - CONTROLLING
          - ENGINEERING
          - MAINTENANCE
          - TECHNICAL_SERVICES
          - LEGAL
          - INNOVATION
          - PRODUCT
          - LOGISTICS
          - OPERATION
          - PROJECTS
          - PROCESSES
          - HUMAN_RESOURCES
          - SECURITY
          - TECHNOLOGY
          type: string
          description: Area Similarity
          example: ACCOUNTING
        externalCode:
          type: string
          maxLength: 50
          description: Area external code
          example: A-F98
        description:
          type: string
          maxLength: 900
          description: Area description
          example: Area Description
      required:
      - name
      - similarity
      - externalCode
    ExternalCodeOrUuidReferenceDto:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          description: Entity UUID within the company
        externalCode:
          type: string
          maxLength: 50
          description: External code identifying the entity within the company
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
x-provenance:
  method: searched
  source: https://developers.gupy.io/reference
  harvested: '2026-12-03'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://developers.gupy.io/reference/areapubliccontroller_create_v1.md
  - https://developers.gupy.io/reference/areapubliccontroller_deletebyexternalcode_v1.md
  - https://developers.gupy.io/reference/areapubliccontroller_listallareas_v1.md
  - https://developers.gupy.io/reference/areapubliccontroller_update_v1.md
  - https://developers.gupy.io/reference/costcenterpubliccontroller_create_v1.md
  - https://developers.gupy.io/reference/costcenterpubliccontroller_deletecostcenter_v1.md
  - https://developers.gupy.io/reference/costcenterpubliccontroller_findcostcenterbyuuid_v1.md
  - https://developers.gupy.io/reference/costcenterpubliccontroller_findcostcenters_v1.md
  - https://developers.gupy.io/reference/costcenterpubliccontroller_update_v1.md
  - https://developers.gupy.io/reference/operationunitpubliccontroller_create_v1.md
  - https://developers.gupy.io/reference/operationunitpubliccontroller_deletebyexternalcode_v1.md
  - https://developers.gupy.io/reference/operationunitpubliccontroller_listalloperationunits_v1.md
  - https://developers.gupy.io/reference/operationunitpubliccontroller_updatebyexternalcode_v1.md
  - https://developers.gupy.io/reference/organizationunitpubliccontroller_create_v1.md
  - https://developers.gupy.io/reference/organizationunitpubliccontroller_deletedepartment_v1.md
  - https://developers.gupy.io/reference/organizationunitpubliccontroller_findorganizationunitbyuuid_v1.md
  - https://developers.gupy.io/reference/organizationunitpubliccontroller_findorganizationunits_v1.md
  - https://developers.gupy.io/reference/organizationunitpubliccontroller_update_v1.md
  - https://developers.gupy.io/reference/positionpubliccontroller_create_v1.md
  - https://developers.gupy.io/reference/positionpubliccontroller_createbatch_v1.md
  - https://developers.gupy.io/reference/positionpubliccontroller_createpositionreplication_v1.md
  - https://developers.gupy.io/reference/positionpubliccontroller_deleteposition_v1.md
  - https://developers.gupy.io/reference/positionpubliccontroller_deletepositionbyemployee_v1.md
  - https://developers.gupy.io/reference/positionpubliccontroller_findpositions_v1.md
  - https://developers.gupy.io/reference/positionpubliccontroller_updateposition_v1.md
  - https://developers.gupy.io/reference/positionpubliccontroller_updatepositionbyemployee_v1.md
  - https://developers.gupy.io/reference/rolepubliccontroller_create_v1.md
  - https://developers.gupy.io/reference/rolepubliccontroller_delete_v1.md
  - https://developers.gupy.io/reference/rolepubliccontroller_listroles_v1.md
  - https://developers.gupy.io/reference/rolepubliccontroller_update_v1.md
  merge:
    pages: 30
    deduped: 67
    conflicts_kept_first: 0