Users > Profile

Update current driver’s document

PUT update document

Endpoint

PUT /api/v1/users/profile/attachment

Parameters

Name Description Enum
profile[attachment_type] required Profile attachment type ["cv", "dbs", "tacho", "enchanced_dbs", "cpc", "medical_check", "child_safeguard_training"]
profile[signed_id] required Signed ID of the attachment received after direct upload

Request

Route

PUT /api/v1/users/profile/attachment

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxODk2Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzUzMjY2MjMwLCJleHAiOjE3NTU4NTgyMzAsImp0aSI6IjhlZTE2NWYwLTdmNjYtNDlkZC05ZTAyLWViMTExOThlMjliZSJ9.TYhEGgVsHTirAeXdV8Naq59ENpdt0PgKNkYfSObEjHU
Host: example.org
Cookie: 

Body

{
  "profile": {
    "attachment_type": "cv",
    "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzcsInB1ciI6ImJsb2JfaWQifX0=--cd78bc15ad49d19a0c6564e41300bdca796ffa11"
  }
}

Response

Simulated Response

Status

200

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"79baf3ad25c94ff448cf77591976486e"
cache-control: max-age=0, private, must-revalidate
x-request-id: b0b75ff9-9ec2-4225-8703-63b1c815dd47
x-runtime: 0.053622
content-length: 345

Body

{
  "cv": {
    "id": 33,
    "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzcsInB1ciI6ImJsb2JfaWQifX0=--cd78bc15ad49d19a0c6564e41300bdca796ffa11",
    "byte_size": 13264,
    "filename": "test_file.pdf",
    "url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzcsInB1ciI6ImJsb2JfaWQifX0=--cd78bc15ad49d19a0c6564e41300bdca796ffa11/test_file.pdf"
  }
}