Truck Posting Web Service Requests
POST | /v13/Posting/TruckPosting.svc | Posts or updates a collection of trucks. |
---|---|---|
Authorization | Username, Password, & Integration ID | |
SOAP Action | http://webservices.truckstop.com/v11/ITruckPosting/PostTrucks | |
Content Type | text/xml | |
Accept | text/xml | |
URL Params | None | |
Body Params | XML data |
## Post a Truck
Input
RequirementsAuthentication requires an account with a valid user name, password, and integration ID that has Truck Posting Web Service enabled.
If no handle is supplied, it will default to “Dispatch”(Note: The truck object also has a handle field. If both are specified, the truck’s handle will take precedence.).
Origin and Destination City/State spelling will be validated and, if possible, auto-corrected before submitting post request. Invalid Origin or Destination will be rejected with an error message which includes suggestions for valid spellings.
A Truck Post requires the following:
- Origin City, State, and Country
- Equipment Type
- Date Available - Date Available (must be current date or in the future)
- Updating a truck has the same requirements as posting with the addition of the TruckID(s) or Truck Number(s) is specified.
Output
Sample Request/Responsecurl --location 'https://testws.truckstop.com/v13/Posting/TruckPosting.svc' \ --header 'Content-Type: text/xml' \ --header 'SOAPAction: http://webservices.truckstop.com/v11/ITruckPosting/PostTrucks' \ --data ' <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v11="http://webservices.truckstop.com/v11" xmlns:web="http://schemas.datacontract.org/2004/07/WebServices" xmlns:web1="http://schemas.datacontract.org/2004/07/WebServices.Posting" xmlns:web2="http://schemas.datacontract.org/2004/07/WebServices.Objects" xmlns:truc="http://schemas.datacontract.org/2004/07/Truckstop2.Objects"> <soapenv:Header/> <soapenv:Body> <v11:PostTrucks> <!--Optional:--> <v11:trucks> <web:IntegrationId>12345</web:IntegrationId> <web:Password>MyPass123!</web:Password> <web:UserName>MyWSUserName</web:UserName> <web1:Trucks> <!--Zero or more repetitions:--> <web2:Truck> <web2:DateAvailable>2024-11-07T16:52:08.664Z</web2:DateAvailable> <!--Optional:--> <web2:DestinationCity></web2:DestinationCity> <!--Optional:--> <web2:DestinationCountry>usa</web2:DestinationCountry> <!--Optional:--> <web2:DestinationState></web2:DestinationState> <web2:EquipmentType>v</web2:EquipmentType> <!--Optional:--> <web2:IsDaily>false</web2:IsDaily> <web2:IsLoadFull>false</web2:IsLoadFull> <web2:OriginCity>seattle</web2:OriginCity> <web2:OriginCountry>usa</web2:OriginCountry> <web2:OriginState>wa</web2:OriginState> <web2:Quantity>1</web2:Quantity> <!--Optional:--> <web2:RatePerMile>3</web2:RatePerMile> <!--Optional:--> <web2:SpecInfo>24</web2:SpecInfo> <!--Optional:--> <web2:TimeAvailable>12:00:00</web2:TimeAvailable> <web2:TruckID>0</web2:TruckID> <!--Optional:--> <web2:TruckNumber>144</web2:TruckNumber> <!--Optional:--> <web2:Width>1</web2:Width> </web2:Truck> </web1:Trucks> </v11:trucks> </v11:PostTrucks> </soapenv:Body> </soapenv:Envelope> '
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <PostTrucksResponse xmlns="http://webservices.truckstop.com/v11"> <PostTrucksResult xmlns:a="http://schemas.datacontract.org/2004/07/WebServices.Objects" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Errors xmlns="http://schemas.datacontract.org/2004/07/WebServices"/> <a:TruckIds xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <b:int>66337780</b:int> </a:TruckIds> <a:TruckNumbers xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <b:string>144</b:string> </a:TruckNumbers> </PostTrucksResult> </PostTrucksResponse> </s:Body> </s:Envelope>