SDKs
Copy a source client for the language you already use. Each client calls the Marketplace APIs a third-party provider uses for a non-restaurant storefront. These are not published packages. npm install, pip install, Maven Central, RubyGems, and go get will not resolve them.
Marketplace API access is limited. Apply from the Developer Portal before these calls will succeed against your sandbox provider.
What the clients call
| Area | Calls |
|---|---|
| Catalog | Create and update business-scoped items |
| Inventory | Add and update store price and availability, and update business-wide pricing |
| Store hours | Update open hours, special hours, and fulfillment capacity |
| Jobs | Trigger an inventory pull for one store |
| Promotions | Create and update an item promotion |
| Onboarding | Create the managed-merchant URL, submit a multi-location intent, and look up onboarding status |
| Store reads and temporary deactivation | Store summary, menu summary, the full menu, and pause or resume the store |
| Orders | Confirm, adjust, cancel, mark ready for pickup, and record a retail return |
Catalog pull, inventory pull, and store-hours pull are endpoints you host. The inventory-pull call asks DoorDash to pull one store. It does not call your pull endpoint. The pull uses PULL_STORE_ITEMS and pull_mode REPLACE only.
Restaurant menu create and update, and Checkout / DoorDash Direct, are not in these clients.
Install and call sandbox
Create one client per provider type. Sandbox and production are different provider types and different credentials. The signing secret is the base64 value from the Developer Portal. The client decodes it before signing. Each client sends Authorization: Bearer, auth-version: v2, and a User-Agent built from the provider type. example_pos_sandbox becomes ExamplePosSandbox/1.0.
The sample below triggers an inventory pull for one store. That is the fastest sandbox call. A 2xx with operation_status: QUEUED means DoorDash accepted the pull. It does not mean the menu changed.
- Node.js
- Python
- Java
- Go
- Ruby
Requires Node.js 22 or newer. The package has no dependencies.
Download the Node.js clientUnzip the download. It contains a node folder. Copy that folder into your project, for example third_party/retail-marketplace-sdk.
const { Client } = require('./third_party/retail-marketplace-sdk');
async function main() {
const client = new Client({
developerId: process.env.DOORDASH_DEVELOPER_ID,
keyId: process.env.DOORDASH_KEY_ID,
signingSecret: process.env.DOORDASH_SIGNING_SECRET,
providerType: process.env.DOORDASH_PROVIDER_TYPE,
});
const result = await client.createInventoryPull(process.env.DOORDASH_STORE_LOCATION_ID);
console.log(result.operation.operation_id, result.operation.operation_status);
}
main();
Requires Python 3.10 or newer. The package has no third-party dependencies.
Download the Python clientUnzip the download. It contains a python folder. Copy that folder into your project, then install it from that path:
pip install -e ./third_party/retail-marketplace-sdk-python
import os
import doordash_retail
client = doordash_retail.Client(doordash_retail.Credentials(
developer_id=os.environ["DOORDASH_DEVELOPER_ID"],
key_id=os.environ["DOORDASH_KEY_ID"],
signing_secret=os.environ["DOORDASH_SIGNING_SECRET"],
provider_type=os.environ["DOORDASH_PROVIDER_TYPE"],
))
result = client.create_inventory_pull(os.environ["DOORDASH_STORE_LOCATION_ID"])
print(result.operation.operation_id, result.operation.operation_status)
Requires Java 17 or newer. The sources have no runtime dependencies. The Maven coordinate com.doordash:retail-marketplace-sdk is not a published artifact.
Unzip the download. It contains a java folder. Copy src/main/java into your source tree, or compile that folder and put the classes on your classpath.
import com.doordash.retailmarketplace.Client;
import com.doordash.retailmarketplace.Credentials;
import com.doordash.retailmarketplace.DoorDashException;
import com.doordash.retailmarketplace.Result;
Client client = Client.create(new Credentials(
System.getenv("DOORDASH_DEVELOPER_ID"),
System.getenv("DOORDASH_KEY_ID"),
System.getenv("DOORDASH_SIGNING_SECRET"),
System.getenv("DOORDASH_PROVIDER_TYPE")));
try {
Result result = client.createInventoryPull(System.getenv("DOORDASH_STORE_LOCATION_ID"));
System.out.println(result.operation.operationId + " " + result.operation.operationStatus);
} catch (DoorDashException ex) {
System.out.println(ex.getMessage());
}
Requires Go 1.22 or newer. The module path github.com/doordash/retail-marketplace-sdk-go is not a public repository, so go get will not resolve it.
Unzip the download. It contains a go folder. Copy that folder into your module, for example third_party/retail-marketplace-sdk-go, and point a replace directive at it:
require github.com/doordash/retail-marketplace-sdk-go v0.0.0
replace github.com/doordash/retail-marketplace-sdk-go => ./third_party/retail-marketplace-sdk-go
import (
"context"
"fmt"
"log"
"os"
doordash "github.com/doordash/retail-marketplace-sdk-go"
)
client, err := doordash.New(doordash.Credentials{
DeveloperID: os.Getenv("DOORDASH_DEVELOPER_ID"),
KeyID: os.Getenv("DOORDASH_KEY_ID"),
SigningSecret: os.Getenv("DOORDASH_SIGNING_SECRET"),
ProviderType: os.Getenv("DOORDASH_PROVIDER_TYPE"),
})
if err != nil {
log.Fatal(err)
}
result, err := client.CreateInventoryPull(context.Background(), os.Getenv("DOORDASH_STORE_LOCATION_ID"))
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Operation.OperationID, result.Operation.OperationStatus)
The standard library is enough. There is no gem to install.
Download the Ruby clientUnzip the download. It contains a ruby folder. Copy that folder into your application, for example third_party/retail-marketplace-sdk-ruby.
require_relative "third_party/retail-marketplace-sdk-ruby/lib/doordash_retail"
client = DoorDashRetail::Client.new(
developer_id: ENV["DOORDASH_DEVELOPER_ID"],
key_id: ENV["DOORDASH_KEY_ID"],
signing_secret: ENV["DOORDASH_SIGNING_SECRET"],
provider_type: ENV["DOORDASH_PROVIDER_TYPE"]
)
result = client.create_inventory_pull(ENV["DOORDASH_STORE_LOCATION_ID"])
puts "#{result.operation.operation_id} #{result.operation.operation_status}"
Read the responses
Inventory, promotion, business-wide pricing, and fulfillment-capacity calls are written to succeed on 202 with operation_status: QUEUED. Inventory pull succeeds on 200 with the same queued body. Catalog create is written for 201. Catalog update and store-hours update are written for 200.
queued is true when operation_status is QUEUED. Store the operation_id with the store and the batch. A success status does not mean the menu changed.
If DoorDash returns a 2xx other than the status that client expects, the call throws and the response stays on the error. Read that body before changing the request. Do not retry it.
Business-wide pricing returns 403 until universal pricing is enabled for the business. Fulfillment capacity returns 403 until hybrid fulfillment signal reception is enabled for the provider.