LOGO
LOGO
 

API Documentation

Current Version: 2.0

This API allows you to create and manage your orders with Tucia in a simple, programmatic way using conventional HTTP requests. The endpoints are intuitive and powerful, allowing you to easily make calls to retrieve information or to execute actions.

With this API, you are able to add Tucia's human-powered photo editing functionality to any application. This is especially useful for resellers who have their own websites or apps, and outsource the real editing service to Tucia.

 

Create new order

HTTP Request:

POST /orders/create

Credits in your account will be deducted accordingly. If credits are insufficient, errors will be returned

 

Query Parameters:

Name Type Description

name

string
optional

If blank, a random name will be assigned

example:

John's wedding

instructions

json
required

It's allowed to send a long paragraph of text, but it's recommended to separate into short sentences and send in json format

example:

["slim waist", "tan skin"]

customer_id

string
optional

If you are a reseller, you can specify your customer_id in your own application. Maximum 20 characters.

example:

1234

images

json
required

Each element in the represents 1 image, containing 3 parameters:
1. publicly accessible url of the image;
2. service type: "basic" or "extensive"; any other value will be considered as a reference image;
3. an optional instruction only applying to this image;

example:

[
   ["http:\/\/abc.com\/a.jpg","basic","this is for basic editing"],
   ["http:\/\/abc.com\/b.jpg","extensive","this one is a complicated edit"],
   ["http:\/\/abc.com\/c.jpg","reference","for reference only"]
]

Example successful response:


{
    "errors": [],
    "data": {
      "order_id": "UVWXYZ123",
      "project_name": "John's wedding",
      "customer_id": 1234,
      "price": 3,
      "status": "editing",
      "ordered_at": "2017-12-02T16:00:00+04:00",
      "estimated_delivery": "2017-12-03T12:00:00+04:00"
    }
}

Example error response:


{
    "errors": [
      "insufficient balance: 2 credits",
      "one file is not accessible from our server: http://abc.com/b.jpg"
    ]
}

 

Next: Cancel order