Editing

This API endpoint allows you to edit any order you own. To reprocess an image, you must provide the order_id and a valid API key.

circle-info

Important note Currently, you can only edit the name of your orders.

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();
}

The response after successfully editing an order will contain all the details of your order with the uploaded values.

Specification

Update Order

patch

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 · enumOptional

Specifies sort order for images in the order

Possible values:
Body
default_image_sort_orderundefined · enumOptional

Default sort order for images in the order. Prefix with '-' for descending order.

Possible values:
namestringOptional

The name for the order.

order_idstringOptional

The ID for the order.

Responses
chevron-right
200

Successful response

application/json
patch
/v3/orders/{id}

Last updated

Was this helpful?