Hi, I know there are so many similar questions were asked here about this matter, but none of them can solve my problem.
I tried to do the request with header
Content-Type: application/json
But I got null response.
When I don't add this header, I got "expected Hash to be a Array" for the line items.
My parameters
{"fulfillment":{"location_id":36460789840,"tracking_number":"783268019841","tracking_url":"https:\/\/www.fedex.com\/apps\/fedextrack\/?action=track&trackingnumber=783268019841","notify_customer":true}}
Any helps will be appreciated. Thanks.
Hey @Translead
Can you give us a request ID so we can look at some logs?
Kevin_A | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hey @Translead
Should be an x-request-id in the response header which is unique to each API request.
Kevin_A | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi,
Sorry for the late reply.
Parameter:
{"fulfillment":{"location_id":36460789840,"tracking_number":"1ZY470R50391724419","tracking_url":"https:\/\/www.ups.com\/track?loc=en_US&tracknum=1ZY470R50391724419&requester=WT\/","notify_customer":true,"line_items":[{"id":9607313064016,"quantity":"1"}]}}
Response:
"x-request-id":"737e54d0-7fce-498c-8270-9510cc7afed9",
{"headers":{"status":"HTTP\/2 400 \r","date":"Fri, 05 Mar 2021 02","content-type":"application\/json; charset=utf-8","x-sorting-hat-podid":"79","x-sorting-hat-shopid":"27011973200","referrer-policy":"origin-when-cross-origin","x-frame-options":"DENY","x-shopid":"27011973200","x-shardid":"79","x-stats-userid":"","x-stats-apiclientid":"3720635","x-stats-apipermissionid":"213548040272","http_x_shopify_shop_api_call_limit":"1\/40","x-shopify-shop-api-call-limit":"1\/40","x-shopify-api-version":"2020-10","strict-transport-security":"max-age=7889238","x-shopify-stage":"production","content-security-policy":"default-src 'self' data","x-content-type-options":"nosniff","x-download-options":"noopen","x-permitted-cross-domain-policies":"none","x-xss-protection":"1; mode=block; report=\/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Forders%2Ffulfillments&source%5Bsection%5D=admin_api&source%5Buuid%5D=737e54d0-7fce-498c-8270-9510cc7afed9","x-dc":"gcp-us-central1,gcp-us-east1,gcp-us-east1","x-request-id":"737e54d0-7fce-498c-8270-9510cc7afed9","set-cookie":"_shopify_fs=2021-03-05T02%3A58%3A10Z; Expires=Sat, 05-Mar-22 02","cf-cache-status":"DYNAMIC","cf-request-id":"08a1eb4b3400003afde7244000000001","expect-ct":"max-age=604800, report-uri=\"https","server":"cloudflare","cf-ray":"62b014bebfc53afd-SJC","alt-svc":"h3-27=\""},"response":"{\"errors\":{\"line_items\":\"expected Hash to be a Array\"}}"}
User | Count |
---|---|
12 | |
12 | |
7 | |
6 | |
5 |