Skip to main content
POST
A Custom Action is a way to earn that you define in Yuko, such as Complete a survey or Attend an event. You set the points, an optional limit on how often each customer can earn them, and an optional expiry. Call this endpoint each time a customer completes the action, and Yuko awards the points by the rule’s settings. To set one up, go to Shopify admin → Apps → Yuko Loyalty → Loyalty → Programs → Ways to earn → Add another way → Custom Action. After you save it, the REST API card on the rule shows the full URL to call, including its campaign ID.
Requires the write:transactions scope. Custom actions are available on paid plans. See Scopes.

Path parameters

string<uuid>
required
The ID of the Custom Action earn rule. Copy it from the REST API card on the rule, or use the rule’s id from List ways to earn.

Body parameters

string
required
The customer who completed the action. Accepts the Shopify customer ID, Yuko’s customer id (a UUID), the customer’s email address or their phone number. See Identifying customers.

Response

Returns 201 Created.
object

Errors