Earning Rules

Get earning rule

Changed on

Returns a single earning rule by its ID.

get/v2/loyalties/earning-rules/{earningRuleId}

Request

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

Response

Earning rule

idstring required

Earning rule ID (lern_...).

namestring required

Earning rule name.

status'DRAFT' | 'ACTIVE' | 'INACTIVE' required

Current status. DELETED also exists internally but deleted rules are excluded from API reads.

start_datestring date-time nullable required

Date-time from which the rule is active. Can be null.

end_datestring date-time nullable required

Date-time until which the rule is active. Can be null.

metadataLoyaltyV2ActivityMetadata required

Arbitrary key-value metadata; any JSON object is accepted.

created_atstring date-time required

Creation timestamp (ISO 8601).

updated_atstring date-time nullable required

Last update timestamp (ISO 8601). null when never updated.

object'earning_rule' required

Object type marker. Always earning_rule.

Changes

    • 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

    • 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

    • breaking

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

    • breaking

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

    • breaking

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

    • breaking

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • 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

    • 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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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

    • info

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