POST /files
Parameters
Parameter | Type | Description |
---|---|---|
|
| File content |
|
| File category. This is to mark the usage of the attachments. For now the possible reasons are 'intake_attachment', 'user_consent', 'user_avatar', 'user_document' |
|
| The token of the user who is uploading the file. They will be considered the file owner. |
Intake_attachment file type - these are per-visit files and will only be visible on the visit page.
User_document file type - these files (documents) are per user profile, they will be visible for patients under Documents page and providers also can view it on the patient’s page under Documents tab.
Response
curl -X POST \ https://api.vsee.io/cc/ligeng/api_v3/files \ -H 'X-ApiToken: 4df5b2b7dec8a8c40e142e43c1825502' \ -H 'cache-control: no-cache' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -F file=@/Users/teligeng/Pictures/p878984.jpg \ -F meta.category=user_document { "data": { "id": "5e15d150-19b4-4cbd-b217-332fc71b6977", "name": "p878984.jpg", "size": 40679, "ext": "jpg", "fullpath": "https://api.vsee.io/cc/ligeng/files/view/5e15d150-19b4-4cbd-b217-332fc71b6977?auth_code=e86ceb8b57c91e4db41611f08311a125e2df0b09&time=1578488144", "meta": { "category": "user_document", "target": { "id": "350936", "type": "user" }, "account": { "code": "5c47c63907c44f0486a16e1dc71b6977" } }, "creator": { "id": "350936", "username": "ligeng+trial14+member01@vseelab.com", "email": "ligeng+trial14+member01@vseelab.com", "full_name": "Ligeng Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Name" } } }
POST /files/:id
Modify the document information. For now, only 'name' is allowed to be modified.
Parameters
Parameter | Type | Description |
---|---|---|
|
| File name |
Response
curl -X POST \ https://api.vsee.io/cc/ligeng/api_v3/files/5e1598e7-4118-47ca-84da-0923c71b6977 \ -H 'X-ApiToken: 466c809667919d34d371d4c7d389392b' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -F name=test2.jpg { "data": { "id": "5e1598e7-4118-47ca-84da-0923c71b6977", "name": "test2.jpg", "size": 184259, "ext": "jpg", "fullpath": "https:\/\/api.vsee.io\/cc\/ligeng\/files\/view\/5e1598e7-4118-47ca-84da-0923c71b6977?auth_code=ed7e17f29a56cc8c4b2fec812a07e7d30f322b85&time=1579496452", "meta": { "target": { "id": "350936", "type": "user" }, "category": "user_document", "account": { "code": "5c47c63907c44f0486a16e1dc71b6977" } }, "created": 1578473704 } }
DELETE /files/:id
Parameters
Parameter | Type | Description |
---|---|---|
|
| File id |
Response
curl -X DELETE -H "X-ApiToken: c18e9874dccd26482e191f3d7b57d3d8" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "file=@" "https://api.vsee.me/api_v3/files/57aa6ede-bf6c-4a88-81e1-6bcdac1f0144" -k { "data": true }
GET /files
Retrieve file list
Parameters
Parameter | Type | Description |
---|---|---|
|
| The id of the target which is related to the files. Should be equal to user_id if target_type is user or visit_id if target_type is visit. |
|
| The file of the target which is related to the files. For now the possible values are 'user' and 'visit' |
|
| The category type of this file. For now the possible reasons are 'user_document', 'intake_attachment', 'user_consent', 'user_avatar'. |
include_shared |
| Include this param will get all the files that tagged user_document and notes files that shared to the user. |
Response
curl --location --request GET \ > 'https://api-vclinic.vsee.me/api_v3/files?target_id=2317820300&target_type=user' \ > --header 'X-AccountCode: vclinic' --header 'X-ApiToken: vclinic_api_key' { "data": [ { "created": 1657668358, "creator": { "full_name": "Patient's Name", "type": 200, "username": "62ce09a2940adc6474" }, "ext": "pdf", "fullpath": "https://api-vclinic.vsee.me/files/view/62ce0306-bd68-8fj3-7771-6dfc0ks8219474?auth_code=bb7e2d413f9jd93unf92u4e35584d10&time=1669924552", "id": "62ce0306-bd68-8fj3-7771-6dfc0ks8219474", "is_deletable": true, "meta": { "account": { "code": "vclinic" }, "category": "user_document", "target": { "id": "2317820300", "type": "user" }, "visible": true }, "name": "2017-01-21 04:00:00 - filename.pdf", "size": 274988 } ] }
GET /files/:id
Retrieve file info
Parameters
Parameter | Type | Description |
---|---|---|
|
| File id |
|
| Auth code returned by other API method |
|
| Timestamp as returned by other API method |
|
| (optional) Resized image dimensions in {W}x{H} format. Example: 320x240. If the file is not image, this parameter will be ignored. Resized Image is always PNG format, Content-type: image/png header will be set in response |
Response
curl -X GET "https://api.vsee.me/api_v3/files/57e8c9a2-5c30-4b2c-b9d0-11d6ac1f0144?auth_code=01f72b633c40c9c272f9dc73a87f1bc66694ee31&time=1475236382&size=320x480" -k Binary object