Gupy Cost Center API
The Cost Center API from Gupy, for cost center.
The Cost Center API from Gupy, for cost center.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/gupy:gupy-cost-center-api"
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.
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: 3.2.0
info:
title: Gupy Admin Global Cost Center 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: Cost Center
paths:
/os/v1/cost-centers:
get:
description: Retrieves a paginated list of cost centers with optional filtering by name and external code.
operationId: CostCenterPublicController_findCostCenters_v1
parameters:
- name: name
required: false
in: query
description: Cost center name to filter (partial match)
schema:
example: Technology
type: string
- name: externalCode
required: false
in: query
description: Cost center external code to filter (exact match)
schema:
example: CC-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: Cost centers retrieved successfully
content:
application/json:
example:
result:
data:
- uuid: d20dc017-80c6-4706-bbfe-549c1cc4d2c1
name: Technology Cost Center
externalCode: CC-001
description: Cost center for technology department
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/cost-centers
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/cost-centers
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-02-18T19:21:54.427Z'
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-02-18T19:21:54.427Z'
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 cost centers with filtering and pagination
tags:
- Cost Center
post:
description: 'Creates a new cost center with the provided data.
**Business Rules:**
• External code must be unique within the company
• Name is required and must not exceed 255 characters
• External code is required and must not exceed 100 characters
• Description is optional and must not exceed 1000 characters'
operationId: CostCenterPublicController_create_v1
parameters: []
requestBody:
required: true
description: 'Cost center creation data with required fields: name, externalCode. Optional fields include: description.'
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCostCenterRequestDto'
responses:
'201':
description: Cost center successfully created
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/ApiResponseDto'
- properties:
result:
$ref: '#/components/schemas/CostCenterResponseDto'
'400':
description: Bad Request - Invalid input data
content:
application/json:
examples:
emptyBody:
summary: Empty request body
value:
statusCode: 400
timestamp: '2025-05-29T21:00:00.000Z'
path: /v1/cost-centers
method: POST
title: BadRequestException
message: name must be shorter than or equal to 300 characters, name should not be empty, externalCode must be shorter than or equal to 50 characters, externalCode should not be empty
errors:
- code: BadRequestException
target: ValidationPipe
message: name must be shorter than or equal to 300 characters, name should not be empty, externalCode must be shorter than or equal to 50 characters, externalCode should not be empty
fieldsSizeLimit:
summary: Fields exceed size limit
value:
statusCode: 400
timestamp: '2025-05-29T21:00:00.000Z'
path: /v1/cost-centers
method: POST
title: BadRequestException
message: name must be shorter than or equal to 300 characters, externalCode must be shorter than or equal to 50 characters, description must be shorter than or equal to 900 characters
errors:
- code: BadRequestException
target: ValidationPipe
message: name must be shorter than or equal to 300 characters, externalCode must be shorter than or equal to 50 characters, description must be shorter than or equal to 900 characters
'401':
description: Unauthorized - Invalid or missing token
content:
application/json:
example:
statusCode: 401
timestamp: '2026-02-18T19:21:54.422Z'
path: /v1/cost-centers
method: POST
title: UnauthorizedException
message: Unauthorized
errors:
- code: UnauthorizedException
target: UnauthorizedException
message: Unauthorized
'409':
description: Conflict - A cost center with this external code already exists
content:
application/json:
example:
statusCode: 409
timestamp: '2025-05-29T21:00:00.000Z'
path: /v1/cost-centers
method: POST
title: ConflictException
message: A cost center with this external code already exists in the company
errors:
- code: COST_CENTER_ALREADY_EXISTS
target: ConflictException
message: A cost center with this external code already exists in the company
'500':
description: Internal Server Error - Unexpected failure
content:
application/json:
example:
statusCode: 500
timestamp: '2026-02-18T19:21:54.422Z'
path: /v1/cost-centers
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 cost center
tags:
- Cost Center
/os/v1/cost-centers/uuid/{uuid}:
get:
description: Retrieves a specific cost center by its UUID. Returns 404 if the cost center is not found.
operationId: CostCenterPublicController_findCostCenterByUuid_v1
parameters:
- name: uuid
required: true
in: path
description: Cost center UUID
schema:
format: uuid
example: d20dc017-80c6-4706-bbfe-549c1cc4d2c1
type: string
responses:
'200':
description: Cost center retrieved successfully
content:
application/json:
example:
result:
uuid: d20dc017-80c6-4706-bbfe-549c1cc4d2c1
name: Technology Cost Center
externalCode: CC-001
description: Cost center for technology department
'401':
description: Unauthorized - Invalid or missing token
content:
application/json:
example:
statusCode: 401
timestamp: '2026-02-18T19:21:54.427Z'
path: /v1/resource
method: GET
title: UnauthorizedException
message: Unauthorized
errors:
- code: UnauthorizedException
target: UnauthorizedException
message: Unauthorized
'404':
description: Cost center not found
content:
application/json:
example:
statusCode: 404
timestamp: '2025-05-29T21:00:00.000Z'
path: /os/v1/cost-centers/uuid/d20dc017-80c6-4706-bbfe-549c1cc4d2c1
method: GET
title: NotFoundException
message: Entity with UUID d20dc017-80c6-4706-bbfe-549c1cc4d2c1 not found
errors:
- code: NotFoundException
target: NotFoundException
message: Entity with UUID d20dc017-80c6-4706-bbfe-549c1cc4d2c1 not found
'500':
description: Internal Server Error - Unexpected failure
content:
application/json:
example:
statusCode: 500
timestamp: '2026-02-18T19:21:54.427Z'
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: Get cost center by UUID
tags:
- Cost Center
/os/v1/cost-centers/{externalCode}:
delete:
description: 'Deletes a cost center.
**Business Rules:**
• Cost center cannot be deleted if it is linked to positions
• Cost center cannot be deleted if it is linked to areas
• Cost center cannot be deleted if it is linked to organization units'
operationId: CostCenterPublicController_deleteCostCenter_v1
parameters:
- name: externalCode
required: true
in: path
description: The external code of the cost center to be deleted
schema:
type: string
maxLength: 50
responses:
'204':
description: Cost center successfully deleted
'401':
description: Unauthorized - Invalid or missing token
content:
application/json:
example:
statusCode: 401
timestamp: '2026-02-18T19:21:54.428Z'
path: /v1/resource
method: GET
title: UnauthorizedException
message: Unauthorized
errors:
- code: UnauthorizedException
target: UnauthorizedException
message: Unauthorized
'404':
description: Not Found - Cost center not found
content:
application/json:
example:
statusCode: 404
timestamp: '2025-05-29T21:00:00.000Z'
path: /v1/cost-centers/{externalCode}
method: DELETE
title: NotFoundException
message: The specified cost center was not found
errors:
- code: COST_CENTER_NOT_FOUND
target: NotFoundException
message: The specified cost center was not found
'409':
description: Conflict - Cost center has dependencies (positions, areas, or organization units)
content:
application/json:
example:
statusCode: 409
timestamp: '2025-05-29T21:00:00.000Z'
path: /v1/cost-centers/{externalCode}
method: DELETE
title: ConflictException
message: The cost center cannot be deleted because it is linked to positions, areas, or organization units
errors:
- code: COST_CENTER_HAS_DEPENDENCIES
target: ConflictException
message: The cost center cannot be deleted because it is linked to positions, areas, or organization units
'500':
description: Internal Server Error - Unexpected failure
content:
application/json:
example:
statusCode: 500
timestamp: '2026-02-18T19:21:54.428Z'
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 cost center by external code
tags:
- Cost Center
/os/v1/cost-centers/{uuid}:
put:
operationId: CostCenterPublicController_update_v1
parameters:
- name: uuid
required: true
in: path
description: UUID of the Cost Center to update
schema:
example: d6162ae1-d589-42c5-a185-af279dafcc71
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCostCenterRequestDto'
responses:
'200':
description: The cost center has been successfully updated.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/ApiResponseDto'
- properties:
result:
$ref: '#/components/schemas/UpdatedCostCenterResponseDto'
'400':
description: Bad Request - Invalid input data
content:
application/json:
example:
statusCode: 400
timestamp: '2025-05-29T21:00:00.000Z'
path: /v1/cost-centers/d6162ae1-d589-42c5-a185-af279dafcc71
method: PUT
title: BadRequestException
message: Validation failed
errors:
- code: BadRequestException
target: ValidationPipe
message: externalCode should not be empty
'401':
description: Unauthorized - Invalid or missing token
content:
application/json:
example:
statusCode: 401
timestamp: '2026-02-18T19:21:54.424Z'
path: /v1/cost-centers/d6162ae1-d589-42c5-a185-af279dafcc71
method: PUT
title: UnauthorizedException
message: Unauthorized
errors:
- code: UnauthorizedException
target: UnauthorizedException
message: Unauthorized
'404':
description: Not Found - Cost center not found
content:
application/json:
examples:
costCenterNotFound:
summary: Cost Center not found
value:
statusCode: 404
timestamp: '2026-02-18T19:21:54.424Z'
path: /v1/cost-centers/d6162ae1-d589-42c5-a185-af279dafcc71
method: PUT
title: NotFoundException
message: Entity with UUID d6162ae1-d589-42c5-a185-af279dafcc71 not found
errors:
- code: COST_CENTER_NOT_FOUND
target: NotFoundException
message: Entity with UUID d6162ae1-d589-42c5-a185-af279dafcc71 not found
'500':
description: Internal Server Error - Unexpected failure
content:
application/json:
example:
statusCode: 500
timestamp: '2026-02-18T19:21:54.424Z'
path: /v1/cost-centers/d6162ae1-d589-42c5-a185-af279dafcc71
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 a cost center
tags:
- Cost Center
components:
schemas:
UpdateCostCenterRequestDto:
type: object
properties:
name:
type: string
maxLength: 300
example: CC-001
description: cost center name
description:
type: string
maxLength: 900
example: RH Cost Center
description: cost center description
required:
- name
- description
UpdatedCostCenterResponseDto:
type: object
properties:
uuid:
type: string
description: cost center UUID
format: uuid
name:
type: string
description: cost center name
example: CC-001
externalCode:
type: string
description: cost center external code
example: HR-F98
description:
type: string
description: cost center description
example: RH Cost Center
company:
$ref: '#/components/schemas/CompanyDto'
required:
- uuid
- name
- externalCode
- description
- company
CostCenterResponseDto:
type: object
properties:
uuid:
type: string
description: UUID of the created cost center
format: uuid
required:
- uuid
ApiResponseDto:
type: object
properties:
result:
type: object
description: Result data
path:
type: string
description: Request path
duration:
type: string
description: Request duration
method:
type: string
description: HTTP method used
enum:
- GET
- POST
- PUT
- DELETE
- PATCH
required:
- result
- path
- duration
- method
CreateCostCenterRequestDto:
type: object
properties:
name:
type: string
maxLength: 300
description: cost center name
example: CC-001
externalCode:
type: string
maxLength: 50
description: cost center external code
example: HR-F98
description:
type: string
maxLength: 900
description: cost center description
example: RH Cost Center
required:
- name
- externalCode
- description
CompanyDto:
type: object
properties:
id:
type: string
description: Internal company ID
example: '1'
uuid:
type: string
description: company UUID
format: uuid
centralCompanyId:
type: string
description: central company UUID
format: uuid
name:
type: string
description: company name
example: Gupy
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