Get started

    API Endpoint

            https://syblock.com.ar/api
                

The Syblock API provides programmatic access to save blockchain tokens.

To use this API, you need an API user and an API key. Please contact us at [email protected] to get your own API user/key.

Save Token


# Here is a curl example

curl -X POST \
  https://syblock.com.ar/api/save \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: your_api_key' \
  -H 'x-api-user: your_api_user' \
  -d 'your_json_data'


# Here is a PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => “https://syblock.com.ar/api/save”,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => “”,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => “POST”,
  CURLOPT_POSTFIELDS => “{\“text\“: \” DATA q quieras guardar - Syblock con @Syloper . Un trabajo en equipo! \“}”,
  CURLOPT_HTTPHEADER => array(
    “cache-control: no-cache”,
    “x-api-key: API_USER_TUYA”,
    “x-api-user: API_KEY_TUYA”
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo “cURL Error #:” . $err;
} else {
  echo $response;
}

                

To save your token you need to make a POST call to the following url :
https://syblock.com.ar/api/save



Result example :

{"txId":"0x34d29e25527f2ba78cf9f2c02a55957037054108794c0a2e408695c3d1cf1ed7"}
                

QUERY PARAMETERS

Field Type Description
api_key String Your API key.
api_user String Your API key.
BODY String (optional) A json with your content or data.

Save Token


# Here is a curl example

curl -X POST \
  https://syblock.com.ar/api/save \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: your_api_key' \
  -H 'x-api-user: your_api_user' \
  -d 'your_json_data with "reference" field to the unique asset tracking'


# Here is a PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => “https://syblock.com.ar/api/track,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => “”,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => “POST”,
  CURLOPT_POSTFIELDS => “{\reference\“: \”ID único del ASSET a trackear\“, \“text\“: \” DATA q quieras guardar - Syblock con @Syloper . Un trabajo en equipo! \“}”,
  CURLOPT_HTTPHEADER => array(
    “cache-control: no-cache”,
    “x-api-key: API_USER_TUYA”,
    “x-api-user: API_KEY_TUYA”
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo “cURL Error #:” . $err;
} else {
  echo $response;
}

                

To save your token you need to make a POST call to the following url :
https://syblock.com.ar/api/track



Result example :

{"ok":"Token generado","token_id":"220220202224013","token_txId":"0xd5eb6548377238e129fe0be3c42bbdb8ee33c8c660cc17f1adc559ad706a00e0"}
                

QUERY PARAMETERS

Field Type Description
api_key String Your API key.
api_user String Your API key.
BODY String A json with your content or data.
Parameter "reference" -> it's the unique asset element to track

GET Token


# Here is a curl example

curl -X POST \
  https://syblock.com.ar/api/get \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: your_api_key' \
  -H 'x-api-user: your_api_user' \
  -d '{"tokenId": "0x000000...."}'

# Here is a PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => “https://syblock.com.ar/api/get“,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => “”,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => “POST”,
  CURLOPT_POSTFIELDS => “{\"tokenId\": \"0x34d29e25527f2ba78cf9f2c02a55957037054108794c0a2e408695c3d1cf1ed7\"}“,
  CURLOPT_HTTPHEADER => array(
    “cache-control: no-cache”,
    “x-api-key: API_USER_TUYA”,
    “x-api-user: API_KEY_TUYA”
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo “cURL Error #:” . $err;
} else {
  echo $response;
}

                

To get your token information you need to make a POST call to the following url :
https://syblock.com.ar/api/get



Result example :

{
    "chain": "CELO",
    "token_name": "SyBlock_pato_120220120123605",
    "mark": "2022-01-20 10:22:29",
    "url": "https://syblock.com.ar/data/220220120132228",
    "txId": "0x34d29e25527f2ba78cf9f2c02a55957037054108794c0a2e408695c3d1cf1ed7",
    "data": "TEST Token",
    "blockHash": "0xffa507e604c7100a902fb6c44b9bae8204f109532d3ca933f736c981dadeaf4f",
    "blockNumber": 9465573,
    "from": "0xbc2eba680ee50d685cc4fe65f102aa70afb27d3f",
    "gas": 199550,
    "gasPrice": "500000000",
    "feeCurrency": null,
    "gatewayFeeRecipient": null,
    "gatewayFee": "0x0",
    "input": "0x50bb4e7f000000000000000000000000c31187d606495b57482c35d7a3136c16ba861d88000000000000000000000000000000000000000000000000000ff1f6941f7c000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002b68747470733a2f2f7379626c6f636b2e636f6d2e61722f646174612f323230323230313230313332323238000000000000000000000000000000000000000000",
    "nonce": 228,
    "to": "0x45871ed5f15203c0ce791efe5f4b5044833ae10e",
    "transactionIndex": 4,
    "value": "0",
    "type": "0x0",
    "ethCompatible": false,
    "contractAddress": null,
    "cumulativeGasUsed": 986659,
    "effectiveGasPrice": "0x1dcd6500",
    "gasUsed": 199550,
    "logs": [
        {
            "address": "0x45871ED5F15203C0ce791eFE5f4B5044833aE10e",
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x0000000000000000000000000000000000000000000000000000000000000000",
                "0x000000000000000000000000c31187d606495b57482c35d7a3136c16ba861d88",
                "0x000000000000000000000000000000000000000000000000000ff1f6941f7c00"
            ],
            "data": "0x",
            "blockNumber": 9465573,
            "transactionHash": "0x34d29e25527f2ba78cf9f2c02a55957037054108794c0a2e408695c3d1cf1ed7",
            "transactionIndex": 4,
            "blockHash": "0xffa507e604c7100a902fb6c44b9bae8204f109532d3ca933f736c981dadeaf4f",
            "logIndex": 8,
            "removed": false,
            "id": "log_c1efba83"
        }
    ],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000008000000000000000000020000000000000000000800000000000000010000000010000000006000000000000000000000000000000000000000000000001000000000000000000000000000000000010000000000000000000000000000000000800000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000080000000000000000000000000000000000000",
    "status": true,
    "transactionHash": "0x34d29e25527f2ba78cf9f2c02a55957037054108794c0a2e408695c3d1cf1ed7"
}
                

QUERY PARAMETERS

Field Type Description
api_key String Your API key.
api_user String Your API key.
BODY - tokenId String JSON A json with your token transaction ID.

GET History


# Here is a curl example

curl -X POST \
  https://syblock.com.ar/api/history \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: your_api_key' \
  -H 'x-api-user: your_api_user'


# Here is a PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => “https://syblock.com.ar/api/history“,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => “”,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => “POST”,
  CURLOPT_HTTPHEADER => array(
    “cache-control: no-cache”,
    “x-api-key: API_USER_TUYA”,
    “x-api-user: API_KEY_TUYA”
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo “cURL Error #:” . $err;
} else {
  echo $response;
}

                

To get your last tokens you need to make a POST call to the following url :
https://syblock.com.ar/api/history



Result example :

{
    "220220120132228": {
        "chain": "CELO",
        "token_name": "SyBlock_pato_120220120123605",
        "mark": "2022-01-20 10:22:29",
        "url": "https://syblock.com.ar/data/220220120132228",
        "txId": "0x34d29e25527f2ba78cf9f2c02a55957037054108794c0a2e408695c3d1cf1ed7",
        "data": "TEST Token",
        "tokenId": "220220120132228"
    },
    "220220120124130": {
        "chain": "CELO",
        "token_name": "SyBlock_pato_120220120123605",
        "mark": "2022-01-20 09:41:31",
        "url": "https://syblock.com.ar/data/220220120124130",
        "txId": "0x3892bb517fb3cfcc2dc01f581dcbb5088576c02629bdcf8a213ebe58e5303171",
        "data": "TEST Token",
        "tokenId": "220220120124130"
    },
    "220220120124100": {
        "chain": "CELO",
        "token_name": "SyBlock_pato_120220120123605",
        "mark": "2022-01-20 09:41:00",
        "url": "https://syblock.com.ar/data/220220120124100",
        "txId": "0xd38718f2dd3ef559745526176de76e6013225f2775bc8246a57ada2f5a2b81fd",
        "data": "TEST Token",
        "tokenId": "220220120124100"
    }
}
                

QUERY PARAMETERS

Field Type Description
api_key String Your API key.
api_user String Your API key.
BODY - PARAMETERS String JSON //WORK IN PROGRESS

GET Movements


# Here is a curl example

curl -X POST \
  https://syblock.com.ar/api/movements \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: your_api_key' \
  -H 'x-api-user: your_api_user'
  -d {"reference": "asset to track id"}


# Here is a PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => “https://syblock.com.ar/api/movements,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => “”,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => “POST”,
  CURLOPT_POSTFIELDS => “{"reference": "asset to track id"}”,
  CURLOPT_HTTPHEADER => array(
    “cache-control: no-cache”,
    “x-api-key: API_USER_TUYA”,
    “x-api-user: API_KEY_TUYA”
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo “cURL Error #:” . $err;
} else {
  echo $response;
}

                

To get your last tokens you need to make a POST call to the following url :
https://syblock.com.ar/api/movements



Result example :

{
    "220220204170958": {
        "token_name": "SyBlock_pato_120220120123605",
        "mark": "2022-02-04 14:09:58",
        "data_url": "https://syblock.com.ar/data/220220204170958",
        "txId": "0x74a8c66b0fff44999f106a9bfea997f081ee8cc38e4f294f1066cc8074a00b3f",
        "data": "{\"{\\\"reference\\\":_\\\"bulto o asset to track\\\",\\\"movimiento_info\\\":\\\"a_sdfsa_df__El_bulto_se_entreg\\u00f3_a_sdad_aadsasd\\\"}\":\"\"}",
        "tokenId": "220220204170958",
        "reference": "bulto o asset to track"
    },
    "220220204170952": {
        "token_name": "SyBlock_pato_120220120123605",
        "mark": "2022-02-04 14:09:52",
        "data_url": "https://syblock.com.ar/data/220220204170952",
        "txId": "0xc3c249fc66f6f2d6a4efe80f19e4e491da3c2938485131bc65c2d5e4cac8036d",
        "data": "{\"{\\\"reference\\\":_\\\"bulto o asset to track\\\",\\\"movimiento_info\\\":\\\"El_bulto_se_entreg\\u00f3_asdfsdf_sad_aadsasd\\\"}\":\"\"}",
        "tokenId": "220220204170952",
        "reference": "bulto o asset to track"
    },
    "220220202224013": {
        "token_name": "SyBlock_pato_120220120123605",
        "mark": "2022-02-02 19:40:14",
        "data_url": "https://syblock.com.ar/data/220220202224013",
        "txId": "0xd5eb6548377238e129fe0be3c42bbdb8ee33c8c660cc17f1adc559ad706a00e0",
        "data": "{\"{\\\"reference\\\":_\\\"bulto o asset to track\\\",\\\"movimiento_info\\\":\\\"El_bulto_se_entreg\\u00f3_a_bf_sdfsdf\\\"}\":\"\"}",
        "tokenId": "220220202224013",
        "reference": "bulto o asset to track"
    },
    "220220202223810": {
        "token_name": "SyBlock_pato_120220120123605",
        "mark": "2022-02-02 19:38:10",
        "data_url": "https://syblock.com.ar/data/220220202223810",
        "txId": "0x609dc146d3c4d131a6e14de41ae7597ef23bb28f0b7ddf35d3da11cd36eb8359",
        "data": "{\"{\\\"reference\\\":_\\\"bulto o asset to track\\\"}\":\"\"}",
        "tokenId": "220220202223810",
        "reference": "bulto o asset to track"
    }
}

                

QUERY PARAMETERS

Field Type Description
api_key String Your API key.
api_user String Your API key.
BODY - PARAMETERS String JSON REFERENCE to track

Errors

The API uses the following error codes:

Error Code Meaning
error "No se encontraron clientes activos" - Tu cliente está desactivado o se venció su licencia.
X001 Unknown or unvalid secret_key. This error appears if you use an unknow API key or if your API key expired.
40x Request validation failed. Please see data for additional information.
OR Transaction not found. Possible not exists or is still pending.