Skip to main content
Mark a sale for a physical product as shipped. You can optionally include a tracking URL.
This endpoint only applies to sales of physical products. Digital products cannot be marked as shipped.

Endpoint

PUT https://api.gumroad.com/v2/sales/:id/mark_as_shipped

Authentication

Requires the mark_sales_as_shipped OAuth scope.

Path Parameters

id
string
required
The unique external ID of the sale to mark as shipped.

Body Parameters

tracking_url
string
Optional tracking URL for the shipment. This should be a full URL to the carrier’s tracking page.Example: https://www.fedex.com/fedextrack/?tracknumbers=123456789

Response

Returns the updated sale object with shipment information.
success
boolean
required
Indicates if the operation was successful.
sale
object
required
The updated sale object.

Example Request

curl -X PUT "https://api.gumroad.com/v2/sales/ABC123XYZ/mark_as_shipped" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response

{
  "success": true,
  "sale": {
    "id": "ABC123XYZ",
    "email": "[email protected]",
    "seller_id": "seller456",
    "created_at": "2024-01-15T10:30:45.000Z",
    "product_id": "prod_abc123",
    "product_name": "Physical Product",
    "price": 4999,
    "gumroad_fee": 519,
    "shipped": true,
    "tracking_url": "https://www.fedex.com/fedextrack/?tracknumbers=123456789",
    "is_product_physical": true,
    "full_name": "John Doe",
    "street_address": "123 Main St",
    "city": "San Francisco",
    "state": "CA",
    "zip_code": "94102",
    "country": "United States",
    "order_id": 123456789
  }
}

Error Response

If the sale is not found:
{
  "success": false,
  "message": "The sale was not found."
}

Error Codes

400
error
Bad RequestCommon reasons:
  • Invalid tracking URL format
  • Sale is for a digital product (not physical)
401
error
Unauthorized - Invalid or missing access token
403
error
Forbidden - Token does not have mark_sales_as_shipped scope
404
error
Not Found - Sale does not exist or does not belong to the authenticated user

Notes

  • This endpoint can be called multiple times to update the tracking URL
  • The buyer receives an email notification when a sale is marked as shipped
  • If a tracking URL is provided, it will be included in the notification email
  • The tracking URL should be a complete URL including the protocol (https://)
  • Marking a sale as shipped does not affect refund eligibility
  • The shipment record is created automatically if it doesn’t exist
  • Only sales for physical products can be marked as shipped

Best Practices

Tracking URLs

  • Always include the full tracking URL with the carrier’s domain
  • Common carrier tracking URL formats:
    • USPS: https://tools.usps.com/go/TrackConfirmAction?tLabels=TRACKING_NUMBER
    • FedEx: https://www.fedex.com/fedextrack/?tracknumbers=TRACKING_NUMBER
    • UPS: https://www.ups.com/track?tracknum=TRACKING_NUMBER
    • DHL: https://www.dhl.com/en/express/tracking.html?AWB=TRACKING_NUMBER

Automation

  • Integrate this endpoint with your fulfillment system
  • Automatically mark sales as shipped when your shipping provider creates labels
  • Use webhooks to trigger shipping workflows when new sales occur

Customer Communication

  • Provide tracking information as soon as it’s available
  • Update the tracking URL if the carrier changes or issues a new tracking number
  • Consider sending additional updates through your own notification system

Build docs developers (and LLMs) love