Sync records
curl --request GET \
--url https://yys-sqr-render-bsbe.onrender.com/api/records/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://yys-sqr-render-bsbe.onrender.com/api/records/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://yys-sqr-render-bsbe.onrender.com/api/records/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"records": [
{
"watermark_id": "SQR-A1B2C",
"template_id": "pharma",
"claim_status": "unclaimed",
"description": "<string>",
"record_metadata": {
"product_name": "Aspirin",
"dosage": "100mg"
},
"image_url": "<string>",
"watermarked_image_url": "<string>",
"scan_count": 0,
"nft_token_id": 123,
"mint_transaction_hash": "<string>",
"owner_address": "<string>",
"claimed_by": "<string>",
"claim_transaction_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"minted_at": "2023-11-07T05:31:56Z",
"claimed_at": "2023-11-07T05:31:56Z"
}
],
"count": 123,
"sync_timestamp": "2023-11-07T05:31:56Z"
}Records
Sync records
Incremental sync — returns records updated after the given timestamp. Useful for mobile apps and offline-first clients.
GET
/
api
/
records
/
sync
Sync records
curl --request GET \
--url https://yys-sqr-render-bsbe.onrender.com/api/records/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://yys-sqr-render-bsbe.onrender.com/api/records/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://yys-sqr-render-bsbe.onrender.com/api/records/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"records": [
{
"watermark_id": "SQR-A1B2C",
"template_id": "pharma",
"claim_status": "unclaimed",
"description": "<string>",
"record_metadata": {
"product_name": "Aspirin",
"dosage": "100mg"
},
"image_url": "<string>",
"watermarked_image_url": "<string>",
"scan_count": 0,
"nft_token_id": 123,
"mint_transaction_hash": "<string>",
"owner_address": "<string>",
"claimed_by": "<string>",
"claim_transaction_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"minted_at": "2023-11-07T05:31:56Z",
"claimed_at": "2023-11-07T05:31:56Z"
}
],
"count": 123,
"sync_timestamp": "2023-11-07T05:31:56Z"
}Authorizations
Pass a Supabase JWT or a 48-character hex API key as a Bearer token.
Query Parameters
ISO 8601 timestamp. Only records updated after this time are returned.

