Create a subscription

This request creates a subscription for notifications to an event.

Create a subscription by selecting the event type, event version, and resource name, and also providing the event URL. You can subscribe to one or multiple notifications in a single subscription request.

Use the Retrieve event types request to get a list of event types, event versions, and resources name available for subscription. Configure an event URL to receive the notifications.

URL Authentication Options

AUTH Method as BASIC_AUTH

While making a notification request to endpoint URL, the Walmart system will pass the authentication header with a key as authHeaderName and a value as BASE64 encoding for the username and password.

AUTH Method as HMAC

While making a notification request to the endpoint URL, the Walmart system will pass the authentication header with a key as authHeaderName and a value as HMACSHA256 for a complete response, using the clientSecret as the key.

AUTH Method as OAUTH

The Walmart system will make a POST call to the OAUTH URL to generate a token with the request body as grant_type=client_credentials and headers as follows:

  • Authorization header with the key as authHeaderName and value as BASE64 encoding for clientId and clientSecret
  • Accept header as application/json
  • Content-type header as application/x-www-form-urlencoded

Refer to the Create access token request page for more information.

Custom Headers

If custom headers are provided in the headers field and if the provided OAUTH URL return HTTPS status 200, the response has the access_token and expires_in fields. While making a notification request to the endpoint URL, the Walmart system will pass the access_token value in the headers with authHeaderName as key and value as Bearer, along with any other custom headers provided in the headers field.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string

Specifies the name of the event or notification to which you subscribe.

You can only subscribe to one event at a time. The eventType must be one of the values defined in the Retrieve event types request.

string

Functional category or delegated access scope to which the event type is mapped.

Use this value to return a list of all subscriptions for a specific resource.

For a list of all available resource names, use the Retrieve event types request.

string

Specifies the status of the subscription.

This value is used to return a list of all subscriptions in ACTIVE or INACTIVE status.

To create a subscription, use ACTIVE status. Notifications will be triggered only if a subscription is in ACTIVE status.

Body Params

Request fields

events
array of objects

Array of event objects.

events
Headers
string

Identifier that tracks the consumer request by channel.

Use the consumer channel type received during your onboarding. Contact your system administrator or developer management for the correct WM_CONSUMER.CHANNEL.TYPE value.

string
required

Unique identifier for each API call, used to track and debug issues.

Use a randomly generated GUID for this ID.

string
required

Access token returned by the Create access token request.

This value is required for token-based authentication.

Response

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json