Attachments
Discard an open attachment
DELETE/api/v1/attachments/{id}
Deletes an open attachment you no longer want (the wrong office or patient, or a payer that stopped taking attachments), with its documents and their images. A payer request it was answering can then be answered again, and the claim it was made for notes it on its timeline. A closed attachment cannot be discarded (409), nor one on a claim (take it off the claim first, 409), nor one being closed (409). Discarding one that is already gone is not found. Needs a key with submit.
Needs a key with submit permission.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | required | An attachment ID (att_...). |
Response
The attachment that was discarded. Status 200.
| Name | Type | Description |
|---|---|---|
| id | string | An ID that starts with att_. |
| object | string | Always `attachment`. |
| deleted | boolean | Always `true`. |
Errors
| HTTP status | Code | What it means |
|---|---|---|
| 401 | UNAUTHORIZED | A valid API key is required. Send it as "Authorization: Bearer <key>". |
| 403 | PERMISSION_DENIED | This API key is not allowed to do that. |
| 404 | NOT_FOUND | Not found. |
| 422 | INVALID_REQUEST | The request is not valid. |
| 504 | TIMEOUT | The request took too long to finish. It may still have taken effect: look it up before sending it again with a new Idempotency-Key. What it made is found with GET /api/v1/eligibility?request_id=<this request_id>, and the same filter on /api/v1/claims and /api/v1/attachments (a key with read permission). |
| 503 | ATTACHMENTS_UNAVAILABLE | Attachments are not available in live mode yet. Use a test key. |
| 502 | ATTACHMENTS_NETWORK_ERROR | The attachment network did not finish. The attachment is still open and nothing was lost: close it again. |
| 409 | CONFLICT | The resource is not in a state that allows this, or it changed while the request was handled. Read it, then decide whether to send the request again. |
| 500 | INTERNAL | Something went wrong on our side. Quote the request ID if you contact us. |
Example
Example request
curl -X DELETE "https://sandbox.myclaimhouse.com/api/v1/attachments/att_01JM000000E00800000000003G" \
-H "Authorization: Bearer $CLAIMHOUSE_KEY"Example response: 200
{
"id": "att_01JM000000E00800000000003G",
"object": "attachment",
"deleted": true
}