Examine

Examine earning rules

Changed on

Estimates earning opportunities for a customer without triggering any actual earning for loyalty v2 earning rules. The trigger selects whether all trigger events or one specific event is examined. When a specific event is selected, exactly one matching context object is required: customer_order_paid for customer.order.paid, customer_segment_entered for customer.segment.entered, and customer_custom_event for customer.custom_event. The other context objects must not be present.

This endpoint can examine earning rules for all loyalty programs the customer belongs to by using customer_identification with customer_id or customer_source_id. To examine earning rules only for one program, use member_id in customer_identification, as member_id is loyalty program-specific. A customer who exists but has no active membership returns 200 with an empty memberships array.

post/v2/loyalties/examine/earning-rules

Request

  • Base URL
    https://api.voucherify.io
  • URL
    https://api.voucherify.io/v2/loyalties/examine/earning-rules
  • Auth
    • API key in header X-App-Id and API key in header X-App-Token
    • or HTTP bearer

Request body

Response

Earning rules examination result. An empty memberships array means no active membership has earning rules for the examined trigger.

eventstring nullable

Examined trigger event (e.g. customer.order.paid, customer.segment.entered, customer.custom_event). null when trigger.type is ALL.

object'earnings_examine_result'

Object type marker. Always earnings_examine_result.

Changes

    • breaking

      added to the request property allOf list

    • breaking

      added subschema #2 to the // request property allOf list

    • breaking

      added subschema #2 to the /// request property allOf list

    • breaking

      added subschema #2 to the // request property allOf list

    • breaking

      added subschema #2 to the request property allOf list

    • breaking

      the // request property type changed from object to no type

    • breaking

      the /// request property type changed from object to no type

    • breaking

      the // request property type changed from object to no type

    • breaking

      the request property type changed from object to no type

    • breaking

      the request property type changed from object to no type

    • breaking

      the ///// response's property type changed from object to no type for status

    • breaking

      the ///// response's property type changed from object to no type for status

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ////

    • warning

      removed the request property ////

    • warning

      removed the request property ////

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the optional property ////// from the response with the status

    • warning

      removed the optional property ////// from the response with the status

    • warning

      removed the optional property ////// from the response with the status

    • warning

      removed the optional property ////// from the response with the status

    • warning

      removed the optional property ////// from the response with the status

    • info

      added to the ///// response property allOf list for the response status

    • info

      added subschema #2 to the ///// response property allOf list for the response status

    • breaking

      added the new required request property ////

    • breaking

      added the new required request property ///

    • breaking

      the // request property type changed from no type to object

    • breaking

      the /// request property type changed from no type to object

    • breaking

      the // request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the ///// response's property type changed from no type to object for status

    • breaking

      the ///// response's property type changed from no type to object for status

    • warning

      removed from the request property allOf list

    • warning

      removed subschema #2 from the // request property allOf list

    • warning

      removed subschema #2 from the /// request property allOf list

    • warning

      removed subschema #2 from the // request property allOf list

    • warning

      removed subschema #2 from the request property allOf list

    • info

      added the new optional request property ///

    • info

      added the new optional request property ///

    • info

      added the new optional request property ///

    • info

      added the new optional request property ////

    • info

      added the new optional request property ////

    • info

      added the new optional request property ///

    • info

      added the new optional request property ///

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      removed from the ///// response property allOf list for the response status

    • info

      removed subschema #2 from the ///// response property allOf list for the response status