Triggers API

RecordCustomTrigger1

Records occurrence of a custom event or condition, mapped to a custom trigger set up in Bubblehouse.

MethodGET or POST
KindRead-Only
URLhttps://app.bubblehouse.com/api/v2023061/<shop>/RecordCustomTrigger1
AuthenticationAnonymousCustomer 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

  • customerCustomerIdentity1required if using a shop token

    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.

  • triggerstringrequired

    Specifies the custom trigger; must match a slug of one of the triggers defined in Bubblehouse admin area.

Output

  • okalways truerequired

    Indicates a successful response.

Specific Errors

StatusErrorReason & Examples
400unknown_trigger

The specified trigger cannot be found.

{"id":"unknown_trigger"}

API-wide Errors

StatusErrorReason & Examples
400missing_customer_identity

The customer identity ('customer' input parameter) has not been specified when using a shop token. You need to either specify a non-empty value for one of the customer identity fields, or use a customer token.

{"id":"missing_customer_identity"}
404empty_customer_identity

All fields of the customer identity ('customer' input parameter) have been empty when using a shop token. You need to either specify a non-empty value for one of the customer identity fields, or use a customer token.

{"id":"empty_customer_identity"}
404no_customers_match_customer_identity

The customer identity ('customer' input parameter) does not match a known customer.

{"id":"no_customers_match_customer_identity"}
404customer_identity_partially_mismatches_matched_customer

A customer has been matched by one of the fields of the customer identity ('customer' input parameter), but some non-empty fields do not match Bubblehouse data on that customer.

{"id":"customer_identity_partially_mismatches_matched_customer"}
403customer_identity_does_not_match_token

API call is using a customer token, but the customer identity in API params does not match the customer from the token.

{"id":"customer_identity_does_not_match_token"}

Global Errors

StatusErrorReason & Examples
401invalid_token

The provided authentication token is invalid or has expired.

{"id":"invalid_token","message":"The token has expired"}
429rate_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.

{"id":"rate_limit_exceeded","message":"You are over the read limit per second for this customer"}
400obsolete_global_api_version

The global API version you are trying to use is no longer supported.

{"id":"obsolete_global_api_version"}
400invalid_global_api_version

The global API version you are trying to use has never existed.

{"id":"invalid_global_api_version"}
400inaccessible_global_api_version

The global API version you are trying to use is not enabled on your account.

{"id":"inaccessible_global_api_version"}
Previous
Overview