> For the complete documentation index, see [llms.txt](https://docs.explodely.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.explodely.com/api/sales-api-affiliate-beta.md).

# Sales API Affiliate (BETA)

**Sales API Endpoint:**

`https://api.explodely.com/v1/aff/sale`

​**Parameters:**

You can use this API endpoint to search/fetch sales data through your Explodely affiliate account.

username - Your Explodely affiliate account username

apikey - Your Explodely affiliate account API key

apiaction - This should always be set as "getsale" (for POST requests) and "getsalebyget" (for GET requests)

startdate - in DD-mmm-YYYY format (example: 11-jan-2026)

enddate - in DD-mmm-YYYY format (example: 11-jan-2026)

testsale - Set as no if you wish to exclude test sales

**Responses:**

The API endpoint returns a JSON object.

`{"error":"invalidapikey"}` - This is returned when the API key and username is not authenticated.

`{"error":"invalid_username"}` - This is returned when the username is not a valid affiliate account.

For successful fetch, the JSON object would return sales data. This API is in BETA, please report any issues to Explodely support.
