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.eyJzdWIiOiIxODM0Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTk0LCJleHAiOjE3NDAxNDM1OTQsImp0aSI6IjQ3YmZkZmExLTVmNGYtNGFlMS05YWJhLTUzMjU5M2FkYzdhYSJ9.qQJOPnDB-86moNs6-twMBeQyAL1DOLXMBivxQmfl-aA
Host: example.org
Cookie: 

Body

{
  "profile": {
    "attachment_type": "cv",
    "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzQsInB1ciI6ImJsb2JfaWQifX0=--2e2907a6616df986a3e4e013ba307f211f3f2f5b"
  }
}

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/"bb7ce6a2828511f234e09ae58660fdb7"
cache-control: max-age=0, private, must-revalidate
x-request-id: 39a0c74b-26ae-4f7f-aedc-68c06daaa866
x-runtime: 0.022021
content-length: 345

Body

{
  "cv": {
    "id": 32,
    "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzQsInB1ciI6ImJsb2JfaWQifX0=--2e2907a6616df986a3e4e013ba307f211f3f2f5b",
    "byte_size": 13264,
    "filename": "test_file.pdf",
    "url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzQsInB1ciI6ImJsb2JfaWQifX0=--2e2907a6616df986a3e4e013ba307f211f3f2f5b/test_file.pdf"
  }
}