COR Contracts API
The Contracts API from COR — 2 operation(s) for contracts.
The Contracts API from COR — 2 operation(s) for contracts.
openapi: 3.1.0
info:
title: COR Attachments Contracts API
description: The COR API lets you integrate with projectcor.com applications using simple HTTP methods, in either XML or JSON formats, making this an ideal API for developing integrations with other softwares, external clients or mobile applications
version: 1.0.0
servers:
- url: https://api.projectcor.com/v1
description: Production server
security:
- bearerAuth: []
tags:
- name: Contracts
paths:
/contracts:
get:
tags:
- Contracts
summary: Get contracts
description: Retrieves a paginated list of contracts.
parameters:
- name: page
in: query
schema:
type:
- integer
- boolean
default: 1
description: 'Page number (default: 1). Set to `false` to disable pagination.'
- name: perPage
in: query
schema:
type: integer
default: 20
description: 'Number of items per page (default: 20).'
- name: filters
in: query
schema:
type: string
description: URL-encoded JSON object with filter criteria.
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/ContractListBodyInput'
responses:
'200':
description: Paginated list of contracts
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedContractsResponse'
/contracts/{contract_id}:
post:
tags:
- Contracts
summary: Create contract
description: Creates a contract using the provided contract identifier.
parameters:
- name: contract_id
in: path
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ContractCreateInput'
responses:
'200':
description: Contract created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Contract'
put:
tags:
- Contracts
summary: Update contract
description: Updates the specified contract.
parameters:
- name: contract_id
in: path
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ContractUpdateInput'
responses:
'200':
description: Contract updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Contract'
delete:
tags:
- Contracts
summary: Delete contract
description: Deletes the specified contract.
parameters:
- name: contract_id
in: path
required: true
schema:
type: integer
responses:
'200':
description: Contract deleted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Contract'
components:
schemas:
Contract:
type: object
description: Contract entity
properties:
id:
type: integer
description: Contract ID
client_id:
type: integer
description: Client ID
json_integrations:
type:
- object
- array
- string
- number
- boolean
- 'null'
description: Integration payload stored as JSON
name:
type: string
description: Contract name
type:
type: string
description: Contract type
source:
type: string
description: Source of the contract
status:
type: string
description: Contract status
company_id:
type: integer
description: Company ID
start:
type: string
format: date-time
description: Contract start date-time
end:
type: string
format: date-time
description: Contract end date-time
frequency:
type: string
description: Contract billing frequency
currency_id:
type: integer
description: Currency ID
currency:
type: object
properties:
id:
type: integer
description: Currency ID
name:
type: string
description: Currency name
url:
type: string
description: External URL
url_name:
type: string
description: External URL name
user_positions_header_id:
type: integer
description: User positions header ID
created_at:
type: string
format: date-time
description: Creation timestamp
updated_at:
type: string
format: date-time
description: Last update timestamp
deleted_at:
type:
- string
- 'null'
format: date-time
description: Deletion timestamp (soft delete)
ContractCreateInput:
type: object
required:
- client_id
- name
- type
- source
- status
- company_id
- start
- end
- frequency
- currency_id
properties:
client_id:
type: integer
description: Client ID
json_integrations:
type:
- object
- array
- string
- number
- boolean
- 'null'
description: Integration payload stored as JSON
name:
type: string
description: Contract name
type:
type: string
description: Contract type
source:
type: string
description: Source of the contract
status:
type: string
description: Contract status
company_id:
type: integer
description: Company ID
start:
type: string
format: date-time
description: Contract start date-time
end:
type: string
format: date-time
description: Contract end date-time
frequency:
type: string
description: Contract billing frequency
currency_id:
type: integer
description: Currency ID
url:
type: string
description: External URL
url_name:
type: string
description: External URL name
user_positions_header_id:
type: integer
description: User positions header ID
ContractListBodyInput:
type: object
properties:
with_milestones:
type: boolean
description: Include milestones in each contract response.
with_ratecards:
type: boolean
description: Include ratecards in each contract response.
with_positions:
type: boolean
description: Include contract positions in each contract response.
status:
type: string
description: Filter contracts by status.
example: expired
type:
type: string
description: Filter contracts by type.
example: time_and_materials
example:
with_milestones: true
with_ratecards: true
with_positions: true
status: expired
type: time_and_materials
ContractUpdateInput:
type: object
properties:
client_id:
type: integer
description: Client ID
json_integrations:
type:
- object
- array
- string
- number
- boolean
- 'null'
description: Integration payload stored as JSON
name:
type: string
description: Contract name
type:
type: string
description: Contract type
source:
type: string
description: Source of the contract
status:
type: string
description: Contract status
company_id:
type: integer
description: Company ID
start:
type: string
format: date-time
description: Contract start date-time
end:
type: string
format: date-time
description: Contract end date-time
frequency:
type: string
description: Contract billing frequency
currency_id:
type: integer
description: Currency ID
url:
type: string
description: External URL
url_name:
type: string
description: External URL name
user_positions_header_id:
type: integer
description: User positions header ID
PaginatedContractsResponse:
type: object
description: Paginated response for contracts list
properties:
total:
type:
- string
- integer
description: Total number of contracts
perPage:
type:
- string
- integer
description: Number of items per page
page:
type:
- string
- integer
description: Current page number
data:
type: array
description: Array of contracts for the current page
items:
$ref: '#/components/schemas/Contract'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
basicAuth:
type: http
scheme: basic