Skip to content
Create API key

Customer sales and order requests

Param Default Notes
groupBy summary summary, order (orders with their lines) or product (what the account buys)
customerId One account number: that account’s sales only
status booked booked (everything not cancelled), invoiced, open, or a comma list of your own status words
q Order id, SKU or description contains
top 25 Rows returned: 1 to 100 for the summary, up to 500 when grouped
format csv on the grouped views
Terminal
curl "https://api.plunk.io/cx/v1/customers/sales/this_year?customerId=D-1042&groupBy=order&status=open" \
-H "Authorization: Bearer sk_live_••••"

The summary view:

Response (groupBy=summary)
{
"range": "ytd",
"summary": {
"revenue": 1804210.00,
"orders": 902,
"units": 1911,
"customers": 781,
"aov": 2000.23,
"repeatCustomers": 84,
"repeatRatePct": 10.8
},
"topCustomers": [
{
"customerId": "C-2201",
"revenue": 41210.00,
"orders": 6,
"units": 14,
"aov": 6868.33,
"lastOrder": "2026-08-12"
}
]
}

A dealer’s open orders, with ?customerId=D-1042&groupBy=order&status=open:

Response (groupBy=order)
{
"range": "this_year",
"groupBy": "order",
"status": "open",
"customerId": "D-1042",
"count": 1,
"items": [
{
"orderId": "SO-55120",
"orderDate": "2026-09-28",
"customerId": "D-1042",
"customerName": "Main Street Interiors",
"status": "Open",
"repCode": "R07",
"storeId": null,
"channel": "erp",
"revenue": 4796.00,
"units": 4,
"lineCount": 2,
"lines": [
{ "productId": "SF-1042", "title": "Harbor Sofa", "quantity": 2, "price": 2398.00, "status": "Open", "image": "https://…" }
]
}
],
"orderRequests": []
}

groupBy=product returns items: [{ productId, title, category, image, availability, revenue, units, orders, lastOrder }].

Order requests from the Plunk Commerce order desk (accepted quotes and portal reorders) waiting for, or already in, your ERP.

Param Default Notes
status pending_erp Filter by request status
customerId One account’s requests
top 100 Rows returned
Response
{
"status": "pending_erp",
"count": 1,
"items": [
{
"orderRequestId": "…",
"number": "OR-1042",
"quoteNumber": "Q-3310",
"quoteVersion": 2,
"source": "portal_reorder",
"customerId": "D-1042",
"customerName": "Main Street Interiors",
"repCode": "R07",
"poNumber": "PO-7781",
"requestedDate": "2026-10-20",
"shipTo": { "…": "…" },
"lines": [ "…" ],
"totalNet": 4796.00,
"erpOrderId": null,
"status": "pending_erp",
"statusDate": "…",
"createdDate": "…"
}
]
}

404 not_tracked when your account doesn’t run the order desk. When your ERP accepts a request, report it through /ingest/order-status with orderRequest set, and the request links to the order.

Was this helpful?

Still stuck? Contact support and include the job or page you were on.