Documents

Get the data Trackberry extracted from a document

Use this to read the structured content Trackberry parsed out of a document (a packing list's lines, an invoice's totals, a bill of lading's parties and departure and arrival days, a certificate's numbers). Check data_available on the document first, or accept an empty result: when nothing was extracted, or the document type has no structured schema, the response is still a 200 with schema null and fields an empty object.

get/documents/{id}/data

Request

  • Base URL: https://trackberry.com/api/v1
  • URL: https://trackberry.com/api/v1/documents/{id}/data
  • Auth: HTTP bearer

Path parameters

idstring required

The document id (doc_ prefix). An id from another organization, with another prefix, or of a document that is not current, is a 404.

Headers

Trackberry-Versionstring

The API version to build this response for, for example 2026-10-01. Optional: without it the organization's pinned version is used (and the organization is pinned to the latest version on its first request without the header). Applies to this request only. An unpublished version is a 400 with code invalid_version.

Response

The extracted data.

object'document_data' required

Always document_data.

document_idstring required

The document the data was read from.

typestring required

The document's class name when it has one (finer than Document.type, for example exporter_invoice, transport_invoice, sanitary_document), otherwise its type.

schema'packing_list' | 'transport_document' | 'invoice' | 'certificate' | 'inspection_report' | 'arrival_notice' | 'booking' | 'pre_alert' | 'warehouse_receipt' | 'null' nullable required

The shape of fields. Null when nothing was extracted or the document type has no structured schema, in which case fields is empty.

fieldsobject required

The extracted values, keys in snake_case, calendar days as YYYY-MM-DD strings, amounts and weights as numbers, missing values null, repeated groups as arrays of objects. Fields by schema. packing_list: packing_list_number, exporter_name, exporter_port, exporter_country, importer_name, importer_country, total_net_weight, total_boxes, diagram_pallet_numbers, container_number, line_items (each with pallet_number, produce_name, variety, size_calibre, quality_category, format, label, produce_type, ggn, comment, number_of_boxes, net_weight_kg, box_weight_kg, gross_weight_kg). transport_document: transport_type, shipment_reference, equipment_numbers, package_count, package_unit, consignor, consignee, notify_party, carrier, departure_location and arrival_location (each with location_name and country), etd, eta, temperature_setpoint_celsius, cargo_type, load_type, issuer. invoice: seller_name, seller_location, seller_country, buyer_name, buyer_location, buyer_country, invoice_number, invoice_date, total_amount, currency, line_items (each with produce_description, produce_name, variety, calibre, pack_format, box_weight_kg, quantity, unit_price, price_unit, total_amount). certificate: exporter_name, exporter_location, exporter_country, importer_name, importer_location, importer_country, certificate_number, certificate_date, produce_description. inspection_report: inspection_company, inspector_name, report_number, inspection_date, inspection_location, container_number, produce_description, total_pallets, overall_impression, overall_score, overall_impression_category, general_remarks, results (each with pallet_number, lot_code, produce_name, variety, calibre, score, recommendation, remarks, defects, photo_numbers). arrival_notice: carrier_name, bill_of_lading_number, container_numbers, vessel_arrival_date, free_time (each with applies_to, cargo_class, days, hours, basis, from_date, until_date, from_event, estimated, quote). booking: load_type, move_type, shipper, consignee, cargo_ready_date, departure_location and arrival_location (each with location_name and country), place_of_delivery, incoterm, po_number, package_count, package_unit, gross_weight_kg, volume_cbm, booking_reference, transport_type. pre_alert: forwarder_name, forwarder_reference, house_bill_of_lading, master_bill_of_lading, load_type, vessel, voyage, departure_location and arrival_location (each with location_name and country), etd, forwarder_arrival_date, shipper, consignee, incoterm, container_numbers, package_count, gross_weight_kg, volume_cbm. warehouse_receipt: warehouse_name, receipt_number, received_on, container_number, storage_location, supplier_name, total_boxes, total_pallets, lines (each with warehouse_pallet_number, pallet_number, batch_number, description, produce_name, variety, calibre, quality_category, pack_format, number_of_boxes, gross_weight_kg), allocations (each with pallet_number, batch_number, boxes, allocated_on, order_reference, customer). Fields may be added over time.

Changes

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