# Dpd2 — how to use (mcp.ai)

Connect your Dpd2 account and use 8 tools for ecommerce straight from your AI agent. Connect with your own API key. DPD is a digital product delivery platform for selling ebooks, software, music, and other digital goods.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_dpd2?ms=1787293380000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `dpd2_get_storefront`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/dpd2`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/dpd2/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/dpd2/get/storefront` — Retrieves detailed information about a specific DPD storefront by its ID. Returns storefront configuration including name, URL, contact details, currency, type, and subdomain. Use this after obtaining
  - body: { id: integer }
- `POST https://api.mcp.ai/api/dpd2/list/customers2` — Tool to list customers in your DPD account with advanced filtering. Use when you need to find customers by email, name, product purchases, newsletter subscription status, or creation date range.
  - body: { page?: integer, email?: string, date_max?: string, date_min?: string, per_page?: integer, last_name?: string, first_name?: string, product_id?: integer, receives_newsletters?: boolean }
- `POST https://api.mcp.ai/api/dpd2/list/purchases` — Tool to list all purchases made through your DPD account. Use when you need to retrieve purchase records with optional date filters and pagination for reporting or analysis.
  - body: { page?: integer, limit?: integer, since?: string, until?: string }
- `POST https://api.mcp.ai/api/dpd2/list/storefronts` — Tool to list all storefronts in your DPD account. Use after authenticating to fetch storefront details before managing products or purchases.
- `POST https://api.mcp.ai/api/dpd2/list/subscribers` — Tool to list subscribers for a given storefront. Use when you need a paginated and filtered list of subscribers after storefront setup.
  - body: { page?: integer, email?: string, since?: string, filter?: string, per_page?: integer, storefront_id: string }
- `POST https://api.mcp.ai/api/dpd2/ping` — Tool to ping the API to check its status. Use when verifying API connectivity before further operations.
- `POST https://api.mcp.ai/api/dpd2/verify/notification2` — Tool to verify a POST from the URL integration (IPN/webhook). POST all parameters that were POSTed to your site to confirm authenticity. Use after receiving an IPN notification to validate it came fro
  - body: { tax?: string, txn_id: string, discount?: string, mc_gross?: string, coupon_code?: string, mc_currency?: string, mc_shipping?: string, verify_sign?: string, shipping_method?: string }
- `POST https://api.mcp.ai/api/dpd2/verify/subscriber` — Tool to verify a subscriber's subscription status. Use when you need to check if a subscriber is active and receiving service. Either username (email) or subscriber ID must be provided.
  - body: { id?: integer, username?: string, storefront_id: integer }

## Example prompts
- "What can I do in Dpd2?"
- "Show me a summary of my Dpd2 account"

## More
- Page: https://mcp.ai/dpd2
- Agent spec (llms.txt): https://mcp.ai/dpd2/llms.txt
- Postman collection: https://mcp.ai/dpd2/postman.json
