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.

 

Authentication

The Tucia API uses Basic Auth for authorization. The first step is to generate a private pair of API KEY and API SECRET.

Before each request, you need to use HMAC-SHA256 algorithm to generate a signature, composed of the API KEY, API SECRET, a timestamp and the payload. Please make sure to convert all numbers to string format, e.g. 123 to "123".

This is an example of implementation in PHP:


<?php

   // This is an example payload:
   $payloadArray=array(
      "project_name" => "beach wedding",
      "instructions" => array("slim the waist", "tan skin more")
   );

   // Merge the payload with API KEY and a timestamp:
   $queryArray=array_merge($payloadArray, array(
      "api_key" => "YOUR_API_KEY",
      "timestamp" => strval(gmdate("U"))

   ));

   // Order the parameters by key ascending:
   ksort($queryArray);

   // Convert the queryArray to string by JSON:
   $queryString=json_encode($queryArray);

   // Generate API signature:
   $queryArray["signature"]=hash_hmac("sha256", $queryString, "YOUR_API_SECRET");

The final query parameters will be something like this:

api_key

01B9C5C41C88D9403424C05AC4960323

instructions

['slim the waist', 'tan skin more']

project_name

beach wedding

timestamp

1512787346

signature

6a0b7f40fad6126500a21d6236086558c5d49594abe4b5bb491901de51fcc7a1

 

Next: Account balance