Skip to content

Upload a completed document to a client card

Request

Uploads one completed file as multipart form data under the field name file. Requires clients_access and client_files_upload_access. The Location client must match the path. Accepted filename extensions are jpeg, jpg, png, gif, doc, docx, pdf, xls, xlsx, and txt (also uppercase); the file must be smaller than 12 MiB. A successful upload also creates a type: file entry in the client comment history. The response returns the current complete file list, not only the newly uploaded file.

Save a form URL through the client comment endpoint if the form is still being filled out. Call this endpoint with the finished file bytes when the document is complete; posting a URL string here does not fetch its contents.

Security
BearerPartnerUser
Path
location_idintegerrequired

Location ID

client_idintegerrequired

Client ID

Headers
Acceptstringrequired

Required B2B v2 response media type. Use application/vnd.api.v2+json. A charset parameter is also accepted.

Default:"application/vnd.api.v2+json"
Example:application/vnd.api.v2+json
Bodymultipart/form-datarequired
filestring, (binary)required

Completed document bytes

curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/{location_id}/clients/files/{client_id}' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string

Responses

File uploaded; returns the current client file list

Bodyapplication/json
successboolean

Execution success status (true)

Example:true
dataArray of objects

Array of objects with data

Example:
[ { "id": 123, "client_id": 123456, "name": "test.txt", "description": "", "date_create": "2026-01-01T12:00:00-0500", "extension": "txt", "mime": "text/plain", "link": "/client_files/download/456/123/", "user_name": "Victor Sitnikov", "user_avatar": "/images/no-master.png", "size": "9 B", "can_edit": false }, { "id": 789, "client_id": 123456, "name": "photo.jpg", "description": "", "date_create": "2026-01-30T12:30:00-0500", "extension": "jpg", "mime": "image/jpeg", "link": "/client_files/download/456/789/", "user_name": "Victor Sitnikov", "user_avatar": "/images/no-master.png", "size": "96.65 KB", "can_edit": true } ]
metaobject

Metadata (contains the number of files)

Example:
{ "count": 2 }
Response
{ "success": true, "data": [ { … } ], "meta": { "count": 1 } }