I am currently facing challenges with the Shopify Flow app while attempting to send an HTTP POST request to my Python API upon order creation. The issue revolves around constructing the JSON payload using liquid variables, leading to a “Bad Request” error.
Details:
-
Shopify Store URL : https://softyai.myshopify.com/
-
Shopify Flow Configuration:
- Event Trigger: Order Created
- Action: HTTP POST Request
-
API Endpoint: https://big-tactics-shipments-trauma.trycloudflare.com/test
-
Example Request Body Attempt:
{first_name:{{order.billingAddress.firstName}}
Issue Details:
Attempts with different JSON payload constructions, including {first_name:{{order.billingAddress.firstName}}}, {first_name:“{{order.billingAddress.firstName}}” and {first_name:{{order.billingAddress.firstName}}, have resulted in extra closing braces or unwanted characters (“{"first_name":"karanveer"”}").
Request for Assistance:
I request guidance to resolve the syntax error in the JSON payload for the Shopify Flow HTTP POST request. Any best practices or guidelines for constructing JSON payloads using liquid variables in Shopify Flow would be highly appreciated.
Your prompt attention to this matter is crucial for the optimal functioning of our Shopify store.
Thank you for your assistance.
Best regards,
Karanveer Singh
kaveer@legitbytes.com
