Python API and Custom Fields for line items.

Python API and Custom Fields for line items.

Boneoh
Tourist
10 0 3

Hi, all! I'm new to Shopify and working on my first customizations. I'm using the Python API with AWS Lambda to process the orders after payment has completed.

 

A few questions about Custom Fields. In our application, the fields are not for customer input and will not be displayed to the customer. They are for back end processing of the order.

 

1. I've added Custom Fields to the order. How can I fetch and update these values using the Python API?

 

2. I don't see where I can add Custom Fields to a line item. Is it possible? I don't see any place to add them.

 

3. I've searched and have seen line_item properties and can fetch them with the Python API. But I can't find an example of how to update existing property values or add them. 

 

Thanks in advance!

 

Pete

Replies 2 (2)

made4Uo
Shopify Partner
3851 717 1197

Hi @Boneoh,

 

You need to run this GET command using requests and get the json data. You do need a token which I assume you already know

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
Boneoh
Tourist
10 0 3

Thank you for your reply! I should have been more clear. We are using the ShopifyAPI for Python that can be found here shopify_python_api  The docs are very limited but there was a test case for an order here order_test.py  that looks very similar to what I'm trying to do. I will give it a try and post back.