---
title: "Delete an affiliate."
method: DELETE
path: "/stores/{storeId}/affiliates/{customerId}"
tags: ["Affiliate"]
---

# Delete an affiliate.

`DELETE /stores/{storeId}/affiliates/{customerId}`

## Request

- Base URL: `https://api.komerza.com`
- URL: `https://api.komerza.com/stores/{storeId}/affiliates/{customerId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/komerza/apis/komerza-api/docs/stores/:storeId/affiliates/:customerId/delete.ts> (a function with typed inputs; its response is checked against the schema)

Permanently removes an affiliate and all their payout records from the store.
Requires the `stores.affiliates.update` permission.

## Path parameters

- `storeId` string, uuid, required
- `customerId` string, uuid, required

## Response `200`

The object was successfully deleted.

- ObjectResponse: Represents a default generic response for API endpoints.
  - `success` boolean, required: Indicates whether the operation or response was successful.
  - `message` string, nullable: A descriptive message providing additional context or information about the response.
  - `code` string, nullable: The error code (if there was an error) to use when referencing the error
  - `data` unknown

## Other responses

- `404`: One of the objects referenced by the ID given in the URL or form was not found, check the ID and try again.

---

[API](https://skmtc.dev/komerza/apis/komerza-api.md) - [All operations](https://skmtc.dev/komerza/apis/komerza-api/llms.txt) - [OpenAPI document](https://skmtc.dev/komerza/apis/komerza-api/revisions/060e78bc7f80?raw)
