---
title: "Invite affiliate."
method: POST
path: "/stores/{storeId}/affiliates/invite"
tags: ["Affiliate"]
---

# Invite affiliate.

`POST /stores/{storeId}/affiliates/invite`

Invites an affiliate, this will create a customer profile if one does not exist and takes in a customer email
address instead.
Requires the `stores.affiliates.update` permission.

## Path parameters

- `storeId` string, uuid, required

## Request body

- InviteAffiliateForm — Form for affiliates to update or add their own affiliate link
  - `emailAddress` string, email, required — Represents the email address associated with the form.
  - `link` string, required — A link provided to affiliates for tracking and promotional purposes. Must not exceed 256 characters.

## Response `200`

The object was successfully created.

- AffiliateDtoResponse — 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` AffiliateDto — Form for store owners to edit affiliate status.
    - `isEnabled` boolean, required — Indicates whether the users affiliate status is enabled
    - `link` string, nullable — A link provided to affiliates for tracking and promotional purposes. Must not exceed 256 characters.
    - `returnPercentage` integer, nullable — The percentage of the return that an affiliate receives. Must be between 0 and 100 inclusive.
    - `percentageOff` integer, nullable — The percentage discount offered by the store affiliate. Must be between 0 and 100 inclusive.
    - `balance` number, double, required — Represents the balance of the affiliate, typically indicating the amount earned through affiliations. Must be a non-negative value.

## Other responses

- `400` — The provided form information is not valid, check that the provided data is valid. You can use the 'invalidFields' field to get the list of invalid fields or just use the 'message' field.
- `403` — You are not authorized to access this endpoint, you may be missing an API key scope or be requesting a privileged endpoint.

---

[API](https://skmtc.net/komerza/apis/komerza-api.md) · [All operations](https://skmtc.net/komerza/apis/komerza-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/komerza/komerza-api/revisions/060e78bc7f80/schema)
