I have the API docs Orders/Order Collection/List All Orders example running using Python2 but don’t have much experience upgrading code to Python3.
Am I missing Python3 examples?
Does anyone have some outline example Python3 code I can use, to get me going?
Many thanks.
Hey, here is some basic stuff you should be able to modify to your usecase
import requests
def get_veeqo_order(order_id):
url = f"{const.VEEQO_API_URL}/orders/{order_id}"
headers = {"x-api-key": const.VEEQO_API_KEY}
response = requests.get(url, headers=headers)
return response
def post_veeqo_allocations(order_id, payload):
url = f"{const.VEEQO_API_URL}/orders/{order_id}/allocations"
headers = {"x-api-key": const.VEEQO_API_KEY}
result = requests.post(url, headers=headers, json=payload)
return result
def put_veeqo_line_items(order_id, payload):
url = f"{const.VEEQO_API_URL}/orders/{order_id}"
headers = {"x-api-key": const.VEEQO_API_KEY}
result = requests.put(url, headers=headers, json=payload)
return result