406 Fulfillment API

Solved
Highlighted
Tourist
11 1 0

When I try posting to Shopify I get 406 Not acceptable back

 

{
  "fulfillment": {
    "tracking_company": "USPS",
    "tracking_number": "UJ049198627US",
    "notify_customer": true,
    "location_id": null,
    "line_items": [
      {
        "id": "1775132835889"
      }
    ]
  }
}

=== ERROR RestClient::NotAcceptable ===
406 Not Acceptable

 I believe the above request is valid, when I try changing the header accept from application/json to

 

accept: 'application/x-www-form-urlencoded'

 

I get a 200 response back but instead of updating the order's fulfillment it returns back the login screen below

 

 

<html>
  <body>
    <noscript>
      <a href="https://app.shopify.com/services/login/identity?destination_uuid=fca6d53a-5c24-4539-86f5-44712ed6c57b&amp;google_apps_uri=https%3A%2F%2Fann-arbor-tees.myshopify.com%2Fadmin%2Fauth%2Flogin%3Fgoogle_apps%3D1&amp;return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Fshop_name%3DAnn%2BArbor%2BTees%26state%3D-Q4-5zAnvE2Ka8RL5HSTX_hPbx9U76cjgFPfuotfA1xTJj0KPBPIn_5hTXyS4q9_L57YBejgsYwpLZLSnDDGpcvnZe0gkgz6saoRsxoHLA-4AJW2O-ndGOc0fFflfRuMKKPE-RBQiqHatdACmytBxYqF6FMq1ZEySIDi4WQCpABG3XMn_DrOXrztjgeUyM_071TTYzsVOVv8pq2EbJTY5Ru1hjvern_sDNgOZKuUwK8%253D&amp;ui_locales=en&amp;ux=shop">Continue</a>
    </noscript>

    <script type="text/javascript">
      window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=fca6d53a-5c24-4539-86f5-44712ed6c57b\u0026google_apps_uri=https%3A%2F%2Fann-arbor-tees.myshopify.com%2Fadmin%2Fauth%2Flogin%3Fgoogle_apps%3D1\u0026return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Fshop_name%3DAnn%2BArbor%2BTees%26state%3D-Q4-5zAnvE2Ka8RL5HSTX_hPbx9U76cjgFPfuotfA1xTJj0KPBPIn_5hTXyS4q9_L57YBejgsYwpLZLSnDDGpcvnZe0gkgz6saoRsxoHLA-4AJW2O-ndGOc0fFflfRuMKKPE-RBQiqHatdACmytBxYqF6FMq1ZEySIDi4WQCpABG3XMn_DrOXrztjgeUyM_071TTYzsVOVv8pq2EbJTY5Ru1hjvern_sDNgOZKuUwK8%253D\u0026ui_locales=en\u0026ux=shop";
    </script>
  </body>
</html>

In my post req I'm passing in my api user and key

0 Likes

Success.

Tourist
11 1 0

Nvm dumb mistake where urls were generated sometimes without order_ids- don't know how to close this

0 Likes