Shopify Integration: Fulfilment API Issue

Shopify Integration: Fulfilment API Issue

William44
Shopify Partner
5 0 2

 

Hi,

I’m doing a custom integration using the Shopify API.   There is an existing order I’m trying to do an fulfilment.   When I send the data to the API, I get the following response.

 

Error Message.png

 

When I click on the link for the response, I shows me this.

 

Error 2.png

 

Do you know what would cause this type of issue?

 

Regards,

 

 

William

Replies 11 (11)

garyrgilbert
Shopify Partner
414 41 169

The 2022-07 api does not support fulfillments using that json structure anymore. 

Check out the new fulfillment api

 

Cheers

 

Gary

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
William44
Shopify Partner
5 0 2

Hi Gary, 

I tried that too and get the same error.  I feel this is more of a permission issue though I did assigned all permission for the API

 

Error 3.png

garyrgilbert
Shopify Partner
414 41 169

Just to confirm you did correclty set the accesstoken in the request header right?  BTW I sent the link to the api wrong in my first reply apparently.. sorry about that its supposed to be https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillment

 

Try switching to the 2023-01 api version in your request above too.

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

RobZone
Shopify Staff
76 10 22

The api is "/admin/api/<version>/fulfillments.json.  The URL in your screen shot is missing the `s`.  I'm not sure why you get that web page response though, I get an HTTP 406 when I put the wrong thing.

To learn more visit the Shopify Help Center or the Community Blog.

garyrgilbert
Shopify Partner
414 41 169

nice spot Rob! didn't notice it either.

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

William44
Shopify Partner
5 0 2

Thanks @RobZone  for noting typo for the URI and @garyrgilbert  for suggesting using an later API version.  The same error holds true.

 

William44_1-1677637660858.png

 

@garyrgilbert   I'm using basic auth.  Below is a sample me doing an GET request on orders that returns data without any errors. So I know I'm entering my API credentials correctly.  

 

William44_2-1677637679678.png

 

garyrgilbert
Shopify Partner
414 41 169

It looks to me like you have a space after the slash but before the api version

 

"admin/api/ 2023-01/fulfillments.json"

instead of

"admin/api/2023-01/fulfillments.json"

 

Give that a go

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
William44
Shopify Partner
5 0 2

Hi Gary,

 

great catch but same error.

 

 

William44_0-1677675611463.png

 

RobZone
Shopify Staff
76 10 22

I cannot reproduce this behaviour, but the symptoms indicate a problem with the api token.  Sorry I don't have a better answer for you.

To learn more visit the Shopify Help Center or the Community Blog.

William44
Shopify Partner
5 0 2

Hi Rob,

 

Even with the token same issue happens.

 

William44_0-1677856897214.png

 

alexnir
Tourist
3 0 0

try to get the collection from here:
Shopify (getpostman.com)

Create/update the variables in the collection (api_key, api_password, store_name, api version)
and then try again to do the call, from their collection.
If it's successful then you should be able to investigate the code and see what's different.