0

我想在 php 的帮助下实现 Fulfillment api,但我收到此错误 https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillment?api[version]=2020- 04#create-2020-04

{“错误”:“未找到”}

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://logix-testing.myshopify.com/admin/api/2020-04/orders/2279798145083/fulfillments.json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS =>"{\n  \"fulfillment\": {\n    \"location_id\": 905684977,\n    \"tracking_number\": \"123456789\",\n    \"tracking_urls\": [\n      \"https://shipping.xyz/track.php?num=123456789\",\n      \"https://anothershipper.corp/track.php?code=abc\"\n    ],\n    \"notify_customer\": true\n  }\n}\n",
  CURLOPT_HTTPHEADER => array(
    "X-Shopify-Access-Token: shpat_XXXXXXXX84bf9870369c0",
    "Content-Type: application/json",

  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
4

0 回答 0