openapi: 3.0.0 info: title: Capmo REST Organisation Companies Project Change Orders API description: External REST API Documentation for Capmo version: '1.0' contact: {} servers: - url: https://api.capmo.de description: Production tags: - name: Project Change Orders description: '' paths: /api/v1/projects/{projectId}/change-orders: get: description: This can be used to list all project change orders in a paginated response. operationId: getChangeOrdersPaginated parameters: - name: projectId required: true in: path schema: type: string - name: order_by required: false in: query description: Field to order by. It can be any field of the entity. schema: default: server_created_at example: created_at type: string - name: order_direction required: false in: query description: Order direction of the `order_by` field. It can be `asc` or `desc`. schema: default: asc example: asc type: string enum: - asc - desc - name: after required: false in: query description: The last element from the previous page. This is a cursor. It will be returned in the output to be used in the next request. When it is not present, the first page is returned. When it is `null`, there are no more pages. schema: type: string - name: limit required: false in: query description: How many items should be in the output. schema: minimum: 1 maximum: 1000 default: 200 example: 20 type: number - name: Request-Id in: header description: The HTTP `Request-Id` request header is an optional and unofficial HTTP header, used to trace individual HTTP requests from the client to the server and back again. It allows the client and server to correlate each HTTP request. If not provided by the client, the server should generate a unique request ID and include it in the response. schema: {} responses: '200': description: The project change orders have been successfully retrieved. content: application/json: schema: type: object properties: message: type: string example: Success data: allOf: - $ref: '#/components/schemas/PaginatedOutputDto' - properties: items: type: array items: $ref: '#/components/schemas/ReadChangeOrderDto' '400': description: Bad request, Invalid input content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#bad-request message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: BAD_REQUEST message: type: string example: Bad request '401': description: Unauthorized content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#unauthorized message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: UNAUTHORIZED message: type: string example: Unauthorized '403': description: Forbidden content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#forbidden message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: FORBIDDEN message: type: string example: Forbidden '404': description: Object not found content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#not-found message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: NOT_FOUND message: type: string example: Object not found '409': description: Conflict content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#conflict message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: CONFLICT message: type: string example: Conflict '500': description: Internal server error content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#internal-server-error message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: INTERNAL_SERVER_ERROR message: type: string example: Internal server error security: - CapmoAuth: [] summary: '' tags: - Project Change Orders post: description: This can be used to create a new project change order. operationId: createChangeOrder parameters: - name: projectId required: true in: path schema: type: string - name: Request-Id in: header description: The HTTP `Request-Id` request header is an optional and unofficial HTTP header, used to trace individual HTTP requests from the client to the server and back again. It allows the client and server to correlate each HTTP request. If not provided by the client, the server should generate a unique request ID and include it in the response. schema: {} requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateChangeOrderDto' responses: '201': description: The project change order has been successfully created. content: application/json: schema: type: object properties: message: type: string example: Success data: $ref: '#/components/schemas/ReadChangeOrderDto' '400': description: Bad request, Invalid input content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#bad-request message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: BAD_REQUEST message: type: string example: Bad request '401': description: Unauthorized content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#unauthorized message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: UNAUTHORIZED message: type: string example: Unauthorized '403': description: Forbidden content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#forbidden message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: FORBIDDEN message: type: string example: Forbidden '404': description: Object not found content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#not-found message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: NOT_FOUND message: type: string example: Object not found '409': description: Conflict content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#conflict message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: CONFLICT message: type: string example: Conflict '500': description: Internal server error content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#internal-server-error message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: INTERNAL_SERVER_ERROR message: type: string example: Internal server error security: - CapmoAuth: [] summary: '' tags: - Project Change Orders /api/v1/projects/{projectId}/change-orders/steps: get: description: This can be used to list all available workflow steps for change orders in a project. operationId: getChangeOrderSteps parameters: - name: projectId required: true in: path schema: type: string - name: Request-Id in: header description: The HTTP `Request-Id` request header is an optional and unofficial HTTP header, used to trace individual HTTP requests from the client to the server and back again. It allows the client and server to correlate each HTTP request. If not provided by the client, the server should generate a unique request ID and include it in the response. schema: {} responses: '200': description: The change order steps have been successfully retrieved. content: application/json: schema: type: object properties: message: type: string example: Success data: $ref: '#/components/schemas/ReadChangeOrderStepDto' '400': description: Bad request, Invalid input content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#bad-request message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: BAD_REQUEST message: type: string example: Bad request '401': description: Unauthorized content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#unauthorized message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: UNAUTHORIZED message: type: string example: Unauthorized '403': description: Forbidden content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#forbidden message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: FORBIDDEN message: type: string example: Forbidden '404': description: Object not found content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#not-found message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: NOT_FOUND message: type: string example: Object not found '409': description: Conflict content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#conflict message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: CONFLICT message: type: string example: Conflict '500': description: Internal server error content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#internal-server-error message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: INTERNAL_SERVER_ERROR message: type: string example: Internal server error security: - CapmoAuth: [] summary: '' tags: - Project Change Orders /api/v1/projects/{projectId}/change-orders/{changeOrderId}: get: description: This can be used to get a specific project change order by its ID. operationId: getChangeOrder parameters: - name: projectId required: true in: path schema: type: string - name: changeOrderId required: true in: path schema: type: string - name: Request-Id in: header description: The HTTP `Request-Id` request header is an optional and unofficial HTTP header, used to trace individual HTTP requests from the client to the server and back again. It allows the client and server to correlate each HTTP request. If not provided by the client, the server should generate a unique request ID and include it in the response. schema: {} responses: '200': description: The project change order has been successfully retrieved. content: application/json: schema: type: object properties: message: type: string example: Success data: $ref: '#/components/schemas/ReadChangeOrderDto' '400': description: Bad request, Invalid input content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#bad-request message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: BAD_REQUEST message: type: string example: Bad request '401': description: Unauthorized content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#unauthorized message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: UNAUTHORIZED message: type: string example: Unauthorized '403': description: Forbidden content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#forbidden message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: FORBIDDEN message: type: string example: Forbidden '404': description: Object not found content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#not-found message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: NOT_FOUND message: type: string example: Object not found '409': description: Conflict content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#conflict message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: CONFLICT message: type: string example: Conflict '500': description: Internal server error content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#internal-server-error message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: INTERNAL_SERVER_ERROR message: type: string example: Internal server error security: - CapmoAuth: [] summary: '' tags: - Project Change Orders patch: description: This can be used to update a specific project change order by its ID. operationId: updateChangeOrder parameters: - name: projectId required: true in: path schema: type: string - name: changeOrderId required: true in: path schema: type: string - name: Request-Id in: header description: The HTTP `Request-Id` request header is an optional and unofficial HTTP header, used to trace individual HTTP requests from the client to the server and back again. It allows the client and server to correlate each HTTP request. If not provided by the client, the server should generate a unique request ID and include it in the response. schema: {} requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateChangeOrderDto' responses: '200': description: The project change order has been successfully updated. content: application/json: schema: type: object properties: message: type: string example: Success data: $ref: '#/components/schemas/ReadChangeOrderDto' '400': description: Bad request, Invalid input content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#bad-request message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: BAD_REQUEST message: type: string example: Bad request '401': description: Unauthorized content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#unauthorized message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: UNAUTHORIZED message: type: string example: Unauthorized '403': description: Forbidden content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#forbidden message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: FORBIDDEN message: type: string example: Forbidden '404': description: Object not found content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#not-found message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: NOT_FOUND message: type: string example: Object not found '409': description: Conflict content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#conflict message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: CONFLICT message: type: string example: Conflict '500': description: Internal server error content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#internal-server-error message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: INTERNAL_SERVER_ERROR message: type: string example: Internal server error security: - CapmoAuth: [] summary: '' tags: - Project Change Orders delete: description: This can be used to delete a specific project change order by its ID. operationId: deleteChangeOrder parameters: - name: projectId required: true in: path schema: type: string - name: changeOrderId required: true in: path schema: type: string - name: Request-Id in: header description: The HTTP `Request-Id` request header is an optional and unofficial HTTP header, used to trace individual HTTP requests from the client to the server and back again. It allows the client and server to correlate each HTTP request. If not provided by the client, the server should generate a unique request ID and include it in the response. schema: {} responses: '200': description: The project change order has been successfully deleted. '400': description: Bad request, Invalid input content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#bad-request message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: BAD_REQUEST message: type: string example: Bad request '401': description: Unauthorized content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#unauthorized message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: UNAUTHORIZED message: type: string example: Unauthorized '403': description: Forbidden content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#forbidden message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: FORBIDDEN message: type: string example: Forbidden '404': description: Object not found content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#not-found message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: NOT_FOUND message: type: string example: Object not found '409': description: Conflict content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#conflict message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: CONFLICT message: type: string example: Conflict '500': description: Internal server error content: application/json: schema: type: object properties: type: type: string example: https://capmoapi.readme.io/reference/errors#internal-server-error message: type: string example: An error occurred errors: type: array items: type: object properties: code: type: string example: INTERNAL_SERVER_ERROR message: type: string example: Internal server error security: - CapmoAuth: [] summary: '' tags: - Project Change Orders components: schemas: UpdateChangeOrderDto: type: object properties: name: type: string example: Fix plumbing issue description: The display name of the change order. order_number: type: string nullable: true example: CO-001 description: The order number. reason_for_change: type: string nullable: true example: Design change description: The reason for change. project_categories: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Category IDs. type: array items: type: string change_order_type: nullable: true example: - VOBB_2_5 description: The change order type (VOBB enum). type: array items: type: string bill_of_quantities: type: string nullable: true example: BoQ-001 description: Bill of quantities reference. project_companies: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Company IDs. type: array items: type: string probability: nullable: true example: - medium description: Probability assessment. type: array items: type: string assignee: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Assignee IDs. type: array items: type: string cost: type: number nullable: true example: 5000 description: Cost value. is_completed: type: boolean nullable: true example: false description: Completion flag. description: type: string nullable: true example: Detailed description description: Rich text description. step_id: type: string nullable: true example: 123e4567-e89b-12d3-a456-426614174000 description: The step ID to place the change order in. PaginatedOutputDto: type: object properties: after: type: string example: null count: type: number example: 1 total: type: number example: 1 required: - after - count - total ReadChangeOrderStepDto: type: object properties: id: type: string example: 123e4567-e89b-12d3-a456-426614174000 description: Unique ID of the step. name: type: string example: Draft description: The display name of the step. type: type: string example: TO_DO description: The type of the step (TO_DO, IN_PROGRESS, DONE). position: type: number example: 0 description: The position of the step within the workflow. required: - id - name - type - position ReadChangeOrderDto: type: object properties: created_by: type: string nullable: true example: 123e4567-e89b-12d3-a456-426614174000 description: The unique identifier of the creator of the entity. updated_by: type: string example: 123e4567-e89b-12d3-a456-426614174000 nullable: true description: The unique identifier of the last user who updated the entity. created_at: type: string format: date-time example: '2021-07-01T00:00:00.000Z' description: The date when the entity was created (on the client). updated_at: type: string format: date-time example: '2021-07-01T00:00:00.000Z' description: The date when the entity was last updated (on the client). deleted_at: type: string nullable: true format: date-time example: '2021-07-01T00:00:00.000Z' description: The date when the entity was deleted (on the client). server_created_at: type: string format: date-time example: '2021-07-01T00:00:00.000Z' description: The date when the entity was created (on the server). server_updated_at: type: string format: date-time example: '2021-07-01T00:00:00.000Z' description: The date when the entity was last updated (on the server). server_deleted_at: type: string nullable: true format: date-time example: '2021-07-01T00:00:00.000Z' description: The date when the entity was deleted (on the server). id: type: string example: 123e4567-e89b-12d3-a456-426614174000 description: Unique ID of the change order. project_id: type: string example: 123e4567-e89b-12d3-a456-426614174000 description: The ID of the project this change order belongs to. workflow_id: type: string example: 123e4567-e89b-12d3-a456-426614174000 description: The ID of the workflow this change order belongs to. step_id: type: string example: 123e4567-e89b-12d3-a456-426614174000 description: The ID of the current step. name: type: string example: Fix plumbing issue description: The display name of the change order. key: type: number example: 1 description: Unique sequential key within the workflow. position: type: number example: 0 description: Position within the current step. order_number: type: string nullable: true example: CO-001 description: The order number. reason_for_change: type: string nullable: true example: Design change description: The reason for change. project_categories: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Category IDs. type: array items: type: string change_order_type: nullable: true example: - VOBB_2_5 description: The change order type (VOBB enum). type: array items: type: string bill_of_quantities: type: string nullable: true example: BoQ-001 description: Bill of quantities reference. project_companies: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Company IDs. type: array items: type: string probability: nullable: true example: - medium description: Probability assessment. type: array items: type: string assignee: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Assignee IDs. type: array items: type: string cost: type: number nullable: true example: 5000 description: Cost value. is_completed: type: boolean nullable: true example: false description: Completion flag. description: type: string nullable: true example: Detailed description of the change order. description: Rich text description. required: - created_by - updated_by - created_at - updated_at - deleted_at - server_created_at - server_updated_at - server_deleted_at - id - project_id - workflow_id - step_id - name - key - position - order_number - reason_for_change - project_categories - change_order_type - bill_of_quantities - project_companies - probability - assignee - cost - is_completed - description CreateChangeOrderDto: type: object properties: name: type: string example: Fix plumbing issue description: The display name of the change order. order_number: type: string nullable: true example: CO-001 description: The order number. reason_for_change: type: string nullable: true example: Design change description: The reason for change. project_categories: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Category IDs. type: array items: type: string change_order_type: nullable: true example: - VOBB_2_5 description: The change order type (VOBB enum). type: array items: type: string bill_of_quantities: type: string nullable: true example: BoQ-001 description: Bill of quantities reference. project_companies: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Company IDs. type: array items: type: string probability: nullable: true example: - medium description: Probability assessment. type: array items: type: string assignee: nullable: true example: - 123e4567-e89b-12d3-a456-426614174000 - 123e4567-e89b-12d3-a456-426614174001 - 123e4567-e89b-12d3-a456-426614174002 description: Assignee IDs. type: array items: type: string cost: type: number nullable: true example: 5000 description: Cost value. is_completed: type: boolean nullable: true example: false description: Completion flag. description: type: string nullable: true example: Detailed description description: Rich text description. step_id: type: string nullable: true example: 123e4567-e89b-12d3-a456-426614174000 description: The step ID to place the change order in. required: - name securitySchemes: CapmoAuth: type: apiKey in: header name: Authorization description: 'For authentication, use the custom prefix followed by a space and then your API key. Example: "Capmo YOUR_API_KEY".' x-readme: headers: - key: Request-Id value: YOUR_REQUEST_ID