curl -X DELETE "https://api.alura.io/v1/workspace/ads/groups/900000101?shop_id=22841907" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Idempotency-Key: 5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c"const res = await fetch('https://api.alura.io/v1/workspace/ads/groups/900000101?shop_id=22841907', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.ALURA_API_KEY}`,
'Idempotency-Key': '5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c',
},
});
console.log(await res.json());import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.alura.io/v1/workspace/ads/groups/900000101?shop_id=22841907",
method="DELETE",
headers={
"Authorization": f"Bearer {os.environ['ALURA_API_KEY']}",
"Idempotency-Key": "5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c",
},
)
with urllib.request.urlopen(request) as response:
print(json.load(response)){
"object": "workspace.ad_group_write",
"action": "delete",
"shop_id": "22841907",
"group_id": "900000101",
"name": null,
"listing_ids": [],
"applied": [],
"failed": [],
"verified": true,
"change": {
"id": "chn_01JMOCK0000000000000000000"
}
}{
"object": "workspace.change",
"id": "<string>",
"shop_id": "<string>",
"target": {
"type": "<string>",
"id": "<string>"
},
"source": "<string>",
"actor": {
"type": "<string>",
"id": "<string>"
},
"write_id": "<string>",
"outcome": "<string>",
"fields": [
{
"field": "<string>",
"before": "<unknown>",
"after": "<unknown>",
"unrecorded": [
"before"
],
"omitted": [
"before"
]
}
],
"applied_fields": [
"<string>"
],
"failed_fields": [
{
"field": "<string>",
"code": "<string>"
}
],
"before_source": "<string>",
"before_as_of": "<string>",
"event": "<string>",
"revertable": true,
"not_revertable_reason": "<string>",
"reverts": "<string>",
"created_at": "<string>",
"as_of": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "https://docs.alura.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized",
"detail": "Unauthorized",
"suggestion": "Send a valid API key as `Authorization: Bearer alura_sk_...`.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>"
}{
"type": "https://docs.alura.io/errors/method_not_allowed",
"title": "Method not allowed",
"status": 405,
"code": "method_not_allowed",
"detail": "Method not allowed",
"suggestion": "Use one of the methods in the Allow header.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>",
"state": "login_expired",
"holder": {
"label": "<string>",
"last_seen_at": "<string>"
},
"last_served_at": "<string>",
"action": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>",
"retry_after_seconds": 2
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "shop_busy",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>",
"hint": {
"range": "last_30"
}
}Delete ad group
Delete one of your shop’s Etsy Ads ad groups. Its listings stay advertised as they were, in no group.
curl -X DELETE "https://api.alura.io/v1/workspace/ads/groups/900000101?shop_id=22841907" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Idempotency-Key: 5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c"const res = await fetch('https://api.alura.io/v1/workspace/ads/groups/900000101?shop_id=22841907', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.ALURA_API_KEY}`,
'Idempotency-Key': '5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c',
},
});
console.log(await res.json());import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.alura.io/v1/workspace/ads/groups/900000101?shop_id=22841907",
method="DELETE",
headers={
"Authorization": f"Bearer {os.environ['ALURA_API_KEY']}",
"Idempotency-Key": "5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c",
},
)
with urllib.request.urlopen(request) as response:
print(json.load(response)){
"object": "workspace.ad_group_write",
"action": "delete",
"shop_id": "22841907",
"group_id": "900000101",
"name": null,
"listing_ids": [],
"applied": [],
"failed": [],
"verified": true,
"change": {
"id": "chn_01JMOCK0000000000000000000"
}
}{
"object": "workspace.change",
"id": "<string>",
"shop_id": "<string>",
"target": {
"type": "<string>",
"id": "<string>"
},
"source": "<string>",
"actor": {
"type": "<string>",
"id": "<string>"
},
"write_id": "<string>",
"outcome": "<string>",
"fields": [
{
"field": "<string>",
"before": "<unknown>",
"after": "<unknown>",
"unrecorded": [
"before"
],
"omitted": [
"before"
]
}
],
"applied_fields": [
"<string>"
],
"failed_fields": [
{
"field": "<string>",
"code": "<string>"
}
],
"before_source": "<string>",
"before_as_of": "<string>",
"event": "<string>",
"revertable": true,
"not_revertable_reason": "<string>",
"reverts": "<string>",
"created_at": "<string>",
"as_of": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "https://docs.alura.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized",
"detail": "Unauthorized",
"suggestion": "Send a valid API key as `Authorization: Bearer alura_sk_...`.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>"
}{
"type": "https://docs.alura.io/errors/method_not_allowed",
"title": "Method not allowed",
"status": 405,
"code": "method_not_allowed",
"detail": "Method not allowed",
"suggestion": "Use one of the methods in the Allow header.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>",
"state": "login_expired",
"holder": {
"label": "<string>",
"last_seen_at": "<string>"
},
"last_served_at": "<string>",
"action": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>",
"retry_after_seconds": 2
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "shop_busy",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"change_id": "<string>",
"budget": "<string>",
"reason": "<string>",
"changed": [
"<string>"
],
"missing": [
"<string>"
],
"reconnect_url": "<string>",
"missing_scopes": [
"<string>"
],
"shop_id": "<string>",
"hint": {
"range": "last_30"
}
}extension_offline; the live status can name a more specific connection problem. Errors cost no API credits. See Chrome extension.curl -X DELETE "https://api.alura.io/v1/workspace/ads/groups/900000101?shop_id=22841907" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"
ads:write scope and the Etsy Ads workspace permission. Send dry_run=true to see what it would send, without sending it.
verified is true when Etsy’s groups no longer show the group.
When it is refused
Each of these sends nothing:| Answer | When |
|---|---|
404 | The shop has no such group |
409 | Etsy has not turned ad groups on for the shop |
The answer
200 once Etsy took the change and a read-back checked it, or 202 with the change while Etsy is still answering: get the change until its outcome is final. A write whose outcome on Etsy is unknown is never sent again, and a retry with the same Idempotency-Key answers its change.
Limits
The shop takes 20 Etsy writes a minute and 500 a day. A request that needs more than are left is refused first:429 live_rate_limited, nothing sent.
Only a write that lands is charged. See Credits and limits.Headers
Makes a retry safe: the same key with the same request within 24 hours answers from the first write (with Idempotent-Replayed: true) and never writes to Etsy twice; a write that failed with nothing written (Retry-After set) is tried again under it. The same key with a different request is a 409 conflict; while the first request still runs, 409 idempotency_processing (or the same 202). Required for relative changes such as adjust_price, and to add a listing file, image or video, or to change the alt text of an image (each uploads to Etsy, so a blind retry would upload again); a dry_run=true needs none.
1 - 255Path Parameters
Query Parameters
Response
OK: the write landed on Etsy (or, with dry_run=true, what it would do).
- Option 1
- Option 2
What the Etsy write did, checked by reading Etsy's groups or the listings' groups back.