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.eyJzdWIiOiIxOTIyIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzNjI2NDE1LCJleHAiOjE3NjYyMTg0MTUsImp0aSI6IjkxNjc2NmJhLTA0NmMtNGViOS1hYWRmLTljMWM2MjMzN2FkZiJ9.gSRfcsZGS8ntGLxBLF-b6FsqPGlv3E7TUORWLbOSjv0
Host: example.org
Cookie: 

Body

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

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/"da09bb0ec6d3b2e7cbb6ff9de6b2e772"
cache-control: max-age=0, private, must-revalidate
x-request-id: aaacf1e1-211d-43c1-9933-d3f8ae9e356d
x-runtime: 0.039493
content-length: 345

Body

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