Look up the affiliate on an order.
API and MCP access needs the Plus plan. Sale reads also need a company API key. The MCP tool is get_sale.
A merchant might ask, "Which affiliate got credit for this order, and what
was the commission?" get_sale on
https://directsales.software/mcp returns an order summary by order number or sale id.
The REST pair is GET /api/v1/sales and
GET /api/v1/sales/{saleId} in
the OpenAPI file.
How order numbers are stored
- If you omit both
beginDateandendDate, the sales list defaults to the last 90 days. - Shopify's canonical sale id looks like
{integrationId}-{shopifyNumericId}. A display order number can be the shopper-facing number with the integration prefix stripped, such as1040. - WooCommerce orders are stored as
woo-plus the order number so they do not collide with Shopify numbers. The plugin page states that rule. - A sale row includes the affiliate id and name, customer name and email, volume, the commission plan name, the commission amount, and
simpleCommIsPaid.
PUT /api/v1/sales/{saleId} saves sale changes.
DELETE /api/v1/sales/{saleId} is described as removing an
unpaid sale. The list fields canDelete and
canRepull say whether that order can be removed or pulled again
from the store connection.
List responses use page and pageSize, and
meta.totalRows comes back with the page. Errors use
errors with a code, a message, and sometimes a field. A missing
or bad key is 401. The wrong tier is 403.