Triggers API
Read CallRecordCustomTrigger1
Records occurrence of a custom event or condition, mapped to a custom trigger set up in Bubblehouse.
| Kind | Read API call |
|---|---|
| Method | GET or POST |
| URL | https://app.bubblehouse.com/api/v20230601/<shop>/RecordCustomTrigger1 |
| Authentication | AnonymousCustomer TokenShop Token |
This call has flexible authentication requirements, depending on the configuration set up by Bubblehouse. The most typical usage is making this call from your server using a shop token and specifying a customer ID.
After this call returns, its expected effect — i.e. awarding of points, unlocking of achievements, and other actions — might take a few seconds to be processed (or, in rare cases, longer).
The trigger information is checked for validity at the time of the call, and thus invalid trigger data will always be reported. Customer information might not be fully validated until later, however, and thus invalid customer data might not be reported directly.
Input
-
A customer to operate upon, when using a shop token or no authentication.
If you're using a customer token and decide to pass this field (which we do not recommend), it must match the customer from the token.
-
triggerstring requiredSpecifies the custom trigger; must match a slug of one of the triggers defined in Bubblehouse admin area.
Output
-
okalways true requiredIndicates a successful response.
Specific Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 400 | unknown_trigger |
Global Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 401 | invalid_token |
The provided authentication token is invalid or has expired. |
| 429 | rate_limit_exceeded |
Your usage is over the rate limit. Ensure that you're not making duplicate calls, and contact our team for a rate limit increase. |