Editing
const apiKey = "YOUR_API_KEY";
const orderId = "ID_OF_YOUR_ORDER";
const editOrder = async (orderId, apiKey) => {
const editOrderResponse = await fetch(
`https://api.autoenhance.ai/v3/orders/${orderId}`,
{
method: "PATCH",
headers: {
"Content-Type": "application/json",
"x-api-key": apiKey,
},
body: JSON.stringify({
name:"Edited name of my order"
}),
}
);
const { order_id, name, images, status } = await editOrderResponse.json();
}import requests
api_key = "YOUR_API_KEY"
order_id = "ID_OF_YOUR_ORDER"
def edit_order(api_key, order_id):
url = f"https://api.autoenhance.ai/v3/orders/{order_id}"
headers = {
"Content-Type": "application/json",
"x-api-key": api_key,
}
payload = {
"name": "Edited name of my order"
}
response = requests.patch(url, headers=headers, json=payload)
response_data = response.json()
order_id = response_data.get('order_id')
name = response_data.get('name')
images = response_data.get('images')
status = response_data.get('status')
return order_id, name, images, statusSpecification
Updates the details for the specific order. Images can be sorted using the sort_images_by parameter.
Authorizations
x-api-keystringRequired
Path parameters
idstringRequired
Query parameters
sort_images_byundefined · enumOptionalPossible values:
Specifies sort order for images in the order
Body
default_image_sort_orderundefined · enumOptionalPossible values:
Default sort order for images in the order. Prefix with '-' for descending order.
namestringOptional
The name for the order.
order_idstringOptional
The ID for the order.
Responses
200
Successful response
application/json
401
Authentication error
application/json
404
Not found
application/json
422
Validation error
application/json
patch
/v3/orders/{id}Last updated
Was this helpful?