鏈接
GET https://9qrcode.com/api/links/
curl --request GET \
--url 'https://9qrcode.com/api/links/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://9qrcode.com/api/links/' \
--header 'Authorization: Bearer {api_key}' \
參數 | 细节 | 描述 |
---|---|---|
page | 可選的 整数 | 您想要结果的页面编号。默认为1 |
results_per_page | 可選的 整数 | 每页显示多少个结果。允许的值为:10 , 25 , 50 , 100 , 250 , 500 , 1000 。默认为25 。 |
{
"data": [
{
"id": 1,
"project_id": null,
"domain_id": 0,
"type": "link",
"url": "example",
"location_url": "https://example.com/",
"settings": {
"password": null,
"sensitive_content": false
},
"pageviews": 10,
"order": 0,
"start_date": null,
"end_date": null,
"datetime": "2025-04-11 00:48:22"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://9qrcode.com/api/links?&page=1",
"last": "https://9qrcode.com/api/links?&page=1",
"next": null,
"prev": null,
"self": "https://9qrcode.com/api/links?&page=1"
}
}
GET https://9qrcode.com/api/links/{link_id}
curl --request GET \
--url 'https://9qrcode.com/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://9qrcode.com/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"project_id": null,
"domain_id": 0,
"type": "link",
"url": "example",
"location_url": "https://example.com/",
"settings": {
"password": null,
"sensitive_content": false
},
"pageviews": 10,
"order": 0,
"start_date": null,
"end_date": null,
"datetime": "2025-04-11 00:48:22"
}
}
POST https://9qrcode.com/api/links
參數 | 细节 | 描述 |
---|---|---|
location_url | 需要 字符串 | 目的地的URL |
url | 可選的 字符串 | 生成链接的URL别名。如需随机生成,请留空。 |
domain_id | 可選的 整数 | - |
project_id | 可選的 整数 | - |
pixels_ids | 可選的 數組 整数 | - |
schedule | 可選的 布爾值 | - |
start_date | 可選的 字符串 | Available when: schedule = true |
end_date | 可選的 字符串 | Available when: schedule = true |
pageviews_limit | 可選的 整数 | - |
expiration_url | 可選的 字符串 | - |
password | 可選的 字符串 | - |
forward_query_parameters_is_enabled | 可選的 布爾值 | - |
utm_source | 可選的 字符串 | - |
utm_medium | 可選的 字符串 | - |
utm_campaign | 可選的 字符串 | - |
sensitive_content | 可選的 布爾值 | - |
http_status_code | 可選的 整数 | 允许的值:301 , 302 , 307 , 308 |
app_linking_is_enabled | 可選的 布爾值 | - |
cloaking_is_enabled | 可選的 布爾值 | - |
cloaking_title | 可選的 字符串 | - |
cloaking_custom_js | 可選的 字符串 | - |
cloaking_favicon | 可選的 文件 | - |
cloaking_opengraph | 可選的 文件 | - |
targeting_type | 可選的 字符串 | continent_code , country_code , city_name , device_type , browser_language , rotation , os_name , browser_name |
targeting_continent_code_key[index] | 可選的 字符串 | Available when: targeting_type = continent_code |
targeting_continent_code_value[index] | 可選的 字符串 | Available when: targeting_type = continent_code |
targeting_country_code_key[index] | 可選的 字符串 | Available when: targeting_type = country_code |
targeting_country_code_value[index] | 可選的 字符串 | Available when: targeting_type = country_code |
targeting_city_name_key[index] | 可選的 字符串 | Available when: targeting_type = city_name |
targeting_city_name_value[index] | 可選的 字符串 | Available when: targeting_type = city_name |
targeting_device_type_key[index] | 可選的 字符串 | Available when: targeting_type = device_type |
targeting_device_type_value[index] | 可選的 字符串 | Available when: targeting_type = device_type |
targeting_browser_language_key[index] | 可選的 字符串 | Available when: targeting_type = browser_language |
targeting_browser_language_value[index] | 可選的 字符串 | Available when: targeting_type = browser_language |
targeting_rotation_key[index] | 可選的 字符串 | Available when: targeting_type = rotation |
targeting_rotation_value[index] | 可選的 字符串 | Available when: targeting_type = rotation |
targeting_os_name_key[index] | 可選的 字符串 | Available when: targeting_type = os_name |
targeting_os_name_value[index] | 可選的 字符串 | Available when: targeting_type = os_name |
targeting_browser_name_key[index] | 可選的 字符串 | Available when: targeting_type = browser_name |
targeting_browser_name_value[index] | 可選的 字符串 | Available when: targeting_type = browser_name |
curl --request POST \
--url 'https://9qrcode.com/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://9qrcode.com/' \
--url 'https://9qrcode.com/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://9qrcode.com/' \
{
"data": {
"id": 1
}
}
POST https://9qrcode.com/api/links/{link_id}
參數 | 细节 | 描述 |
---|---|---|
location_url | 可選的 字符串 | 目的地的URL |
url | 可選的 字符串 | 生成链接的URL别名。如需随机生成,请留空。 |
domain_id | 可選的 整数 | - |
project_id | 可選的 整数 | - |
pixels_ids | 可選的 數組 整数 | - |
schedule | 可選的 布爾值 | - |
start_date | 可選的 字符串 | Available when: schedule = true |
end_date | 可選的 字符串 | Available when: schedule = true |
pageviews_limit | 可選的 整数 | - |
expiration_url | 可選的 字符串 | - |
password | 可選的 字符串 | - |
forward_query_parameters_is_enabled | 可選的 布爾值 | - |
utm_source | 可選的 字符串 | - |
utm_medium | 可選的 字符串 | - |
utm_campaign | 可選的 字符串 | - |
sensitive_content | 可選的 布爾值 | - |
http_status_code | 可選的 整数 | 允许的值:301 , 302 , 307 , 308 |
app_linking_is_enabled | 可選的 布爾值 | - |
cloaking_is_enabled | 可選的 布爾值 | - |
cloaking_title | 可選的 字符串 | - |
cloaking_custom_js | 可選的 字符串 | - |
cloaking_favicon | 可選的 文件 | - |
cloaking_opengraph | 可選的 文件 | - |
targeting_type | 可選的 字符串 | continent_code , country_code , city_name , device_type , browser_language , rotation , os_name , browser_name |
targeting_continent_code_key[index] | 可選的 字符串 | Available when: targeting_type = continent_code |
targeting_continent_code_value[index] | 可選的 字符串 | Available when: targeting_type = continent_code |
targeting_country_code_key[index] | 可選的 字符串 | Available when: targeting_type = country_code |
targeting_country_code_value[index] | 可選的 字符串 | Available when: targeting_type = country_code |
targeting_city_name_key[index] | 可選的 字符串 | Available when: targeting_type = city_name |
targeting_city_name_value[index] | 可選的 字符串 | Available when: targeting_type = city_name |
targeting_device_type_key[index] | 可選的 字符串 | Available when: targeting_type = device_type |
targeting_device_type_value[index] | 可選的 字符串 | Available when: targeting_type = device_type |
targeting_browser_language_key[index] | 可選的 字符串 | Available when: targeting_type = browser_language |
targeting_browser_language_value[index] | 可選的 字符串 | Available when: targeting_type = browser_language |
targeting_rotation_key[index] | 可選的 字符串 | Available when: targeting_type = rotation |
targeting_rotation_value[index] | 可選的 字符串 | Available when: targeting_type = rotation |
targeting_os_name_key[index] | 可選的 字符串 | Available when: targeting_type = os_name |
targeting_os_name_value[index] | 可選的 字符串 | Available when: targeting_type = os_name |
targeting_browser_name_key[index] | 可選的 字符串 | Available when: targeting_type = browser_name |
targeting_browser_name_value[index] | 可選的 字符串 | Available when: targeting_type = browser_name |
curl --request POST \
--url 'https://9qrcode.com/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
--url 'https://9qrcode.com/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
{
"data": {
"id": 1
}
}
DELETE https://9qrcode.com/api/links/{link_id}
curl --request DELETE \
--url 'https://9qrcode.com/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://9qrcode.com/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \