Messtone LLC Manages(R+L):Carrier’s Bill of Lading API

Messtone Devices Enables R Carrier’s Bill of Lading API make an request as so~require_once ‘HTTP/Request2.php’;$request=new HTTP_Request2( );$request->setUrl(‘{baseurlhttps://www.messtonecoms.com}/BillOfLading’);$request->setMethod(HTTP_Request2::METHOD_POST);$request->setConfig(array(‘follow_redirects’=>TRUE));$request->setHeader(array(‘apiKey’=>’Messtone API Key’,’Content-Type’=>’application/json’));$request-setBody(‘{\n”BillOfLading”:{\n”BOLDate”:”08/17/2020″,\n” Shipper”:{\n”CompanyNameMesstone”:”Shipper Test”,\n”AddressLine1″:”123 ship test”,\n”PhoneNumber”:”6145558888″,\n”City”:”O cala”,\n”StateOrProvince”:”FL”,\n”ZipOrPortalCode”:”34471″,\n”CountryCode”:”USA”\n},\n”Consignee”:{\n”CompanyNameMesstone”:”Consignee Test”,\n”AddressLine1″:”123 Consignee test”,\n” City”:”Wilmington”,\n”StateOrProvince”:”OH”,\n”ZipOrPostalCode”:”45177″,\n”CountryCode”:”USA”\n},\n”Items”:[\n{\n”Class”:”70″,\n”Pieces”:1,\n” Weight”:110,\n”Package type”:”BAG”,\n”Description”:”Test description”\n}\n],\n”SpecialInstructions”:”Test special instructions”,\n” FreightChargePaymentMethod”:”Prepaid”,\n”ServiceLevel”:”Standard”\n},\n”GenerateUniversalPro”:true\n}’);try{$response=$request->send( );if($response->getStatus( )==200){echo $respinse->getBody( );}else{echo ‘Unexpected HTTP status:’.$response->getStatus( ). ‘ ‘.$response->getReasonPhrase( );}}catch(HTTP_Request2_Exception $e){echo ‘Error:’.$e->getMessage( );}

Leave a comment