Vector

Fetching BOLs via API

This guide describes how to retrieve Bills of Lading (BOLs) and associated documents from Vector using the REST API. Vector provides two methods: fetching a single document by UUID, or searching for documents with filters.

Authenticate

Bearer token required

Search Documents

Filter, sort, paginate

Download Files

CDN-hosted attachments

Authentication

All API requests require a Bearer token. Your token will be provided by Vector support during onboarding. Include it in the Authorization header of every request.

Base URL:https://api.withvector.com/1.0
Auth Header:Authorization: Bearer YOUR_TOKEN
Content Type:application/json (POST requests only)

Understanding Schemas

Vector uses a metadata-driven architecture based on JSON Schema (draft 4). Resources declare the schemas they implement through mixins, which define custom properties and required fields. Common schemas include:

FieldTypeRequiredDescription
entity.json11111111-0000-0000-0000-000000000000
Optional
Abstract object model - base for all entities.
document.json11111111-0000-0000-0000-000000000011
Optional
Abstract document model - base for all documents.
core_documents_shipment.json2f9d88dc-f5d8-4a41-937b-df401d455131
Optional
Core shipment document type.

Note: When filtering for documents, use the Document mixin UUID 11111111-0000-0000-0000-000000000011

Get Single Document

Retrieve a single document by its UUID:

GET/1.0/entities/records/:uniqueId
Request
curl --request GET \
  --url https://api.withvector.com/1.0/entities/records/1e472093-e838-40d8-836f-ca576bd2a256 \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

Document Search

The Document Search API (POST /1.0/entities/query) allows you to query documents stored in Vector using a flexible, structured request body. It accepts a set of parameters, performs a filtered search against the platform's entity store, and returns matching documents in a sorted, paginated order. Even if no results are found, the API always returns a 200 with an empty result set rather than an error.

POST/1.0/entities/query

Searchable Properties

The core_documents_shipment entity supports filtering on the searchable properties listed below. Use these paths in the filters array of the POST Document Search request body. Paths for nested objects use dot notation (e.g., core_documents_shipment.identification.bolNumber).

Property LabelAPI Filter PathSupported Filter Types
BOL Numbercore_documents_shipment.identification.bolNumbermatch, prefix
Delivery Numbercore_documents_shipment.identification.deliveryNumbermatch, prefix
Delivery Numberscore_documents_shipment.identification.deliveryNumberscontains
Load Numbercore_documents_shipment.identification.loadNumbermatch, prefix
Lot Numbercore_documents_shipment.identification.lotNumbermatch, prefix
Order Numbercore_documents_shipment.identification.orderNumbermatch, prefix
PO Numberscore_documents_shipment.identification.purchaseOrderNumberscontains
Pro Numbercore_documents_shipment.identification.proNumbermatch, prefix
Cargocore_documents_shipment.cargomatch, prefix
Carriercore_documents_shipment.carriermatchEdge
Carrier SCACcore_documents_shipment.carrierCodematch, prefix
Carrier Namecore_documents_shipment.carrierNamematch, prefix
Check-In Timecore_documents_shipment.checkinTimerange
Check-Out Timecore_documents_shipment.checkoutTimerange
Customercore_documents_shipment.customermatchEdge
Customer IDcore_documents_shipment.customerIdmatch, prefix
Customer Namecore_documents_shipment.customerNamematch, prefix
Destinationcore_documents_shipment.destinationLocationmatchEdge
Driver Signedcore_documents_shipment.driverSignedmatch
Driver Will Provide Physical Copycore_documents_shipment.driverWillProvidePhysicalCopymatch
Current Facilitycore_documents_shipment.facilitymatchEdge
OS&Dcore_documents_shipment.hasOsdmatch
Ignore For Automation Auditcore_documents_shipment.ignoreForAutomationAuditmatch
Archivedcore_documents_shipment.isArchivedmatch
Assignedcore_documents_shipment.isAssignedmatch
Dispatchedcore_documents_shipment.isDispatchedmatch
Prioritycore_documents_shipment.isPrioritymatch
Voidedcore_documents_shipment.isVoidedmatch
Origin Locationcore_documents_shipment.originLocationmatchEdge
Receivercore_documents_shipment.receivermatch, prefix
Receiver IDcore_documents_shipment.receiverIdmatch, prefix
Receiver Signedcore_documents_shipment.receiverOfficeSignedmatch
Seal Numbercore_documents_shipment.seal.numbermatch, prefix
Set Temperaturecore_documents_shipment.setTemperaturematch, prefix
Shipment Datecore_documents_shipment.shipmentDaterange
Shipment Numbercore_documents_shipment.shipmentNumbermatch, prefix
Shipment Statuscore_documents_shipment.shipmentStatusmatch
Shippercore_documents_shipment.shippermatch, prefix
Shipper IDcore_documents_shipment.shipperIdmatch, prefix
Shipper Signedcore_documents_shipment.shipperSignedmatch
Trailercore_documents_shipment.trailermatchEdge
Trailer Numbercore_documents_shipment.trailerNumbermatch, prefix
TMS IDcore_documents_shipment.tmsIdmatch, prefix
Truck Numbercore_documents_shipment.truckNumbermatch, prefix
Gross Weightcore_documents_shipment.weightGrossmatch, prefix
Net Weightcore_documents_shipment.weightNetmatch, prefix

Filter Types

Filter Types are the core operators of Vector's EQL (Entity Query Language) that determine how a field is evaluated when searching for documents. Every filter object includes a type field that specifies which operator to apply, along with a path pointing to the field being filtered.

Exact Matching

For matching exact field values. match is the most common type.

FieldTypeRequiredDescription
matchobject
Optional
Exact field value match. Supports single value or values array for multi-select. Also supports wildcard * (e.g., *805123*).
multipleMatchobject
Optional
Match a single value across multiple paths using orPaths.
matchEdgeobject
Optional
Match on edge fields, resolving on entityId.
matchEntityobject
Optional
Match on entity fields, resolving on uniqueId.
matchLaneobject
Optional
Match on lane-based fields.
matchLanePointobject
Optional
Match on lane point fields.

Array Membership

Check whether a value exists within an array field. Note: this is not a string-contains operation.

FieldTypeRequiredDescription
containsobject
Optional
Check if a value exists within an array field (membership check, not string-contains).
containsEdgeobject
Optional
Same as contains but for arrays of edge objects.

Partial Text Matching

For partial string matching. Note: prefix wildcards are expensive and discouraged for performance.

FieldTypeRequiredDescription
prefixobject
Optional
Match the beginning of a string field (e.g., names starting with "Proctor").
fuzzyobject
Optional
Typo-tolerant matching. Useful for carrier names; not recommended for numeric fields.

Existence Checks

Filter based on whether a field has any value at all.

FieldTypeRequiredDescription
existsobject
Optional
Filter for fields that have any value.
notExistsobject
Optional
Filter for fields that have no value.

Range

For numeric or date fields using comparison operators.

FieldTypeRequiredDescription
rangeobject
Optional
Numeric or date filtering using gt, gte, lt, lte. Can be open-ended on either side.

Geo Types

Spatial filter types for location-based queries.

FieldTypeRequiredDescription
geoBoundsobject
Optional
Rectangular bounding box filter.
geoPolygonobject
Optional
Arbitrary polygon shape (3+ points).
geoDistanceobject
Optional
Radius from a point (supports miles, km, yards, meters).
geoIntersectobject
Optional
Planar intersection with a region (e.g., zip code).

Negation & Composition

Combine or negate filters for complex queries.

FieldTypeRequiredDescription
orFilterobject
Optional
Combine multiple filters with OR logic.
isNegationboolean
Optional
Set to true on any filter to negate it.

Filter Examples

match - Exact field value (with multi-select):

{
  "type": "match",
  "path": "document.name",
  "values": ["131187", "131188"]
}

match - Wildcard search:

{
  "type": "match",
  "path": "document.name",
  "value": "*805123*"
}

containsEdge - Filter by document type:

{
  "type": "containsEdge",
  "path": "mixins.active",
  "values": [{ "entityId": "11111111-0000-0000-0000-000000000011" }]
}

range - Date range (open-ended on one side):

{
  "type": "range",
  "path": "creationDate",
  "gte": "2024-01-01T00:00:00.000Z"
}

geoDistance - Radius search:

{
  "type": "geoDistance",
  "path": "document.address.geolocation",
  "distance": 50,
  "unit": "miles",
  "lat": 37.781085,
  "lon": -122.397096
}

Negated filter:

{
  "type": "match",
  "path": "document.processed",
  "value": true,
  "isNegation": true
}

Pagination (metadata)

Control pagination and grouping with the metadata object:

FieldTypeRequiredDescription
sizeinteger
Optional
Count of items to return for top level group.
offsetinteger
Optional
Offset of items to return from for top level group.
maxSizePerGroupinteger
Optional
Count of items to return for nested groups.
shouldIncludeLeafEntitiesboolean
Optional
Indication to add entities as children to leaf groups.

Sorting (orders)

Control the sort order of results:

"orders": [
  {
    "path": "creationDate",
    "type": "descending",
    "label": "Posted Date"
  }
]

Available types: ascending or descending

Response Structure

The response returns a children array where each item contains a data object — a fully hydrated entity in the same shape as the Get Single Document response, including uniqueId, owner details, address, image file locations, processing state, and attachments. A count of total matched documents is included at the end of the response.

Each document object in the response contains the following fields:

FieldTypeRequiredDescription
uniqueIdstring
Required
UUID of the document in Vector.
mixinsobject
Required
Active and inactive schema mixins (Entity, Document, Bill of Lading, etc.).
ownerobject
Required
Owner information including user and firm details.
status.statestring
Required
Processing state: "idle" (ready) or "busy" (operations cannot be performed).
createdByobject
Required
User who created the document (entityId and displayName).
creationDatestring
Required
ISO 8601 timestamp when the document was created.
modifiedByobject
Required
User who last modified the document.
modifiedDatestring
Required
ISO 8601 timestamp when the document was last modified.
document.namestring
Required
Document name/identifier.
document.addressobject
Optional
Resolved address with region, locality, postalCode, streetAddress, geolocation.
document.processedboolean
Required
Whether the document has been processed.
document.uploadDatestring
Required
ISO 8601 timestamp when the document was uploaded.
document.attachmentsobject
Required
Files array and aggregate PDF with download URIs.
core_documents_shipment.proofOfShipmentAttachmentobject
Optional
Proof of shipment document with files array and aggregate PDF.
core_documents_shipment.proofOfDeliveryAttachmentobject
Optional
Proof of delivery document with files array and aggregate PDF.

Attachment Fields

Each file in document.attachments.files, core_documents_shipment.proofOfShipmentAttachment.files, and core_documents_shipment.proofOfDeliveryAttachment.files contains:

FieldTypeRequiredDescription
uristring
Required
Direct download URL for the file (hosted on cdn.loaddocs.co).
namestring
Required
Original filename (e.g., "131187.pdf").
typestring
Required
File type (e.g., "pdf", "image").
pagesinteger
Optional
Number of pages in the document.
uniqueIdstring
Required
UUID of the file attachment.
previewarray
Optional
Array of preview images at different resolutions (1650x1650, 640x480, 64x64).

Example Response

A successful GET response returns the document with all metadata and file URLs:

Response
{
  "core_documents_shipment": {
    "appointment": {
      "displayName": "12345678 - Outbound",
      "entityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    },
    "carrier": {
      "denormalizedProperties": {
        "business.legalName": "ACME LOGISTICS"
      },
      "displayName": "ACME LOGISTICS",
      "entityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012"
    },
    "carrierCode": "ACME",
    "customer": {
      "denormalizedProperties": {
        "business.sourceId": "DEMO"
      },
      "displayName": "DEMO",
      "entityId": "c3d4e5f6-a7b8-9012-cdef-345678901234"
    },
    "customerName": "DEMO",
    "driver": {
      "denormalizedProperties": {
        "owner.firm": {
          "displayName": "Sample Transport Inc.",
          "entityId": "d4e5f6a7-b8c9-0123-def0-456789012345"
        },
        "person.phoneNumbers": [
          {
            "isVerified": true,
            "label": "Primary Phone",
            "value": {
              "phone": "+1 555-123-4567"
            }
          }
        ]
      },
      "displayName": "John Driver",
      "entityId": "e5f6a7b8-c9d0-1234-ef01-567890123456"
    },
    "driverSignature": {
      "signature": {
        "height": 159,
        "name": "signature.jpg",
        "source": [
          {
            "height": 159,
            "uri": "https://cdn.loaddocs.co/.../signature.jpg",
            "width": 500
          }
        ],
        "type": "image",
        "uniqueId": "f6a7b8c9-d0e1-2345-f012-678901234567",
        "uri": "https://cdn.loaddocs.co/.../signature.jpg",
        "width": 500
      },
      "signatureType": "pad",
      "signed": true,
      "signedBy": {
        "firm": {
          "displayName": "Demo Warehouse",
          "entityId": "a7b8c9d0-e1f2-3456-0123-789012345678"
        },
        "user": {
          "displayName": "Warehouse User",
          "entityId": "b8c9d0e1-f2a3-4567-1234-890123456789"
        }
      },
      "signedDate": "2024-02-18T21:16:51.551Z",
      "signer": "Warehouse User"
    },
    "facility": {
      "denormalizedProperties": {
        "location.address": {
          "countryName": "United States",
          "geolocation": {
            "latitude": 34.0522,
            "longitude": -118.2437
          },
          "locality": "Los Angeles",
          "postalCode": "90001",
          "region": "CA",
          "streetAddress": "123 Warehouse Blvd",
          "timezoneId": "America/Los_Angeles"
        },
        "location.name": "Los Angeles DC"
      },
      "displayName": "Los Angeles DC",
      "entityId": "c9d0e1f2-a3b4-5678-2345-901234567890"
    },
    "identification": {
      "bolNumber": "BOL123456789",
      "proNumber": "12345678"
    },
    "isArchived": false,
    "isAssigned": false,
    "isDispatched": false,
    "isPriority": false,
    "isVoided": false,
    "originLocation": {
      "denormalizedProperties": {
        "location.address": {
          "countryName": "United States",
          "geolocation": {
            "latitude": 34.0522,
            "longitude": -118.2437
          },
          "locality": "Los Angeles",
          "postalCode": "90001",
          "region": "CA",
          "streetAddress": "123 Warehouse Blvd",
          "timezoneId": "America/Los_Angeles"
        }
      },
      "displayName": "Los Angeles DC",
      "entityId": "c9d0e1f2-a3b4-5678-2345-901234567890"
    },
    "packingList": {
      "aggregate": {
        "name": "aggregate.pdf",
        "pages": 0,
        "type": "pdf",
        "uniqueId": "d0e1f2a3-b4c5-6789-3456-012345678901",
        "uri": "https://cdn.loaddocs.co/.../packingList/aggregate.pdf"
      },
      "files": [
        {
          "name": "packing-list-001.pdf",
          "pages": 1,
          "preview": [
            {
              "height": 2135,
              "name": "page_1",
              "type": "image",
              "uniqueId": "e1f2a3b4-c5d6-7890-4567-123456789012",
              "uri": "https://cdn.loaddocs.co/.../page_1.jpg",
              "width": 1650
            }
          ],
          "type": "pdf",
          "uniqueId": "f2a3b4c5-d6e7-8901-5678-234567890123",
          "uri": "https://cdn.loaddocs.co/.../packing-list-001.pdf"
        }
      ]
    },
    "pickupTrailerNumber": "TR-001",
    "proofOfShipmentAttachment": {
      "aggregate": {
        "name": "aggregate.pdf",
        "type": "pdf",
        "uniqueId": "a3b4c5d6-e7f8-9012-6789-345678901234",
        "uri": "https://cdn.loaddocs.co/.../proofOfShipment.pdf"
      },
      "files": [
        {
          "name": "proofOfShipment.pdf",
          "pages": 3,
          "preview": [
            {
              "height": 2587,
              "name": "page_1",
              "type": "image",
              "uniqueId": "b4c5d6e7-f8a9-0123-7890-456789012345",
              "uri": "https://cdn.loaddocs.co/.../pos_page_1.jpg",
              "width": 1650
            }
          ],
          "type": "pdf",
          "uniqueId": "c5d6e7f8-a9b0-1234-8901-567890123456",
          "uri": "https://cdn.loaddocs.co/.../proofOfShipment.pdf"
        }
      ]
    },
    "proofOfDeliveryAttachment": {
      "aggregate": {
        "name": "aggregate.pdf",
        "type": "pdf",
        "uniqueId": "d6e7f8a9-b0c1-2345-9012-678901234567",
        "uri": "https://cdn.loaddocs.co/.../proofOfDelivery.pdf"
      },
      "files": [
        {
          "name": "proofOfDelivery.pdf",
          "pages": 2,
          "preview": [
            {
              "height": 2135,
              "name": "page_1",
              "type": "image",
              "uniqueId": "e7f8a9b0-c1d2-3456-0123-789012345678",
              "uri": "https://cdn.loaddocs.co/.../pod_page_1.jpg",
              "width": 1650
            }
          ],
          "type": "pdf",
          "uniqueId": "f8a9b0c1-d2e3-4567-1234-890123456789",
          "uri": "https://cdn.loaddocs.co/.../proofOfDelivery.pdf"
        }
      ]
    },
    "receiverOfficeSigned": false,
    "seal": {
      "number": "SEAL123456"
    },
    "shipmentDate": "2024-02-04T12:00:00.000Z",
    "shipmentNumber": "12345678",
    "shipmentStatus": "Picked up by Driver"
  }
}

Response Codes

FieldTypeRequiredDescription
200Success
Optional
Request successful. Entity returned in response body.
404Not Found
Optional
Document with the specified UUID was not found.
401Unauthorized
Optional
Missing or invalid Bearer token.

Note: Search requests return 200 even with 0 results. Check the response body for the count of returned documents.

Document State

The status.state field indicates the processing state of a document:

idleDocument is ready. Operations can be performed.
busyDocument is being processed. Wait before performing operations.