Barcode
Buat barcode di 34 simbologi, dengan opsi warna, ukuran, dan label.
Jenis yang didukung
Kirim type sebagai salah satu kunci simbologi ini. value harus sesuai aturan jenis tersebut.
- C32
- C39
- C39+
- C39E
- C39E+
- C93
- S25
- S25+
- I25
- I25+
- ITF14
- C128
- C128A
- C128B
- C128C
- EAN2
- EAN5
- EAN8
- EAN13
- UPCA
- UPCE
- MSI
- MSI+
- POSTNET
- PLANET
- TELEPENALPHA
- TELEPENNUMERIC
- RMS4CC
- KIX
- IMB
- CODABAR
- CODE11
- PHARMA
- PHARMA2T
POST/api/v1/barcodesBuat barcode
Kirim JSON berisi name, type, dan value. type adalah kunci simbologi seperti C128 atau EAN13. Warna, width_scale, height, dan display_text mengatur gambar yang dirender.
| Nama | Tipe | Wajib | Bawaan | Deskripsi |
|---|---|---|---|---|
| name | string | Ya | — | Label yang disimpan pada sumber daya. |
| type | string | Ya | C128 | Kunci simbologi seperti C128, EAN13, atau UPCA. |
| value | string | Ya | — | Data yang dikodekan dalam barcode. Harus valid untuk jenis yang dipilih. |
| project_id | integer | Tidak | — | Proyek tempat sumber daya dilampirkan. |
| is_bulk | boolean | Tidak | false | Jika true, satu barcode dibuat per baris di value. |
| foreground_color | string | Tidak | #000000 | Warna modul sebagai HEX. |
| background_color | string | Tidak | #ffffff | Warna HEX latar. Tetap lebih terang daripada modul. |
| width_scale | integer | Tidak | 2 | Pengali lebar batang, 1–10. |
| height | integer | Tidak | 30 | Tinggi batang dalam piksel, 30–1000. |
| display_text | boolean | Tidak | false | Jika true, value dicetak di bawah batang. |
Contoh permintaan
curl -X POST 'https://forqrcode.com/api/v1/barcodes' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Product SKU",
"type": "C128",
"value": "FORQR-1001",
"foreground_color": "#17191c",
"background_color": "#ffffff",
"width_scale": 2,
"height": 80,
"display_text": true
}'Contoh lainnya
EAN-13
curl -X POST 'https://forqrcode.com/api/v1/barcodes' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Retail EAN-13",
"type": "EAN13",
"value": "5901234123457",
"height": 70,
"display_text": true
}'Contoh respons
{
"data": {
"id": 1,
"type": "C128",
"name": "Product SKU",
"value": "FORQR-1001",
"barcode": "https://…/barcodes/…/barcode.svg"
}
}GET/api/v1/barcodesDaftar barcode
| Nama | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| page | integer | Tidak | Page number (default 1) |
| results_per_page | integer | Tidak | Items per page (default 25, max 100) |
| search | string | Tidak | Search term |
| search_by | string | Tidak | Column to search |
| order_by | string | Tidak | Sort column |
| order_type | string | Tidak | asc or desc |
| datetime_start | string | Tidak | ISO datetime filter start |
| datetime_end | string | Tidak | ISO datetime filter end |
curl -X GET 'https://forqrcode.com/api/v1/barcodes' \ -H 'Authorization: Bearer YOUR_API_KEY'
GET/api/v1/barcodes/{id}Baca satu barcode
| Nama | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| id | integer | Ya | — |
curl -X GET 'https://forqrcode.com/api/v1/barcodes/{id}' \
-H 'Authorization: Bearer YOUR_API_KEY'PATCH/api/v1/barcodes/{id}Perbarui barcode
| Nama | Tipe | Wajib | Bawaan | Deskripsi |
|---|---|---|---|---|
| id | integer | Ya | — | — |
| name | string | Tidak | — | Label yang disimpan pada sumber daya. |
| type | string | Tidak | C128 | Kunci simbologi seperti C128, EAN13, atau UPCA. |
| value | string | Tidak | — | Data yang dikodekan dalam barcode. Harus valid untuk jenis yang dipilih. |
| project_id | integer | Tidak | — | Proyek tempat sumber daya dilampirkan. |
| is_bulk | boolean | Tidak | false | Jika true, satu barcode dibuat per baris di value. |
| foreground_color | string | Tidak | #000000 | Warna modul sebagai HEX. |
| background_color | string | Tidak | #ffffff | Warna HEX latar. Tetap lebih terang daripada modul. |
| width_scale | integer | Tidak | 2 | Pengali lebar batang, 1–10. |
| height | integer | Tidak | 30 | Tinggi batang dalam piksel, 30–1000. |
| display_text | boolean | Tidak | false | Jika true, value dicetak di bawah batang. |
Contoh permintaan
curl -X PATCH 'https://forqrcode.com/api/v1/barcodes/{id}' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"value": "FORQR-2002",
"height": 90
}'DELETE/api/v1/barcodes/{id}Hapus barcode
| Nama | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| id | integer | Ya | — |
curl -X DELETE 'https://forqrcode.com/api/v1/barcodes/{id}' \
-H 'Authorization: Bearer YOUR_API_KEY'Nama parameter dan contoh JSON ditampilkan dalam bahasa Inggris. Ganti YOUR_API_KEY dengan kunci akun Anda.