Loyalty API
TypeUpdateResult1
Describes a tier defined by the shop.
| Kind | Type |
|---|---|
| Used in | UpdateCustomerDetails1 |
Properties
-
okboolean requiredIndicates if the new value has been successfully applied.
This property summarizes the
outcometo help you write code, especially when dealing with outcomes you do not yet know. -
Indicates the outcome of trying to apply this field.
Possible outcomes depend on the exact field you are updating, and the configuration of the system. All fields support at least
unchangedandupdated. Some fields can also returnprovidedand/orcreditedand/orinvalidand/orfailed. -
messagestring required for failures, optional for successesA message to display to the user.
Will be present for failure outcomes. It is your choice if you want to always display this exact string, or attempt to recognize known values of
error_codeand display customized messages for those.May also be present for successful outcomes, and in that case it is your choice whether you want to display it or not. It will be a confirmation message about updating the relevant field.
-
error_codestring required for failures, omitted for successesA machine-friendly stable error code corresponding to the error condition that has occurred.
Present for
failedandinvalidoutcomes (i.e. all failure ones).You can ignore this property, or you can recognize some known error codes and display custom messages if you want.
-
ptsinteger optionalNumber of points that have been granted, if any.
If the outcome is
credited, indicates the number of points that have been added to the customer's account as a result of providing this field's value.