Skip to content
This repository was archived by the owner on Oct 6, 2026. It is now read-only.
This repository was archived by the owner on Oct 6, 2026. It is now read-only.

Updating a Fulfillment via API Wrapper Fails #310

Closed as not planned
Closed as not planned

Description

@andessen

I have been fully utilizing the Python API Wrapper with general success but now I have determined a potential bug when trying to make a PUT request via the API via the fulfillments endpoint.

sff = shopify.Fulfillment.find_first(order_id='932467572816')
ssf.tracking_url = 'http://helloworldtracking.com/some_id'
ssf.save()
ssf.tracking_url

Here the tracking url is being updated but fails to change via the wrapper. Attempting the same request via a PUT utilizing the endpoint via requests seems to achieve the desired result.

Question: Am I utilizing the API appropriately for fulfillments & PUTs or this is a bug?

https://github.com/Shopify/shopify_python_api

Activity

  1. leocxy commented on Nov 8, 2020

    @leocxy

    Hi

    I got the same issue.

    Here are my configs

    API Version: 2020-07
    ShopifyAPI: 8.0.4

    Below is my codes

    fulfills = self.api.Fulfillment.find(order_id=order_id)
                for fulfill in fulfills:
                    # check tracking number
                    if len(fulfill.tracking_number) == 52 and not fulfill.tracking_url:
                        tracking_url = 'https://www.nzcouriers.co.nz/nzc/servlet/ITNG_TAndTServlet?page=1&VCCA=Enabled&Key_Type=BarCode&barcode_data={}'
                        tracking_url = tracking_url.format(fulfill.tracking_number.replace(' ', '+'))
                        print(tracking_url)
                        fulfill.tracking_url = tracking_url
                        res = fulfill.save()
                        print(res, fulfill.errors.full_messages())
                        exit()
    

    The res showing True, and none error messages. But the tracking URL does not update...

  2. self-assigned this
    on Nov 11, 2020
  3. mllemango commented on Nov 11, 2020

    @mllemango
    Contributor

    Hey @leocxy, in order to update the the tracking_url of the fulfillment, you actually have to use fulfill.tracking_urls by assigning a list to it, eg. fulfill.tracking_urls = ["google.com"].
    Unfortunately this isn't super clear, and I only found this out by looking at our API documentation.
    Let me know if you're still running into issues updating tracking!

  4. leocxy commented on Nov 11, 2020

    @leocxy

    Hi @mllemango, I was using GraphQL instead of "ShopifyAPI" to updating the tracking info.

    I know the API documentation. But I don't know how to call that with the python package "ShopifyAPI".

    Anyway, thank you for your reply.

  5. github-actions commented on Jan 17, 2023

    @github-actions

    This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

  6. github-actions commented on Jan 31, 2023

    @github-actions

    We are closing this issue because it has been inactive for a few months.
    This probably means that it is not reproducible or it has been fixed in a newer version.
    If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.

    If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions