curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X PUT https://api.ayrshare.com/api/ads/snapchat/ads \
-d '{"adId": "c3a1e2d4-0000-4000-8000-0000000000ad", "status": "paused"}'
{
"status": "success",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
"requestedStatus": "PAUSED"
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Status ARCHIVED is not supported on snapchat. Supported: ACTIVE, PAUSED, DELETED."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to boost post. Please try again.",
"details": "Snapchat ad squad e5f6a7b8-0000-4000-8000-0000000000sq is PAUSED. Resume the ad squad in Snapchat to run this ad."
}
Snapchat Ads
更新广告
暂停、恢复或删除通过 Ayrshare 推广的 Snapchat 广告,包括广告系列何时一并恢复,以及更改失败后如何检查广告。
PUT
/
ads
/
snapchat
/
ads
curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X PUT https://api.ayrshare.com/api/ads/snapchat/ads \
-d '{"adId": "c3a1e2d4-0000-4000-8000-0000000000ad", "status": "paused"}'
{
"status": "success",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
"requestedStatus": "PAUSED"
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Status ARCHIVED is not supported on snapchat. Supported: ACTIVE, PAUSED, DELETED."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to boost post. Please try again.",
"details": "Snapchat ad squad e5f6a7b8-0000-4000-8000-0000000000sq is PAUSED. Resume the ad squad in Snapchat to run this ad."
}
暂停、恢复或删除你通过推广帖子创建的 Snapchat 广告。
paused会停止广告及其花费。deleted会在 Snapchat 中删除广告。active会恢复广告。如果广告所在的广告系列已暂停且仅包含此广告,该广告系列也会恢复。- 广告只有在其 ad squad 和广告系列都处于活动状态时才会投放。如果 ad squad 已在 Snapchat 中暂停,或广告系列已暂停且包含其他广告,
active会返回code: 369。请先在 Snapchat Ads Manager 中恢复它们。 - Snapchat 没有归档状态,因此
archived会返回code: 101。 - Ayrshare 没有记录的广告可以暂停或删除,但不能设置为
active。该请求会返回code: 400。请提供广告 ID 联系支持团队。 - 如果
active失败且 Snapchat 无法确认广告已再次停止,错误中会带有warning:广告可能正在投放并产生花费。请在 Snapchat Ads Manager 中检查,或再次发送paused。 - 失败的
paused或deleted不带warning,但广告可能仍在投放。请在已推广广告或 Snapchat Ads Manager 中检查,并再次发送更改。 - 要查看广告的当前状态,请使用已推广广告。
请求头参数
请求体参数
Snapchat 广告 ID,即推广帖子返回的
id。curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X PUT https://api.ayrshare.com/api/ads/snapchat/ads \
-d '{"adId": "c3a1e2d4-0000-4000-8000-0000000000ad", "status": "paused"}'
{
"status": "success",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
"requestedStatus": "PAUSED"
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Status ARCHIVED is not supported on snapchat. Supported: ACTIVE, PAUSED, DELETED."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to boost post. Please try again.",
"details": "Snapchat ad squad e5f6a7b8-0000-4000-8000-0000000000sq is PAUSED. Resume the ad squad in Snapchat to run this ad."
}