Searching Saved Bills of Lading
Endpoint
https://tms.targetfmi.com/index.php?p=api&r=json&c=postingPanel&m=index
Request Parameters
Parameter | Description | Example |
---|---|---|
d | Paging 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:
| filters[status]=hold |
filters[custom] | Filters the search on the custom bill of lading number field | filters[custom]=123456 |
filters[carrier] | Filters the search on the name of the carrier that the bill of lading is executed on | filters[carrier]=fedex |
filters[shipper] | Filters the search on the shipper name field | filters[shipper]=exampleshipper |
filters[oCity] | Filters the search on the shipment's origin city | filters[oCity]=pittsburgh |
filters[oState] | Filters the search on the shipment's origin state | filters[oState]=pa |
filters[consignee] | Filters the search on the consignee name field | filters[consignee]=examplecons |
filters[dCity] | Filters the search on the shipment's destination city | filters[dCity]=pittsburgh |
filters[dState] | Filters the search on the shipment's destination state | filters[dState]=pa |
filters[pro] | Filters the search on pro number | filters[pro]=12345 |
filters[ref] | Filters the search on reference number | filters[ref]=12345 |
filters[po] | Filters the search on PO number | filters[po]=12345 |
filters[so] | Filters the search on SO number | filters[so]=12345 |
filters[date] | Filters the search on the bill of lading created date | filters[date]=20200101 |
filters[transitStatus] | Filters on the shipment's transit status. Valid options include:
| filters[transitStatus]=booked |
filters[pickupDate] | Filters the search on the shipment pickup date | filters[pickupDate]=20200101 |
filters[expectedDeliveryDate] | Filters on the shipment's expected delivery date | filters[expectedDeliveryDate]=20200101 |
filters[deliveryDate] | Filters on the shipment's delivery date | filters[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
//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 |
---|---|
/body | Container node |
/body/current | Current result page |
/body/next | next result page, empty if on the last page |
/body/previous | previous result page, empty if on the first page |
/body/last | highest page number containing results |
/body/result | bill of lading results container array |
/body/result/id | bill of lading identifier |
/body/result/date | bill of lading created date. format YYYYMMDD |
/body/result/direction | shipping terms. will return one of the following:
|
/body/result/status | bill of lading status. will return one of the following:
|
/body/result/code | code for the warehouse associated with the bill of lading |
/body/result/carrier | carrier name |
/body/result/scac | carrier SCAC code |
/body/result/custom_date | user supplied bill of lading date |
/body/result/pro | pro number |
/body/result/products | bill of lading products container array |
/body/result/products/id | product id |
/body/result/products/name | product name |
/body/result/products/nmfc | product nmfc |
/body/result/products/sub_nmfc | product sub_nmfc |
/body/result/products/class | product class |
/body/result/products/weight | product weight |
/body/result/products/pieces | product pieces |
/body/result/products/hazmat | product hazmat |
/body/result/so | so number |
/body/result/po | po number |
/body/result/ref | ref number |
/body/result/transit_status | shipment transit status. will return one of the following:
|
/body/result/executed_tc | shipment truecost at the time of execution |
/body/result/executed_hide_msg | message returned with rate result at the time of execution |
/body/result/billed_tc | shipment truecost at the time of billing |
/body/result/pickup_date | shipment pickup date |
/body/result/expected_delivery_date | shipment expected delivery date |
/body/result/delivery_date | shipment delivery date |
/body/result/rate_id | identifier for the rate record that the bill of lading was executed on |
/body/result/tracking_history | number of existing tracking records associated with bill of lading |
/body/result/carrier_docs | number of existing carrier document records associated with bill of lading |
/body/result/non_lcc_selection_code | code selected for clients that use feature to enter code when selecting non lcc carriers |
/body/result/shipper/name | shipper name |
/body/result/shipper/addess1 | shipper address 1 |
/body/result/shipper/address2 | shipper address 2 |
/body/result/shipper/city | shipper city |
/body/result/shipper/state | shipper state |
/body/result/shipper/zip | shipper zip |
/body/result/consignee/name | consignee name |
/body/result/consignee/address1 | consignee address 1 |
/body/result/consignee/address2 | consignee address 2 |
/body/result/consignee/city | consignee city |
/body/result/consignee/state | consignee state |
/body/result/consignee/zip | consignee zip |
/body/result/billing/name | billing name |
/body/result/billing/address1 | billing address 1 |
/body/result/billing/address2 | billing address 2 |
/body/result/billing/city | billing city |
/body/result/billing/state | billing state |
/body/result/billing/zip | billing zip |
Example
{ "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;