Searching Saved Bills of Lading

Searching Saved Bills of Lading

Status
Request Type

GET


Query on saved bills of lading.  All listed request parameters are optional.  By default, the endpoint will return the most recent 20 saved bills of lading.

On this page:

Related:

Endpoint

 https://tms.targetfmi.com/index.php?p=api&r=json&c=postingPanel&m=index

Request Parameters 

ParameterDescriptionExample
dPaging parameters in the format <page number>/<number results>. When passed, the API will return the number of results at the specified page. For example, to request 50 results at page 5, you would include d=5/50 in the request query string. When not provided, this is defaulted to 20 results at page 1. Note: the maximum number of results that can be returned is capped at 100.d=1/20
filters[bol]Filters the search on Target TMS bill of lading number.filters[bol]=20200101123
filters[status]

Filters the search on the bill of lading status. Valid options include:

  • hold
  • executed
  • scheduled
  • confirmed
  • tfm_received
  • auditing
  • billed
  • disputed
  • canceled
  • ttl_received
  • ttl_confirmed
filters[status]=hold
filters[custom]Filters the search on the custom bill of lading number fieldfilters[custom]=123456
filters[carrier]Filters the search on the name of the carrier that the bill of lading is executed onfilters[carrier]=fedex
filters[shipper]Filters the search on the shipper name fieldfilters[shipper]=exampleshipper
filters[oCity]Filters the search on the shipment's origin cityfilters[oCity]=pittsburgh
filters[oState]Filters the search on the shipment's origin statefilters[oState]=pa
filters[consignee]Filters the search on the consignee name fieldfilters[consignee]=examplecons
filters[dCity]Filters the search on the shipment's destination cityfilters[dCity]=pittsburgh
filters[dState]Filters the search on the shipment's destination statefilters[dState]=pa
filters[pro]Filters the search on pro numberfilters[pro]=12345
filters[ref]Filters the search on reference numberfilters[ref]=12345
filters[po]Filters the search on PO numberfilters[po]=12345
filters[so]Filters the search on SO numberfilters[so]=12345
filters[date]Filters the search on the bill of lading created datefilters[date]=20200101
filters[transitStatus]

Filters on the shipment's transit status. Valid options include:

  • moving
  • booked
  • dispatched
  • in trasit
  • delivered
filters[transitStatus]=booked
filters[pickupDate]Filters the search on the shipment pickup datefilters[pickupDate]=20200101
filters[expectedDeliveryDate]Filters on the shipment's expected delivery datefilters[expectedDeliveryDate]=20200101
filters[deliveryDate]Filters on the shipment's delivery datefilters[deliveryDate]=20200101
filters[customReference1]

Filters the search on a particular custom reference.

Available custom references can be retrieved from https://tms.targetfmi.com/index.php?p=api&r=json&c=userSettings&m=getReferenceTypes

One or more custom references can be searched for. To search a second custom reference, include a second parameter and increment as filters[customReference2], to search a third custom reference, include a third parameter and increment as filters[customReference3], etc.

The format of the search value must be <custom reference name>/<custom reference value>

filters[customReference1]=name1/value1&filters[customReference2]=name2/value2&filters[customReference3]=name3/value3

Examples

Example URLs
//search 50 bols
https://tms.targetfmi.com/index.php?p=api&r=json&c=postingPanel&m=index&d=1/50
 
//search scheduled bols for carrier fedex 
https://tms.targetfmi.com/index.php?p=api&r=json&c=postingPanel&m=index&filters[status]=scheduled&filters[carrier]=fedex

Response Parameters

Parameter Name

Description

/bodyContainer node
/body/currentCurrent result page
/body/nextnext result page, empty if on the last page
/body/previousprevious result page, empty if on the first page
/body/lasthighest page number containing results
/body/resultbill of lading results container array
/body/result/idbill of lading identifier
/body/result/datebill of lading created date. format YYYYMMDD
/body/result/direction

shipping terms. will return one of the following:

  • Outbound/Prepaid
  • Inbound/Collect
  • Third Party
  • Outbound/Collect
/body/result/status

bill of lading status. will return one of the following:

  • hold
  • executed
  • scheduled
  • confirmed
  • tfm_received
  • auditing
  • disputed
  • billed
  • canceled
  • ttl_received
  • ttl_confirmed
  • third_party_payor
/body/result/codecode for the warehouse associated with the bill of lading
/body/result/carriercarrier name
/body/result/scaccarrier SCAC code
/body/result/custom_dateuser supplied bill of lading date
/body/result/propro number
/body/result/productsbill of lading products container array
/body/result/products/id

product id

/body/result/products/nameproduct name
/body/result/products/nmfcproduct nmfc
/body/result/products/sub_nmfcproduct sub_nmfc
/body/result/products/classproduct class
/body/result/products/weightproduct weight
/body/result/products/piecesproduct pieces
/body/result/products/hazmatproduct hazmat
/body/result/soso number
/body/result/popo number
/body/result/refref number
/body/result/transit_status

shipment transit status. will return one of the following:

  • booked
  • dispatched
  • in transit
  • delivered
  • canceled
  • out to stop
  • at stop
  • at pickup
  • at terminal
  • at delivery
  • pickup missed
  • departure missed
  • delivery missed
  • interline missed
  • delayed
  • held
  • exception
  • tracking ended
/body/result/executed_tcshipment truecost at the time of execution
/body/result/executed_hide_msgmessage returned with rate result at the time of execution
/body/result/billed_tcshipment truecost at the time of billing
/body/result/pickup_dateshipment pickup date
/body/result/expected_delivery_dateshipment expected delivery date
/body/result/delivery_dateshipment delivery date
/body/result/rate_ididentifier for the rate record that the bill of lading was executed on
/body/result/tracking_historynumber of existing tracking records associated with bill of lading
/body/result/carrier_docsnumber of existing carrier document records associated with bill of lading
/body/result/non_lcc_selection_codecode selected for clients that use feature to enter code when selecting non lcc carriers
/body/result/shipper/nameshipper name
/body/result/shipper/addess1shipper address 1
/body/result/shipper/address2shipper address 2
/body/result/shipper/cityshipper city
/body/result/shipper/stateshipper state
/body/result/shipper/zipshipper zip
/body/result/consignee/nameconsignee name
/body/result/consignee/address1consignee address 1
/body/result/consignee/address2consignee address 2
/body/result/consignee/cityconsignee city
/body/result/consignee/stateconsignee state
/body/result/consignee/zipconsignee zip
/body/result/billing/namebilling name
/body/result/billing/address1billing address 1
/body/result/billing/address2billing address 2
/body/result/billing/citybilling city
/body/result/billing/statebilling state
/body/result/billing/zipbilling zip

Example

Example Response
 {
    "body": {
        "result": [
            {
                "id": "123",
                "date": "20200101",
                "direction": "Outbound\/Prepaid",
                "status": "executed",
                "code": "WAREHOUSE_CODE",
                "carrier": "Fedex",
                "scac": "FXFE",
                "custom_date": "",
                "pro": "",
				"products": [
						{
    						"id": "138096",
    						"name": "Test Name 1",
    						"nmfc": "18260",
    						"sub_nmfc": "5",
    						"class": "300",
   							"weight": "300",
    						"pieces": "10",
    						"hazmat": "0"
						},
						{
    						"id": "138064",
    						"name": "Test Name 2",
    						"nmfc": "17029",
    						"sub_nmfc": "4",
    						"class": "300",
   							"weight": "200",
    						"pieces": "5",
    						"hazmat": "1"
						},
				],
                "po": "",
                "so": "",
                "ref": "",
                "transit_status": null,
                "executed_tc": "",
                "executed_hide_msg": "",
                "billed_tc": "",
                "pickup_date": "",
                "expected_delivery_date": "",
                "delivery_date": "",
                "rate_id": null,
                "tracking_history": "0",
                "carrier_docs": "0",
                "non_lcc_selection_code": null,
                "shipper": {
                    "name": "123 EXAMPLE SHIPPER",
                    "address1": "123 TEST DR.",
                    "address2": "",
                    "city": "PITTSBURGH",
                    "state": "PA",
                    "zip": "15236"
                },
                "consignee": {
                    "name": "123 EXAMPLE CONSIGNEE",
                    "address1": "456 TEST AVE.",
                    "address2": "",
                    "city": "Vandergrift",
                    "state": "PA",
                    "zip": "15690"
                },
                "billing": {
                    "name": "789 EXAMPLE BILLING",
                    "address1": "1101 EX DR.",
                    "address2": "",
                    "city": "Pittsburgh",
                    "state": "PA",
                    "zip": "15236"
                }
            }
        ],
        "next": 2,
        "prev": "",
        "current": 1,
        "last": 200
    },
    "message": []
}

Full Example

<?php

$apiKey = 'TEST-API-KEY:';
$url = "https://tms.targetfmi.com/index.php?p=api&r=json&c=postingPanel&m=index&d=1/1";

$headers = array(
    'Content-type: application/x-www-form-urlencoded',
    'Authorization: Basic ' . base64_encode($apiKey),
);

$curl = curl_init();

$options = array(
    CURLOPT_URL => $url,
    CURLOPT_HEADER => 0,
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_SSL_VERIFYPEER => 0,
);

curl_setopt_array($curl, $options);

$response = curl_exec($curl);

print_r(json_decode($response, true));
exit;