AlayaCare Attachment File API

The Attachment File API from AlayaCare — 2 operation(s) for attachment file.

Operations 8

GET /employees/{employee_id}/attachments/{file_path} Get the content of a file (download a file)
POST /employees/{employee_id}/attachments/{file_path} Upload a file
PUT /employees/{employee_id}/attachments/{file_path} Copy, move or rename a file
DELETE /employees/{employee_id}/attachments/{file_path} Delete a file
GET /employees/by_id/{external_employee_id}/attachments/{file_path} Get the content of a file (download a file)
POST /employees/by_id/{external_employee_id}/attachments/{file_path} Upload a file
PUT /employees/by_id/{external_employee_id}/attachments/{file_path} Copy, move or rename a file
DELETE /employees/by_id/{external_employee_id}/attachments/{file_path} Delete a file

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/alayacare-attachment-file-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API 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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

alayacare-attachment-file-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: External Employee Attachment File API
  version: 1.0.8
  description: "**AlayaCare IDs:**\nThe following terms are used to reference IDs that identify resources in AlayaCare:\n- employee_id\n- contact_id\n\n**External IDs**\nThe following terms are used to reference IDs that identify resources systems external to AlayaCare:\n- external_employee_id\n- external_contact_id\n\nExternal IDs are required to be unique.\nNo other assumptions are made regarding their format they are treated as strings.\n\n**Remarks**\n- All dates must be in ISO 8601 format with timezone data\n\n**Employee Status Considerations**\n- When updating the `status` of an employee to `terminated`, it is possible to add a `comment`. This `comment` is saved as an Employee Note with a `note_type` of type `terminated`.\n- Updating the `status` of an employee will have repercussions in the AlayaCare application. Please refer to this link for more information: \n  https://alayacare.zendesk.com/hc/en-us/articles/360020774691\n"
servers:
- url: https://homecare.alayacare.ca/ext/api/v2/employees
tags:
- name: Attachment File
paths:
  /employees/{employee_id}/attachments/{file_path}:
    parameters:
    - name: employee_id
      in: path
      required: true
      schema:
        type: integer
    - name: file_path
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Attachment File
      summary: Get the content of a file (download a file)
      responses:
        200:
          description: Content of the file
        400:
          description: File not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileNotFoundSchema'
    post:
      tags:
      - Attachment File
      summary: Upload a file
      description: "Upload a file at the `path` location and create the underlying directory structure if it doesn't exist already.\n\n`path` **cannot** end with `/` in order to create a file based on the request body.\n\n**Note:** This consumes `multipart form-data` as defined in the parameters below. \n\n**Note on content attributes:** When specifying the key that references the file, the key must be set as `file` in the request in order for the API to find the file and the file must be attached as well.\n"
      responses:
        201:
          $ref: '#/components/responses/SuccessResponseFileUpload'
        400:
          $ref: '#/components/responses/ErrorResponseFileMissing'
        409:
          $ref: '#/components/responses/ErrorResponseFileAlreadyExists'
        404:
          $ref: '#/components/responses/ErrorResponseEmployeeNotFound'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: The file to upload
                  format: binary
    put:
      tags:
      - Attachment File
      summary: Copy, move or rename a file
      description: 'Copy, move or rename a file.


        The url of the `PUT` request is the path to the source location.


        The payload must indicate whether the intention of the action is to copy, move or rename the file.


        If a file is being copied or moved, the destination is mandatory in the payload.


        i.e., if we have the following directories:

        - `dir1/child1/file1.txt`

        - `dir2/child2/file2.txt`


        and we want to copy `file1.txt` inside `dir2/child2/` (the goal is to have `dir2/child2/file1.txt`), the action to copy must be specified in the payload and must be: `dir2/child2/file1.txt`. The `source` URL request has to be `dir1/child1/file1.txt`.

        '
      responses:
        200:
          $ref: '#/components/responses/SuccessResponseAttachmentFileUpdate'
        400:
          $ref: '#/components/responses/ErrorResponseInvalidFileName'
        404:
          description: Source file not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileNotFoundSchema'
        409:
          $ref: '#/components/responses/ErrorResponseFileAlreadyExists'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachmentAction'
        description: Object with fields to be updated
        required: true
    delete:
      tags:
      - Attachment File
      summary: Delete a file
      description: Delete a file.
      responses:
        204:
          description: File deleted
        404:
          description: File not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileNotFoundSchema'
  /employees/by_id/{external_employee_id}/attachments/{file_path}:
    parameters:
    - name: external_employee_id
      in: path
      required: true
      schema:
        type: string
    - name: file_path
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Attachment File
      summary: Get the content of a file (download a file)
      responses:
        200:
          description: Content of the file
        400:
          description: File not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileNotFoundSchema'
    post:
      tags:
      - Attachment File
      summary: Upload a file
      description: 'Upload a file at the `path` location and create the underlying directory structure if it doesn''t exist already.


        `path` **cannot** end with `/` in order to create a file based on the request body.


        **Note:** This consumes `multipart form-data` as defined in the parameters below.


        **Note on content attributes:** When specifying the key that references the file, the key must be set as `file` in the request in order for the API to find the file and the file must be attached as well.

        '
      responses:
        201:
          $ref: '#/components/responses/SuccessResponseFileUpload'
        400:
          $ref: '#/components/responses/ErrorResponseFileMissing'
        409:
          $ref: '#/components/responses/ErrorResponseFileAlreadyExists'
        404:
          $ref: '#/components/responses/ErrorResponseEmployeeNotFound'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: The file to upload
                  format: binary
    put:
      tags:
      - Attachment File
      summary: Copy, move or rename a file
      description: 'Copy, move or rename a file.


        The url of the `PUT` request is the path to the source location.


        The payload must indicate whether the intention of the action is to copy, move or rename the file.


        If a file is being copied or moved, the destination is mandatory in the payload.


        i.e., if we have the following directories:

        - `dir1/child1/file1.txt`

        - `dir2/child2/file2.txt`


        and we want to copy `file1.txt` inside `dir2/child2/` (the goal is to have `dir2/child2/file1.txt`), the action to copy must be specified in the payload and must be: `dir2/child2/file1.txt`. The `source` URL request has to be `dir1/child1/file1.txt`.

        '
      responses:
        200:
          $ref: '#/components/responses/SuccessResponseAttachmentFileUpdate'
        400:
          $ref: '#/components/responses/ErrorResponseInvalidFileName'
        404:
          description: Source file not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileNotFoundSchema'
        409:
          $ref: '#/components/responses/ErrorResponseFileAlreadyExists'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachmentAction'
        description: Object with fields to be updated
        required: true
    delete:
      tags:
      - Attachment File
      summary: Delete a file
      description: Delete a file.
      responses:
        204:
          description: File deleted
        404:
          description: File not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileNotFoundSchema'
components:
  schemas:
    ErrorResponse:
      description: Error response
      type: object
      properties:
        code:
          type: integer
          description: Response code
        message:
          type: string
          description: Detailed error message
      required:
      - code
      - message
    AttachmentAction:
      description: Attachment actions
      type: object
      properties:
        action:
          type: string
          example: move
          enum:
          - move
          - copy
          - rename
        destination:
          type: string
          example: dir2/child1/
    FileNotFoundSchema:
      type: object
      properties:
        code:
          type: integer
          description: http status response code
          example: 404
        message:
          type: string
          description: Detail on the error
          example: File "/path/file.txt" not found
  responses:
    ErrorResponseFileAlreadyExists:
      description: File already exists.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: http status response code
                example: 409
              message:
                type: string
                description: Detail on the error
                example: File "/path/file.txt" already exists
    ErrorResponseEmployeeNotFound:
      description: Employee not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 404
            message: Employee not found.
    ErrorResponseInvalidFileName:
      description: The file name contains unsupported characters
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: http status response code
                example: 400
              message:
                type: string
                description: Detail on the error
                example: Invalid file name
    SuccessResponseAttachmentFileUpdate:
      description: File copied, moved or renamed
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: http status response code
                example: 200
              name:
                type: string
                description: 'Url to the new location of the copied or move file

                  '
                example: /new_location.txt
    ErrorResponseFileMissing:
      description: File missing
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: http status response code
                example: 400
              message:
                type: string
                description: Detail on the error
                example: Could not find a file to upload
    SuccessResponseFileUpload:
      description: File uploaded
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: http status response code
                example: 201
              name:
                type: string
                description: Url to the file uploaded
                example: Physician Order/file.pdf
  securitySchemes:
    basic_auth:
      type: http
      scheme: basic
      description: Basic HTTP auth over https