Skip to content

Instantly share code, notes, and snippets.

@gshaw
Created April 25, 2018 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gshaw/e1a50ca29c848e913209fa6caf234ec2 to your computer and use it in GitHub Desktop.
Save gshaw/e1a50ca29c848e913209fa6caf234ec2 to your computer and use it in GitHub Desktop.
% php -f test.php
[{"id":"1ZMXWC94HM","status":"delivered","batch_id":null,"to_name":"Catalyst USA","to_address_1":"28522 KNICKERBOCKER RD","to_address_2":null,"to_city":"BAY VILLAGE","to_province_code":"OH","to_postal_code":"44140-1927","to_country_code":"US","to_phone":null,"return_name":"Catalyst Channel Marketing","return_address_1":"701 WHIRLPOOL ST","return_address_2":null,"return_city":"NIAGARA FALLS","return_province_code":"NY","return_postal_code":"14301-1037","return_country_code":"US","return_phone":"1-844-842-8777","package_contents":"documents","description":"Sales Report","value":"1.00","value_currency":"USD","order_id":null,"order_store":null,"package_type":"thick_envelope","size_unit":null,"size_x":0.0,"size_y":0.0,"size_z":0.0,"weight_unit":"lb","weight":1.0,"is_insured":true,"is_signature_requested":false,"postage_type":"usps_priority","carrier":"usps","carrier_tracking_code":"9405536895357014971047","tracking_url":"https://staging.chitchats.com/tracking/1zmxwc94hm","ship_date":"2018-04-25","purchase_amount":"9.45","provincial_tax":null,"provincial_tax_label":null,"federal_tax":null,"federal_tax_label":null,"postage_fee":"9.10","insurance_fee":"0.35","delivery_fee":"0.65","created_at":"2018-04-25T13:06:33.640-07:00","postage_label_png_url":"https://staging.chitchats.com/labels/shipments/1zmxwc94hm.png","postage_label_zpl_url":"https://staging.chitchats.com/labels/shipments/1zmxwc94hm.zpl"}]
<?php
$chitchat = curl_init();
curl_setopt($chitchat, CURLOPT_URL, "https://staging.chitchats.com/api/v1/clients/996582/shipments");
curl_setopt($chitchat, CURLOPT_HTTPHEADER, array("Authorization: t6s5g1wtrz5q19scwq1bhqq9mv"));
curl_setopt($chitchat, CURLOPT_RETURNTRANSFER, true);
$contents = curl_exec($chitchat);
echo $contents;
curl_close($chitchat);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment