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

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.