Hello, i can't seem to activate the read_checkout for this curl api

Highlighted
New Member
2 0 0

this is the code

 

 

$url = "https://api:pass@somesite.myshopify.com/admin/api/2020-04/checkouts/c8d2de24488fb55a7f28ab8fdf05156c.json";

$shopcurl = curl_init();
curl_setopt($shopcurl, CURLOPT_URL, $url);
curl_setopt($shopcurl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($shopcurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($shopcurl, CURLOPT_VERBOSE, 0);
//curl_setopt($shopcurl, CURLOPT_HEADER, 1);
curl_setopt($shopcurl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($shopcurl, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec ($shopcurl);
curl_close ($shopcurl);

print_r($response);

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 170

Have you set the right scope? Do you have a request ID from the response headers handy?

Notice; Out of office, replies will be delayed until my return. Thanks!
0 Likes
Highlighted
New Member
2 0 0

nope. i've no idea. i've just found out about shopify cURL in php. i can actually get checkout information from this code, but not orders. but when i open orders url in a regular browser, it gives me the json file that i need. i just couldn't get it through php curl. thanks in advanced for the solution .

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 170

You'll want to use the Orders API for order information.

Notice; Out of office, replies will be delayed until my return. Thanks!
0 Likes