Set up notifications
Create a notification destination, subscribe to a notification type, send a test notification and manage your setup.
This guide walks you through setting up notifications from start to finish. You create a destination, subscribe to a notification type, confirm delivery with a test notification, and then manage or remove your setup when it changes.
Before you begin
- Get an access token. See Authentication.
- Choose the notification type you want:
EMAIL,WEBHOOKS,SMS,PULLorMOBILE_PUSH. - For webhook delivery, have an endpoint ready that can receive notifications.
- All paths below are relative to
https://marketplace.walmart.com/seller/v1(sandbox:https://sandbox.marketplace.walmart.com/seller/v1).
Request bodies
The create destination, create subscription and send test notification operations take a JSON object body that isn't limited to a fixed set of fields. Check the API reference for each operation before you build the body.
Step 1: Create a destination
Call Create destination. A destination
needs a channelOwner, a channelName and a type. For webhook delivery, put your webhook settings in
webhookConfig.
POST /v4/notifications/destinations
Authorization: Bearer <access_token>
Content-Type: application/json{
"channelOwner": "<owner>",
"channelName": "order-alerts-prod",
"type": "<destination type>"
}Walmart returns the destination. Save the channelId: it is the destination-id you use later.
{
"channelId": "<destination-id>",
"channelOwner": "<owner>",
"channelName": "order-alerts-prod",
"type": "<destination type>",
"status": "<status>",
"createdTimestamp": 1764748800000,
"lastModifiedTimestamp": 1764748800000
}Step 2: Subscribe to a notification type
Call Create subscription with the notification type in the path.
POST /v4/notifications/subscriptions/WEBHOOKS
Authorization: Bearer <access_token>
Content-Type: application/json{
"<field>": "<value>"
}The response is a JSON object describing the subscription. Note its subscription ID so you can view or delete it later.
Step 3: Send a test notification
Call Send test notification for the same notification type, then confirm the test arrives at your destination.
POST /v4/notifications/WEBHOOKS/test-notification
Authorization: Bearer <access_token>
Content-Type: application/json{
"<field>": "<value>"
}If the test doesn't arrive, check the destination with Get destination and your endpoint's logs.
Step 4: Review your setup
List all destinations with Get destinations.
The response holds a channels array of destination objects.
GET /v4/notifications/destinations
Authorization: Bearer <access_token>View one destination:
GET /v4/notifications/destinations/<destination-id>
Authorization: Bearer <access_token>View your subscription for a notification type with
Get subscription. Add payloadVersion to
choose the version of the payload object used in the notification.
GET /v4/notifications/subscriptions/WEBHOOKS?payloadVersion=<version>
Authorization: Bearer <access_token>Or view a specific subscription by ID with Get subscription by ID:
GET /v4/notifications/WEBHOOKS/subscriptions/<subscription-id>
Authorization: Bearer <access_token>Step 5: Delete what you no longer need
Delete a subscription with Delete subscription:
DELETE /v4/notifications/WEBHOOKS/subscriptions/<subscription-id>
Authorization: Bearer <access_token>Delete a destination with Delete destination. The response returns the deleted destination object.
DELETE /v4/notifications/destinations/<destination-id>
Authorization: Bearer <access_token>Errors and edge cases
| Status | When it happens |
|---|---|
400 Bad Request | The request is invalid, for example a notification-type that isn't one of the five listed types, or a destination body without channelOwner, channelName or type |
401 Unauthorized | The access token is missing, expired or invalid |
403 Forbidden | Your token isn't allowed to perform this operation |
404 Not Found | The destination, subscription or notification type wasn't found |
429 Too Many Requests | You exceeded the rate limit. Wait and retry with backoff |
500 Internal Server Error | An unexpected error. Retry later |
