Best practices & rate limits

UUID

Tilby require valid Universally Unique Identifier (UUID) for each entity. Entities with invalid UUIDs will be rejected.

In some entities the UUID is expected, such as

UUIDs must be version 4, which appears as a random alphanumeric sequence like c03b56cd-eb1a-4aa2-9bb1-969460b4f8e2 .

Here is available a free online UUID validator.
Refer to your programming language to know how to generate a UUID v4, here are some examples:

function gen_uuid() {
    return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
        // 32 bits for "time_low"
        mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),

        // 16 bits for "time_mid"
        mt_rand( 0, 0xffff ),

        // 16 bits for "time_hi_and_version",
        // four most significant bits holds version number 4
        mt_rand( 0, 0x0fff ) | 0x4000,

        // 16 bits, 8 bits for "clk_seq_hi_res",
        // 8 bits for "clk_seq_low",
        // two most significant bits holds zero and one for variant DCE1.1
        mt_rand( 0, 0x3fff ) | 0x8000,

        // 48 bits for "node"
        mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
    );
}
String uuid = UUID.randomUUID().toString();
let uuid = UUID().uuidString
print(uuid)

Rate limit

Do not perform continuous pull requests on endpoints to get updates, use the webhook function to optimize the flow.

❗️

Rate limit

Request without the x-rate field may be subject to speed limitations and maximum number of requests per hour.

Please add the x-client on the header of any API request.

GET /v2/sales/ HTTP/1.1
Host: api.scloby.com
Authorization: Bearer m0J9lFG0tlUx2345DDGsVKyf57AK72G2VvcRuOF
x-client: MySweetAppName