連結
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 01:06:51"
}
],
"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 01:06:51"
}
}
POST https://9qrcode.com/api/links
參數 | 細節 | 描述 |
---|---|---|
location_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 | 選擇性 字串 | 生成連結的網址別名。若要隨機生成,請留空。 |
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}' \