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.

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

Updates the details for the specific order.

PATCHhttps://api.autoenhance.ai//v3/orders/{id}
Authorization
Path parameters
id*string
Body
namestring

The name for the order.

order_idstring

The ID for the order.

Response

Successful response

Body
created_atstring (date-time)

The creation date of the order.

imagesarray of ImageOut (object)
is_mergingboolean

The processing status for the order

is_processingany

The processing status for the order

last_updated_atstring (date-time)

The last updated date of the order.

namestring

The name for the order.

order_idstring

The ID for the order.

statusenum

The status of the order.

waitingprocessingprocessederror
Request
const response = await fetch('https://api.autoenhance.ai//v3/orders/{id}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "created_at": "2024-11-21T06:29:44.034Z",
  "images": [
    {
      "ai_version": "text",
      "brightness_boost": "NONE",
      "brightness_boost_external": "NONE",
      "brightness_boost_internal": "NONE",
      "clarity_level": "NONE",
      "cloud_type": "CLEAR",
      "contrast_boost": "NONE",
      "contrast_boost_external": "NONE",
      "contrast_boost_internal": "NONE",
      "denoise_level": "NONE",
      "downloaded": false,
      "enhance": true,
      "enhance_type": "property",
      "image_id": "123e4567-e89b-12d3-a456-426614174000",
      "image_name": "text",
      "image_type": "text",
      "lens_correction": true,
      "order_id": "text",
      "privacy": false,
      "saturation_level": "NONE",
      "scene": "text",
      "sharpen_level": "NONE",
      "sky_replacement": false,
      "status": "waiting",
      "user_id": "text",
      "vertical_correction": false,
      "window_pull": false
    }
  ],
  "is_merging": false,
  "last_updated_at": "2024-11-21T06:29:44.034Z",
  "name": "text",
  "order_id": "text",
  "status": "waiting"
}

Last updated