二维码
GET https://hrt.cc/api/qr-codes/
curl --request GET \
--url 'https://hrt.cc/api/qr-codes/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://hrt.cc/api/qr-codes/' \
--header 'Authorization: Bearer {api_key}' \
| 参数 | 详情 | 描述 |
|---|---|---|
| search | 可选 字符串 | 搜索关键词。 |
| search_by | 可选 字符串 | 搜索字段。允许的值:name。 |
| type | 可选 字符串 | 搜索字段。允许的值:text , url , phone , email , facetime , location , wifi , event , vcard , crypto , paypal。 |
| order_by | 可选 字符串 | 排序字段。允许的值:qr_code_id , datetime , last_datetime , name , type。 |
| order_type | 可选 字符串 | 排序方式。允许的值:ASC 升序,DESC 降序。 |
| page | 可选 整数 | 返回结果的页码,默认为 1。 |
| results_per_page | 可选 整数 | 每页返回的结果数量。允许的值:10 , 25 , 50 , 100 , 250 , 500 , 1000,默认为 25。 |
{
"data": [
{
"id": 1,
"type": "url",
"name": "Example name",
"qr_code": "https://hrt.cc/uploads/qr_code/example.svg",
"qr_code_logo": null,
"qr_code_background": null,
"settings": {
"foreground_type": "color",
"foreground_color": "#000000",
"background_color": "#ffffff",
"custom_eyes_color": false,
"qr_code_logo_size": 25,
"size": 500,
"margin": 0,
"ecc": "L",
"url": "https://example.com"
...
},
"embedded_data": "https://example.com",
"last_datetime": null,
"datetime": "2026-05-02 13:46:34",
},
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://hrt.cc/api/qr-codes?page=1",
"last": "https://hrt.cc/api/qr-codes?page=1",
"next": null,
"prev": null,
"self": "https://hrt.cc/api/qr-codes?page=1"
}
}
GET https://hrt.cc/api/qr-codes/{qr_code_id}
curl --request GET \
--url 'https://hrt.cc/api/qr-codes/{qr_code_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://hrt.cc/api/qr-codes/{qr_code_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"type": "url",
"name": "Example name",
"qr_code": "https://hrt.cc/uploads/qr_code/example.svg",
"qr_code_logo": null,
"qr_code_background": null,
"settings": {
"foreground_type": "color",
"foreground_color": "#000000",
"background_color": "#ffffff",
"custom_eyes_color": false,
"qr_code_logo_size": 25,
"size": 500,
"margin": 0,
"ecc": "L",
"url": "https://example.com"
...
},
"embedded_data": "https://example.com",
"last_datetime": null,
"datetime": "2026-05-02 13:46:34",
}
}
POST https://hrt.cc/api/qr-codes
| 参数 | 详情 | 描述 |
|---|---|---|
curl --request POST \
--url 'https://hrt.cc/api/qr-codes' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=New York' \
--form 'type=text' \
--form 'text=Hello!' \
--url 'https://hrt.cc/api/qr-codes' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=New York' \
--form 'type=text' \
--form 'text=Hello!' \
{
"data": {
"id": 1
}
}
POST https://hrt.cc/api/qr-codes/{qr_code_id}
curl --request POST \
--url 'https://hrt.cc/api/qr-codes/{qr_code_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Las Vegas' \
--url 'https://hrt.cc/api/qr-codes/{qr_code_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Las Vegas' \
{
"data": {
"id": 1
}
}
DELETE https://hrt.cc/api/qr-codes/{qr_code_id}
curl --request DELETE \
--url 'https://hrt.cc/api/qr-codes/{qr_code_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://hrt.cc/api/qr-codes/{qr_code_id}' \
--header 'Authorization: Bearer {api_key}' \