Delete subscription
Use the Delete subscription API to remove an existing webhook subscription by its subscriptionId. After deletion, the subscription stops receiving events. A successful delete returns a confirmation message and the subscriptionId you removed.
If you only want to pause events, update the subscription status to INACTIVE instead of deleting it.
How it works
- Send DELETE /v3/webhooks/subscriptions/{subscriptionId} with the ID of the subscription you want to remove.
- The service verifies ownership and deletes the subscription.
- On success, the API returns 200 OK with a confirmation message. If the subscription does not exist, you may receive 404 Not Found.
Endpoint
DELETE https://marketplace.walmartapis.com/v3/webhooks/subscriptions/{subscriptionId}
Sample request
curl --request DELETE \ --url https://marketplace.walmartapis.com/v3/webhooks/subscriptions/subscriptionId \ --header 'accept: application/json'
import requests subscription_id = "subscriptionId" # replace with your target ID
base_url = "https://marketplace.walmartapis.com"
url = f"{base_url}/v3/webhooks/subscriptions/{subscription_id}" headers = { "accept": "application/json", # "Authorization": "Bearer <access_token>", # or: "Basic <base64-username:password>"
} resp = requests.delete(url, headers=headers, timeout=30)
resp.raise_for_status() # raises an error if not 2xx
print(resp.status_code)
try: print(resp.json())
except ValueError: print(resp.text)
Modify your code
- Replace the
subscriptionIdwith the actual subscription ID you want to delete. - Set headers and add the OAuth 2.0 bearer token in the Authorization header of your request.
- Validate success criteria.
- HTTP status: 200 OK
- Body: JSON containing the deleted subscriptionId and a success message.
- Handle transient errors: On 429 or 5xx, retry with exponential backoff and random jitter. Log only non-sensitive request metadata (timestamp, path, status, duration, attempt, backoff delay) and do not include credentials.
Sample response
{ "subscriptionId": "subscriptionId", "message": "Successfully deleted subscription" }
Next steps
- Use All subscriptions (GET /v3/webhooks/subscriptions) to confirm the subscription no longer appears.
- Recreate the subscription later with Create subscription (POST /v3/webhooks/subscriptions) if needed.
Updated 1 day ago
