Skip to main content
An order can collect customer uploads, handover photos, transport documents, condition summaries, and a full inspection report. These records answer different questions, so keep their meaning distinct in your system.

Upload a customer document

You cannot attach a file by URL. Upload it first, then add its ID to an order:
  1. Call POST /v2/files with the file name, category, media type, and byte size.
  2. Submit every returned form field to the returned upload URL.
  3. Add the file as the final multipart field with the name file.
  4. Add the returned file_id to the order file_ids field.
Do not rename or remove fields from the upload form. The temporary upload request accepts PDF, JPEG, and PNG files up to 12 MiB. Use power_of_attorney or customer_document as the category. The optional description is visible with the attached file and should tell a user what the document contains. Use customer_document for a pickup release document. Give the file a clear name, such as pickup-release-document.pdf, and add its ID to the order. You can leave pickup.release_code empty when the document contains the release authorization. A successful upload does not attach the file by itself. The file appears on the order only after its ID is included in order creation or an order update.

Complete upload example

This Node.js example needs a valid BAHN_ACCESS_TOKEN, a PDF at ./pickup-release-document.pdf, and one BAHN_UPLOAD_KEY for this logical upload. Generate the key once, then retain it for retries.
Let FormData set the multipart content type and boundary. Send the returned form to the upload URL without the API Bearer header. Use the form before upload.expires_at. Before attaching the file, retrying POST /v2/files with the same key and metadata returns the same file ID with a fresh form. Attach that ID when creating the order, or send this order-update body with a new write key and the current quoted revision:
Replace the example ID with the actual returned ID. file_ids adds files to the order. It does not replace the existing file list.

Build the order file list

Call GET /v2/orders/{order_id}/files to read all available order files. Use the fields together rather than relying on the file name: The file id is stable. The content_url is not. Use the URL before content_url_expires_at, then read the file list again when you need a fresh URL. Submitted provider pickup and delivery photos appear when they are available to the customer. The order status can change after the upload. Use stage to group files. Do not use it to decide if a file is available. The customer file list does not include vehicle key photos. Read CMR recipients when the document recipient needs to differ from the physical destination. After delivery, the list also contains a generated CMR PDF with category: cmr. The generated document has a stable file ID. Its content_url is valid for a short time. Its size_bytes value is null because the server creates the PDF when you open the URL.

Show vehicle condition

Each order item has a pickup_condition and delivery_condition. These summaries contain the recorded condition, odometer value, notes, and related evidence_file_ids when available. Use those file IDs to find the photos in the order file list. A photo alone does not tell you whether Bahn recorded damage or accepted a condition result.

Show a full inspection

A full inspection is a structured report for the primary vehicle. It is separate from the condition summary and the general file list. Call GET /v2/orders/{order_id}/inspection-report and handle its status: Each category has an ok or issue status, optional findings, and its own evidence files. Use those fields to build the report. Do not label a normal handover photo as an inspection result.

Delete a customer upload

The can_delete field tells you whether the current credential can delete a file. When it is true, call DELETE /v2/orders/{order_id}/files/{file_id}. Deletion is available only while the order allows changes and only for files uploaded by the same customer account. Use can_delete as the deletion rule instead of deriving access from the file category.