Attachments

An attachment represents a successfully uploaded file that may or may not be associated with an candidate.

Relationships:

  • Candidate to Attachment is 1-Many

Create an attachment

POST https://endorsed.ai/api/v1/attachments

Creates a new attachment through a file upload and returns the attachment's UUID id. Parameters are shown as a Body but are accepted as FormData for Content-Type of multipart/form-data and request body for Content-Type of application/json.

Headers

Request Body

{
  "is_error": false,
  "result": {
    "id": "44e40fec-6144-4c86-b71a-857fb1c2c625"
  }
}

Examples:

curl -X POST "${BASE_URL}/api/v1/attachments" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
  "remote_id": "remote-id_from-originating-system",
  "type": "resume",
  "public_file_url": "https://file-hosting-domain.com/public-example-file-name.pdf",
  "file_name": "public-example-file-name.pdf",
  "candidate_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}'

Get an existing attachment

GET https://endorsed.ai/api/v1/attachments/{id}

Get an existing attachment by it's UUID id or by a remote id. Remote ids MUST be structured by remote.<id>

Path Parameters

Headers

{
  "is_error": false,
  "result": {
    "id": "44e40fec-6144-4c86-b71a-857fb1c2c625",
    "remote_id": "remote-id_from-originating-system",
    "type": "resume",
    "file_name": "resume-file.pdf",
    "candidate_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "ephemeral_url": "https://endorsed.ai/raw_attachments_url/551924a1-9490-4799-b850-f9e5d4ed4225.pdf",
    "created_at": "2023-09-25T22:06:01.000Z",
    "modified_at": "2023-09-25T22:06:01.000Z"
  }
}

Examples:

curl -X GET "${BASE_URL}/api/v1/attachments/remote.remote-id_from-originating-system" \
-H "Authorization: Bearer ${ACCESS_TOKEN}"

Update or Upsert an attachment

PUT https://endorsed.ai/api/v1/attachments/{id}

Updates or Upserts a new attachment through a file upload and returns the attachment's UUID id or remote id. Remote ids MUST be structured by remote.<id>.

Parameters are shown as a Body but are accepted as FormData for Content-Type of multipart/form-data and request body for Content-Type of application/json.

Path Parameters

Headers

Request Body

{
  "is_error": false,
  "result": {
    "id": "44e40fec-6144-4c86-b71a-857fb1c2c625"
  }
}

Examples:

curl -X PUT "${BASE_URL}/api/v1/attachments/44e40fec-6144-4c86-b71a-857fb1c2c625" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
  "remote_id": "remote-id_from-originating-system",
  "type": "resume",
  "public_file_url": "https://file-hosting-domain.com/public-example-file-name.pdf",
  "file_name": "public-example-file-name.pdf",
  "candidate_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}'

Delete an existing attachment

DELETE https://endorsed.ai/api/v1/attachments/{id}

Delete an existing attachment (metadata & file) by it's UUID id.

Path Parameters

Headers

{
  "is_error": false,
  "result": {
    "id": "44e40fec-6144-4c86-b71a-857fb1c2c625"
  }
}

Examples:

curl -X DELETE "${BASE_URL}/api/v1/attachments/44e40fec-6144-4c86-b71a-857fb1c2c625" \
-H "Authorization: Bearer ${ACCESS_TOKEN}"

Last updated

© 2024 Endorsed