Shopify api fulfillment or not working in python

1 0 1

Hello, I am trying to create a fulfillment for shopify orders that doesn't have fullfilment yet.

I have tried with by creating a shopify.Fulfillment object, also with fulfillment.create() and also with after adding the fulfillment object to the order.fulfillments list but nothing works.


Here is a part of my code in python : 


fulfillment = shopify.Fulfillment({
'location_id': 71647264989,
'line_items': order.line_items

fulfillment.tracking_company = 'Colissimo'
fulfillment.tracking_number = f'{num_suivi}'
fulfillment.tracking_url = ''
fulfillment.notify_customer = True




and here is the error message I get : 

ResourceNotFound: Not Found: https://'myshop'


Actually I don't understand where the problem comes from, I also updated my API autorisation for the token I am using and I selected all autorisations so it should be okay.


if I try to access the link from the error message, I see the fulfillments list which is empty.


If one of you have any idea to solve this problem it would be great.

Reply 1 (1)

Shopify Staff
1312 215 454

Hey @Romain_97,

I took a closer look at your post, and wanted to pass on a few things.  

  • First, there is an extensive Fulfillment Apps overview doc to help determine which workflow(s) and APIs an app will need, scopes required, and other insights specific to any processes.
  • This guide on migrating to fulfillment orders also includes details around important changes to handling fulfillments via the API.

After reviewing those resources and confirming that the app has all necessary scopes, I'd take another look at the input data.

Using the fulfillment resource endpoint POST /orders/{order_id}/fulfillments.json and the current API version 2023-01, be sure to reference the API docs to confirm all required fields for creating a fulfillment on a fulfillment order.

Here is an example payload with required fields from recent changes highlighted:


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

    "message":"{EXAMPLE MESSAGE}",


It is worth noting that while we aren't currently able to share any example code or in this case python specific examples, the error message appears to be related to either the input or potentially a lack of necessary API scopes. 

As a closing note, consider using an API client (Postman, Insomnia) to help debug and inform structure for any API calls, this can be invaluable for testing purposes. Hope that helps get the error sorted out on your end! 

@awwdam - Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit or the Shopify Web Design and Development Blog