curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE "https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"deleted": true
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "id 8c1e2f3a-0000-4000-8000-000000000101 is not an audience of ad account 5a0d1b2c-0000-4000-8000-000000000003."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Snapchat's reason"
}
Snapchat Ads
Xóa đối tượng
Xóa vĩnh viễn theo id một phân khúc đối tượng của tài khoản quảng cáo Snapchat, kể cả phân khúc tạo trong Ads Manager.
DELETE
/
ads
/
snapchat
/
audiences
/
{id}
curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE "https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"deleted": true
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "id 8c1e2f3a-0000-4000-8000-000000000101 is not an audience of ad account 5a0d1b2c-0000-4000-8000-000000000003."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Snapchat's reason"
}
Xóa một phân khúc đối tượng khỏi tài khoản quảng cáo Snapchat. Thao tác này là vĩnh viễn: phân khúc cũng biến mất khỏi Ads Manager, và quảng cáo đang chạy nhắm tới nó sẽ ngừng tiếp cận những người đó.
- Có thể xóa mọi phân khúc trên tài khoản quảng cáo được nêu trong
accountId, kể cả phân khúc được tạo trong Ads Manager. Phân khúc của tài khoản quảng cáo khác, hoặc id đã bị xóa hay không xác định, sẽ trả về400vớicode: 101, và không có gì bị xóa.
Tham số Header
Tham số đường dẫn
Id phân khúc, lấy từ Đối tượng.
Tham số truy vấn
curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE "https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"deleted": true
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "id 8c1e2f3a-0000-4000-8000-000000000101 is not an audience of ad account 5a0d1b2c-0000-4000-8000-000000000003."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Snapchat's reason"
}