Search within your posted loads

Search within your posted loads

📘

# Search

POST /loadmanagement/v2/load/search Search within your posted loads

Authorization bearer token
Content Type application/json
Accept application/json
URL Params None
Body Params JSON Object

POST https://api-int.truckstop.com/loadmanagement/v2/load/search HTTP/1.1
Authorization: bearer <access_token>
Content-Type: application/json
Accept: application/json

{
  "pagination": {
    "pageNumber": 2,
    "pageSize": 10
  },
  "searchCriteria": [
    {
      "name": "LoadActionId",
      "operator": "eq",
      "value": "4",
    }
  ],
  "sortCriteria": [
    {
      "direction": "descending",
      "name": "OriginCity"
    },
    {
      "name": "palletCount"
    }
  ]
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
CorrelationId: 901b6bd9-cd5a-4fca-9955-fc94db7eeacd

{
  "pagination": {
    "pageNumber": 5,
    "pageSize": 10,
    "resultsTruncated": true,
    "totalItemCount": 42,
    "totalPages": 5
  },
  "results": [
    {
      "loadId": "a020197d-511c-4370-aa8d-2b6172fecc4c",
      "postAsUserId": "df7dbc1a-a21d-e911-a9ec-a3b8a698ca96",
      "postAsUser": {
        "id": "df7dbc1a-a21d-e911-a9ec-a3b8a698ca96",
        "firstName": "Tom",
        "lastName": "Jerry",
        "email": "[email protected]",
        "phone": "(123)-456-7890",
        "userName": "TOMJERRY"
      },
      "createdBy": "df7dbc1a-a21d-e911-a9ec-a3b8a698ca96",
      "updatedBy": "df7dbc1a-a21d-e911-a9ec-a3b8a698ca96",
      "createdDateTime": "2019-01-10T22:6:47",
      "updatedDateTime": "2019-03-14T09:16:55",
      "loadState": {
        "loadStateDescription": "Posted",
        "loadStateId": 1
      },
      "loadStateReason": null,
      "tenderId": 0,
      "carrierName": "",
      "loadActivity": [
        {
          "id": "493c98cc-a8c5-e911-aa10-c79a7aacaffe",
          "createdDate": "2019-08-24T13:19:46Z",
          "loadState": { 
            "loadStateDescription": "Posted", 
            "loadStateId": 1 
          },
          "loadStateReason": { 
            "loadStateReasonDescription": "Not Specified", 
            "loadStateReasonId": 0 
          },
          "comment": "Test data"
        }
      ],
      "source": "Integration",
      "equipmentAttributes": {
        "equipmentTypeId": 17,
        "equipmentOptions": [
          2,
          3
        ],
        "transportationModeId": 2,
        "otherEquipmentNeeds": "Pallet return"
      },
      "commodityId": 1,
      "loadStops": [
        {
          "id": "5465e391-6ada-e911-aa11-ac4ba6accd3e",
          "type": 1,
          "sequence": 1,
          "earlyDateTime": "2019-09-18T17:09:04Z",
          "lateDateTime": "2019-09-18T17:10:04Z",
          "location": {
            "id": "bc72bac5-da02-4c08-9eda-f42b0f1c2cb3",
            "locationName": "ABC Warehouse",
            "city": "New York",
            "state": "NY",
            "streetAddress1": "261 madison ave",
            "streetAddress2": "101",
            "countryCode": "USA",
            "postalCode": "10016",
            "latitude": 40.7505,
            "longitude": -73.9806
          },
          "contactName": "Joseph Adams",
          "contactPhone": "5553125555",
          "stopNotes": "Be polite",
          "referenceNumbers": [
            "123"
          ]
        },
        {
          "id": "5665e391-6ada-e911-aa11-ac4ba6accd3e",
          "type": 2,
          "sequence": 2,
          "earlyDateTime": "2019-09-21T17:11:04Z",
          "lateDateTime": "2019-09-21T17:12:04Z",
          "location": {
            "id": "1a7667b0-1699-48ca-b8ef-75e4e5cf0b6a",
            "locationName": "XYZ Warehouse",
            "city": "Houston",
            "state": "TX",
            "streetAddress1": "1902 westheimer rd",
            "streetAddress2": "101",
            "countryCode": "USA",
            "postalCode": "77098",
            "latitude": 29.743,
            "longitude": -95.4075
          },
          "contactName": "Marty",
          "contactPhone": "5553325555",
          "stopNotes": "",
          "referenceNumbers": [
            "6789",
            "234hhd3"
          ]
        }
      ],
      "note": "For more details around this load please call 555-432-1026 and reference load number 39363.",
      "loadNumber": "LN_39363",
      "loadTrackingRequired": true,
      "rateAttributes": {
        "postedAllInRate": {
          "amount": 1000.53,
          "currencyCode": "USD"
        },
        "tenderAllInRate": {
          "amount": 1000.53,
          "currencyCode": "USD"
        }
      },
      "customData": [
        {
          "key": "LoadNumber",
          "value": "1234"
        },
        {
          "key": "MySpecialKey",
          "value": "MySpecialValue"
        }
      ], 
      "dimensional": {
        "length": 10.00,
        "width": 10.00,
        "weight": 2900.00,
        "height": 8.00,
        "palletCount": 2,
        "pieceCount": 1,
        "cube": 800.00
      },
      "loadActionAttributes": {
        "loadActionId": "1",
        "loadActionOption": "PostOnlineTender"
      },
      "loadLabel": "Copper Cauldron",
      "tenderNotes": "Lannister always pays his debts",
      "loadReferenceNumbers": [
        "123",
        "heth4573"
      ],
      "termsAndConditions": {
        "id": "b64f76d0-5ee1-e911-aa11-ac4ba6accd3e",
        "name": "TC 9651"
      }
    }
  ]
}
  • Response Fields:
FieldTypeDescription
PaginationobjectThe Pagination object that contains the pagination data
ResultsarrayAn array of LoadResponse objects that match the provided criteria
  • Error Fields: Error responses contain an HTTP Code and an Error object.

Get the available fields to search

📘

### Get Available Search Fields

GET /loadmanagement/v2/load/searchfield Get available search fields

Authorization bearer token
Accept application/json
URL Params None
Body Params None

GET https://api-int.truckstop.com/loadmanagement/v2/load/searchfield HTTP/1.1
Authorization: bearer <access_token>
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
CorrelationId: 901b6bd9-cd5a-4fca-9955-fc94db7eeacd

[
  {
    "searchName": "CreatedByUserId",
    "searchDataType": "Guid",
    "comparisonOperators": [
      "Equal",
      "In"
    ]
  },
  {
    "searchName": "CreatedDateTime",
    "searchDataType": "DateTime",
    "comparisonOperators": [
      "Between",
      "Gt",
      "Gte",
      "LessThan",
      "LessThanOrEqual"
    ]
  }
]
  • Response Fields: The response is an array of objects detailing the data type and available search operations for fields used in a query to the search endpoint.
FieldTypeDescription
SearchNamestringThe name of the field
SearchDataTypestringSearch data type allowed for this field
ComparisonOperatorsarrayArray of Search operators allowed for this field
  • Error Fields: Error responses contain an HTTP Code and an Error object.

Get a list of fields that can be used to sort search results

📘

### Get Available Sort Fields

GET /loadmanagement/v2/load/sortfield Get available sort fields

Authorization bearer token
Accept application/json
URL Params None
Body Params None

GET https://api-int.truckstop.com/loadmanagement/v2/load/sortfield HTTP/1.1
Authorization: bearer <access_token>
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
CorrelationId: 901b6bd9-cd5a-4fca-9955-fc94db7eeacd

[
  {
    "sortName": "height"
  },
  {
    "sortName": "length"
  },
  {
    "sortName": "pieceCount"
  }
]
  • Response Fields: The response is an array of field names that can be used to sort search results from the search endpoint.
  • Error Fields: Error responses contain an HTTP Code and an Error object.