Generate label (New)

Call this endpoint to generate labels for booked shipments. The Generate Label API supports the creation of carrier labels for small parcel shipments. After successfully booking a small parcel shipment, you can use the Generate Label API to request carrier labels. These labels are essential for carriers to track the shipment from its creation to its final delivery at the Walmart facility.

Note: This page shows examples using only the required parameters and inputs for generating shipment label in PDF format. For a full list of customization options and additional capabilities, refer to the Marketplace Fulfillment API Reference.

Endpoint

POST https://marketplace.walmartapis.com/v4/fulfillment/generate-label

Sample request

This sample request generates a shipping label in PDF format for a specific shipment.

curl --request POST \ --url https://marketplace.walmartapis.com/v4/fulfillment/generate-label \ --header 'accept: application/pdf' \ --header 'content-type: application/json' \ --data '
{ "payload": { "shipmentId": "0721708WFA", "labelType": "Parcel", "shipDate": "2025-05-10T07:34:11.037Z" }
}
import requests
import json url = 'https://marketplace.walmartapis.com/v4/fulfillment/generate-label' headers = { 'accept': 'application/pdf', 'content-type': 'application/json', # Add authentication headers here if required, e.g.: # 'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
} payload = { "payload": { "shipmentId": "0721708GDM", "labelType": "Parcel", "shipDate": "2025-05-10T07:34:11.037Z" }
} response = requests.post(url, headers=headers, data=json.dumps(payload)) if response.status_code == 200: # Save the PDF label to a file with open('label.pdf', 'wb') as f: f.write(response.content) print("Label PDF saved as label.pdf")
else: print(f"Request failed with status code {response.status_code}") try: print(response.json()) except Exception: print("No JSON response received")

Modify your code

Replace all placeholder values with your actual shipment data before making the API request.

  • Authorization - Replace with your actual Base64-encoded credentials.
  • WM_QOS.CORRELATION_ID - Use a unique correlation UUID to track the request.
  • WM_SEC.ACCESS_TOKEN - Replace with your valid access token obtained through authentication.

Sample response

This sample response request was successful "OK" confirms that the generate label operation was completed.

{ "status": "OK"
}

Result

If the request is successful, the response returns a 200 OK status.