curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"550e8400-e29b-41d4-a716-446655440000",
"6ba7b810-9dad-11d1-80b4-00c04fd430c8"
],
"type": "both",
"size": 512
}' \
"https://api.truthlocks.com/v1/attestations/codes/batch" \
--output verification-codes.zip
const zipBuffer = await client.attestations.getBatchCodes(
['550e8400-e29b-41d4-a716-446655440000', '6ba7b810-9dad-11d1-80b4-00c04fd430c8'],
{ type: 'both', size: 512 }
);
fs.writeFileSync('verification-codes.zip', Buffer.from(zipBuffer));
"<string>"الإشهادات
إنشاء رموز دفعة
POST
/
v1
/
attestations
/
codes
/
batch
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"550e8400-e29b-41d4-a716-446655440000",
"6ba7b810-9dad-11d1-80b4-00c04fd430c8"
],
"type": "both",
"size": 512
}' \
"https://api.truthlocks.com/v1/attestations/codes/batch" \
--output verification-codes.zip
const zipBuffer = await client.attestations.getBatchCodes(
['550e8400-e29b-41d4-a716-446655440000', '6ba7b810-9dad-11d1-80b4-00c04fd430c8'],
{ type: 'both', size: 512 }
);
fs.writeFileSync('verification-codes.zip', Buffer.from(zipBuffer));
"<string>"إنشاء رموز QR و/أو رموز شريطية لعدة شهادات دفعة واحدة. يُرجع ملف ZIP يحتوي على جميع صور الرموز المطلوبة.
حالات الاستخدام
- طباعة الشهادات بالجملة باستخدام رموز QR
- إنشاء تسميات لمجموعة منتجات كاملة
- تصدير رموز التحقق للتوزيع دون اتصال بالإنترنت
الاستجابة
يُرجع ملف ZIP (Content-Type: application/zip) يحتوي على صور PNG مسماة:
{attestation_id}-qr.pngلرموز QR{attestation_id}-barcode.pngللرموز الشريطية
حدود المعدل
طلبات الدفعة محدودة بمعدل 10 طلبات في الدقيقة. يمكن أن يحتوي كل طلب على ما يصل إلى 100 معرف إشهاد.curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"550e8400-e29b-41d4-a716-446655440000",
"6ba7b810-9dad-11d1-80b4-00c04fd430c8"
],
"type": "both",
"size": 512
}' \
"https://api.truthlocks.com/v1/attestations/codes/batch" \
--output verification-codes.zip
const zipBuffer = await client.attestations.getBatchCodes(
['550e8400-e29b-41d4-a716-446655440000', '6ba7b810-9dad-11d1-80b4-00c04fd430c8'],
{ type: 'both', size: 512 }
);
fs.writeFileSync('verification-codes.zip', Buffer.from(zipBuffer));
الجسم
application/json
الاستجابة
أرشيف ZIP لصور رمز PNG.
The response is of type file.

