COR

COR Contacts API

The Contacts API from COR — 3 operation(s) for contacts.

OpenAPI Specification

cor-contacts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: COR Attachments Contacts 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: Contacts
paths:
  /contacts:
    get:
      tags:
      - Contacts
      summary: Get contacts
      description: Retrieves a paginated list of contacts. 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).'
      responses:
        '200':
          description: Paginated list of contacts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedContactsResponse'
  /contacts/{id}:
    get:
      tags:
      - Contacts
      summary: Get contact by ID
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Contact details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
  /contacts/search-by-name/{name}:
    get:
      tags:
      - Contacts
      summary: Get contact by name
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Contact details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
components:
  schemas:
    PaginatedContactsResponse:
      type: object
      description: Paginated response for contacts list
      properties:
        total:
          type:
          - string
          - integer
          description: Total number of contacts
        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 contacts for the current page
          items:
            $ref: '#/components/schemas/Contact'
    Contact:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      scheme: basic