Usage examples

Below are some examples demonstrating how to make requests to each of the API methods described earlier.

1. Create Order

These examples use the requests library, which is a popular choice for making HTTP requests in Python. If you haven't already, you will need to install the requests library using pip:

pip install requests
import requests
import json

url = "https://api.aryze.io/v1/orders"
headers = {"Content-Type": "application/json", "x-api-key": "YOUR_API_KEY"}
data = {
    "customerName": "John Doe",
    "chainId": "1",
    "amount": "1000",
    "mintWallet": "0x1234567890abcdef",
    "customerOrder": "Order123",
    "stableCoin": "eUSD"
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.text)

2. Get All Orders

3. Get Order By ID

4. Update Order

These examples show how to use Python and JavaScript to interact with the Aryze Orders API, including how to send GET and POST requests, include headers, and serialize data to JSON for the request body. Remember to adjust parameters as needed to match your requirements.

Was this helpful?