Create an affiliate
Makes a customer of the store an affiliate, with a link of their own. The address has to be a customer already: create the customer first if it is not.
Needs the affiliates.write permission (Change Affiliates).
Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Headers
A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
Body
The customer's email address.
"ada@example.com"
What their link ends in: 2 to 40 letters, digits and dashes. One affiliate a code in a store.
"ada"
The share of each order they earn, in percent: above 0, up to 90. It is taken on what the buyer paid for the products, after every discount, before fees and tax.
10
What their link takes off for the buyer, in percent: 0 to 90.
Whether their link works. Switched off, it takes nothing off and earns nothing.

