Documents

Update a document

Share it with the trip's collaborators or make it private again, rename it, change its type or edit its notes. Send any of the four fields, at least one; only the fields sent change, and notes: null clears the notes. An empty body is 422 validation_failed. Uploader or trip owner only.

patch/api/v1/trips/{tripExternalId}/documents/{documentExternalId}

Request

  • Base URL: https://www.endlesstravelplans.com
  • URL: https://www.endlesstravelplans.com/api/v1/trips/{tripExternalId}/documents/{documentExternalId}
  • Auth: HTTP bearer

Request body

shared_with_tripboolean

Share with the trip's accepted collaborators (true) or keep private (false).

namestring

At most 255 characters.

document_typestring

One of passport, visa, boarding_pass, hotel_confirmation, insurance, car_rental, other.

notesstring nullable

nullable At most 1000 characters; null clears them.

Example request

{
  "shared_with_trip": true,
  "name": "Passport (Ana)",
  "document_type": "visa",
  "notes": "Expires March 2030"
}

Response

Example response

{
  "document": {
    "external_id": "3f1c2b7a-5d4e-4c3b-9a8f-7e6d5c4b3a21",
    "trip_id": 42,
    "document_type": "passport",
    "name": "Passport (Ana)",
    "file_url": "https://www.endlesstravelplans.com/api/v1/trips/550e8400-e29b-41d4-a716-446655440000/documents/3f1c2b7a-5d4e-4c3b-9a8f-7e6d5c4b3a21/download",
    "mime_type": "application/pdf",
    "notes": "Expires March 2030",
    "shared_with_trip": false,
    "uploaded_by": {
      "id": 7,
      "first_name": "Ana"
    },
    "can_delete": true,
    "can": {
      "update": true,
      "delete": true,
      "share": true
    },
    "size_bytes": 184320,
    "created_at": "2026-10-14T09:00:00.000000Z",
    "updated_at": "2026-10-14T09:05:00.000000Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.