Update subscription
Use the Update subscription API to modify an existing webhook subscription. You can change the delivery URL, headers, authentication details, or toggle the subscription status (Allowed values: ACTIVE, INACTIVE). The call returns the latest subscription configuration after the update.
How it works
- Send PATCH /v3/webhooks/subscriptions/{subscriptionId} with a JSON body containing only the fields you want to change.
- The service applies a partial update and returns the full subscription object.
- Use the response to verify that the intended fields were updated (for example, eventUrl, headers, authDetails, status).
Endpoint
PATCH https://marketplace.walmartapis.com/v3/webhooks/subscriptions/{subscriptionId}
Sample request
curl --request PATCH \ --url https://marketplace.walmartapis.com/v3/webhooks/subscriptions/subscriptionId \ --header 'accept: application/json' \ --header 'content-type: application/json'
import requests url = "https://marketplace.walmartapis.com/v3/webhooks/subscriptions/subscriptionId"
headers = { "accept": "application/json", "content-type": "application/json"
}
# Add the data you want to PATCH; here's a sample payload:
payload = { # "key": "value"
} response = requests.patch(url, headers=headers, json=payload) print(response.status_code)
print(response.json())
Modify your code
- Replace the
subscriptionIdwith the actual subscription ID you want to update. - Set headers and add the OAuth 2.0 bearer token in the Authorization header of your request.
- Send only fields you intend to change: The PATCH request supports partial updates. For example, send { "status": "INACTIVE" } to pause deliveries, or update eventUrl, headers, and authDetails together if your endpoint moved.
- Validate success criteria.
- HTTP status: 200 OK
- Body: The updated subscription. Confirm fields such as eventUrl, status, and authDetails match your request.
- 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
{ "eventType": "OFFER_UNPUBLISHED", "subscriptionId": "243ba4d0-b322-11ea-b385-0127e9b85538", "partnerId": "12300000359", "eventVersion": "V1", "resourceName": "ITEM", "eventUrl": "<https://example.com/events">, "headers": { "content-type": "application/json" }, "authDetails": { "authHeaderName": "Authorization", "authMethod": "BASIC_AUTH", "userName": "abc", "password": "test" }, "status": "ACTIVE" }
Next steps
- Use All subscriptions (GET /v3/webhooks/subscriptions) to confirm the updated configuration across your account.
- Send a Test notification (POST /v3/webhooks/test) to verify your endpoint returns 2xx with the new settings.
- If you paused a subscription, plan a change window to set status back to ACTIVE when ready.
Updated 1 day ago
