error: "fulfillment": "Required parameter missing or invalid"

Aalen
New Member
2 0 0

Hi! I am trying to post a fulfillment with python but keep getting this:

{
    "errors": {
        "fulfillment": "Required parameter missing or invalid"
    }
}

Im using this Python code:

postData =  {
                        "fulfillment": {
                            "location_id": f"{location_id}",
                            "line_items": [
                                {
                                    "id": f"{product_id}",
                                    "quantity": 1
                                }
                            ]
                        }
                    }
        
        postDataJson = json.dumps(postData)

        headers = {"Accept": "application/json", "Content-Type": "application/json"}
        rPostData = requests.post(f"{url}/admin/api/2021-04/orders/{orderid}/fulfillments.json", json=postDataJson, headers=headers)

 

Thanks in advance.

 

REGARDS

0 Likes