openapi: 3.1.0 info: title: COR Attachments Clients 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: Clients paths: /clients: get: tags: - Clients summary: Get clients description: Retrieves a paginated list of clients. By default, responses are paginated with 20 items per page. 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. responses: '200': description: Paginated list of clients content: application/json: schema: $ref: '#/components/schemas/PaginatedClientsResponse' post: tags: - Clients summary: Create a new client requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ClientInput' responses: '200': description: Client created successfully content: application/json: schema: $ref: '#/components/schemas/Client' /clients/{id}: get: tags: - Clients summary: Get client by ID parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Client details content: application/json: schema: $ref: '#/components/schemas/Client' put: tags: - Clients summary: Update client parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ClientInput' responses: '200': description: Client updated successfully content: application/json: schema: $ref: '#/components/schemas/Client' /clients/search-by-name/{name}: get: tags: - Clients summary: Get clients by name parameters: - name: name in: path required: true schema: type: string responses: '200': description: List of clients content: application/json: schema: type: array items: $ref: '#/components/schemas/Client' /clients/{id}/favorite: post: tags: - Clients summary: Set/Unset client as favorite parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object required: - favorited properties: favorited: type: boolean description: Whether to set as favorite responses: '200': description: Favorite status updated components: schemas: Client: type: object properties: id: type: integer name: type: string business_name: type: string name_contact: type: string last_name_contact: type: string email_contact: type: string format: email website: type: string description: type: string condition: type: string phone: type: string ClientInput: type: object required: - name properties: name: type: string description: Name of client business_name: type: string description: Business Name name_contact: type: string description: Contact First name last_name_contact: type: string description: Contact Last name email_contact: type: string format: email description: Contact email website: type: string description: Website description: type: string description: Description or comments condition: type: string description: Client condition phone: type: string description: Phone PaginatedClientsResponse: type: object description: Paginated response for clients list properties: total: type: - string - integer description: Total number of clients perPage: type: integer description: Number of items per page page: type: integer description: Current page number lastPage: type: integer description: Last available page number data: type: array description: Array of clients for the current page items: $ref: '#/components/schemas/Client' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT basicAuth: type: http scheme: basic