Reward-points Service API

This is the documentation for version v1 of the API. Last update on Jul 9, 2021.

Base URL
https://api.emporix.io/reward-points

Customer

Gets the reward-points of the customer

Gets the reward-points of the customer

Headers
  • authorization Required / string

    Bearer token

Responses
  • 200 integer
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /customer/{customerId}
$ curl \
 -X GET https://api.emporix.io/reward-points/customer/{customerId} \
 -H "authorization: string"
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Creates a new reward-points entry for a customer

Creates a new reward-points entry for a customer

Headers
  • authorization Required / string

    Bearer token

Body
  • customerId string
  • startPoints object
    • id string
    • reference-id string
    • description string
    • points Required / integer
    • createdAt string(date-time)
    • allPointsAfterCreation integer
    • usedPoints integer
    • validUntil string(date-time)
    • usedWith array[string]

      redeemPointsIds

Responses
  • 201
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /customer/{customerId}
$ curl \
 -X POST https://api.emporix.io/reward-points/customer/{customerId} \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -d '{"customerId":"string","startPoints":{"id":"string","reference-id":"string","description":"string","points":42,"createdAt":"2021-05-04T09:42:00+00:00","allPointsAfterCreation":42,"usedPoints":42,"validUntil":"2021-05-04T09:42:00+00:00","usedWith":["string"]}}'
Request payload example
# Headers
authorization: string

# Payload
{
  "customerId": "string",
  "startPoints": {
    "id": "string",
    "reference-id": "string",
    "description": "string",
    "points": 42,
    "createdAt": "2021-05-04T09:42:00+00:00",
    "allPointsAfterCreation": 42,
    "usedPoints": 42,
    "validUntil": "2021-05-04T09:42:00+00:00",
    "usedWith": [
      "string"
    ]
  }
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Deletes the reward-points of a customer

Deletes the reward-points of a customer (if the customer is deleted)

Headers
  • authorization Required / string

    Bearer token

Responses
  • 204
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

DELETE /customer/{customerId}
$ curl \
 -X DELETE https://api.emporix.io/reward-points/customer/{customerId} \
 -H "authorization: string"
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Gets the reward-points summary of the customer

Gets the reward-points summary of the customer. All point transactions of the customer are listed

Headers
  • authorization Required / string

    Bearer token

Responses
  • 200 object
    • customerId string
    • activePoints integer
    • summary object
      • addedPointsList array[object]
        • id string
        • reference-id string
        • description string
        • points Required / integer
        • createdAt string(date-time)
        • allPointsAfterCreation integer
        • usedPoints integer
        • validUntil string(date-time)
        • usedWith array[string]

          redeemPointsIds

      • redeemedPointsList array[object]
        • id string
        • description string
        • points Required / integer
        • createdAt string(date-time)
        • allPointsAfterCreation integer
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /customer/{customerId}/summary
$ curl \
 -X GET https://api.emporix.io/reward-points/customer/{customerId}/summary \
 -H "authorization: string"
Response example (200)
{
  "customerId": "string",
  "activePoints": 42,
  "summary": {
    "addedPointsList": [
      {
        "id": "string",
        "reference-id": "string",
        "description": "string",
        "points": 42,
        "createdAt": "2021-05-04T09:42:00+00:00",
        "allPointsAfterCreation": 42,
        "usedPoints": 42,
        "validUntil": "2021-05-04T09:42:00+00:00",
        "usedWith": [
          "string"
        ]
      }
    ],
    "redeemedPointsList": [
      {
        "id": "string",
        "description": "string",
        "points": 42,
        "createdAt": "2021-05-04T09:42:00+00:00",
        "allPointsAfterCreation": 42
      }
    ]
  }
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Adds reward-points to the customer

Adds reward-points to the customer

Headers
  • authorization Required / string

    Bearer token

Body
  • id string
  • reference-id string
  • description string
  • points Required / integer
  • createdAt string(date-time)
  • allPointsAfterCreation integer
  • usedPoints integer
  • validUntil string(date-time)
  • usedWith array[string]

    redeemPointsIds

Responses
  • 201
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /customer/{customerId}/addPoints
$ curl \
 -X POST https://api.emporix.io/reward-points/customer/{customerId}/addPoints \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -d '{"id":"string","reference-id":"string","description":"string","points":42,"createdAt":"2021-05-04T09:42:00+00:00","allPointsAfterCreation":42,"usedPoints":42,"validUntil":"2021-05-04T09:42:00+00:00","usedWith":["string"]}'
Request payload example
# Headers
authorization: string

# Payload
{
  "id": "string",
  "reference-id": "string",
  "description": "string",
  "points": 42,
  "createdAt": "2021-05-04T09:42:00+00:00",
  "allPointsAfterCreation": 42,
  "usedPoints": 42,
  "validUntil": "2021-05-04T09:42:00+00:00",
  "usedWith": [
    "string"
  ]
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Redeems reward-points of the customer

Redeems reward-points of the customer

Headers
  • authorization Required / string

    Bearer token

Body
  • id string
  • description string
  • points Required / integer
  • createdAt string(date-time)
  • allPointsAfterCreation integer
Responses
  • 201
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /customer/{customerId}/redeemPoints
$ curl \
 -X POST https://api.emporix.io/reward-points/customer/{customerId}/redeemPoints \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -d '{"id":"string","description":"string","points":42,"createdAt":"2021-05-04T09:42:00+00:00","allPointsAfterCreation":42}'
Request payload example
# Headers
authorization: string

# Payload
{
  "id": "string",
  "description": "string",
  "points": 42,
  "createdAt": "2021-05-04T09:42:00+00:00",
  "allPointsAfterCreation": 42
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Public

Gets the reward-points of the loggedIn customer

Gets the reward-points of the loggedIn customer

Headers
  • authorization Required / string

    Bearer token

Responses
  • 200 integer
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /public/customer
$ curl \
 -X GET https://api.emporix.io/reward-points/public/customer \
 -H "authorization: string"
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Gets the reward-points summary of the loggedin customer

Gets the reward-points summary of the loggedin customer. All point transactions of the loggedin customer are listed

Headers
  • authorization Required / string

    Bearer token

Responses
  • 200 object
    • customerId string
    • activePoints integer
    • summary object
      • addedPointsList array[object]
        • id string
        • reference-id string
        • description string
        • points Required / integer
        • createdAt string(date-time)
        • allPointsAfterCreation integer
        • usedPoints integer
        • validUntil string(date-time)
        • usedWith array[string]

          redeemPointsIds

      • redeemedPointsList array[object]
        • id string
        • description string
        • points Required / integer
        • createdAt string(date-time)
        • allPointsAfterCreation integer
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /public/customer/summary
$ curl \
 -X GET https://api.emporix.io/reward-points/public/customer/summary \
 -H "authorization: string"
Response example (200)
{
  "customerId": "string",
  "activePoints": 42,
  "summary": {
    "addedPointsList": [
      {
        "id": "string",
        "reference-id": "string",
        "description": "string",
        "points": 42,
        "createdAt": "2021-05-04T09:42:00+00:00",
        "allPointsAfterCreation": 42,
        "usedPoints": 42,
        "validUntil": "2021-05-04T09:42:00+00:00",
        "usedWith": [
          "string"
        ]
      }
    ],
    "redeemedPointsList": [
      {
        "id": "string",
        "description": "string",
        "points": 42,
        "createdAt": "2021-05-04T09:42:00+00:00",
        "allPointsAfterCreation": 42
      }
    ]
  }
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

POST RedeemOptions

POST RedeemOptions

Headers
  • authorization Required / string

    Bearer token

Body
  • id string
  • type Required / string
  • name Required / string
  • description string
  • points Required / integer
  • pointsAfterCoupon integer
  • coupon object

    Coupons describe voucher alike commerce capabilities.

    • code string

      e.g.: WINTER-SALE, 10OFF (read-only)

    • name Required / string

      Localized name

    • description string

      Localized coupon description

    • discountType Required / string

      'PERCENT' for relative values or 'ABSOLUTE' for float values, referring to a specific currency.

      Values are PERCENT and ABSOLUTE.

    • discountPercentage number

      A discount percentage within the range [0.00, 100.00]. Required if type is 'PERCENT'.

      Minimum value is 0, maximum value is 100.

    • discountAbsolute object

      Required if type is 'ABSOLUTE'

      • amount number

        The total amount in the specified currency.

        Minimum value is 0. Default value is 0.

      • currency string

        ISO 4217 currency code, e.g.: USD, EUR, CHF

        Default value is USD.

    • allowAnonymous boolean

      Can the coupon be redeemed by anonymous user

    • maxRedemptions number

      Maximum number of redemptions; -1 designates 'unlimited' (seller-only)

      Default value is -1.

    • maxRedemptionsPerCustomer number

      Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.

      Default value is -1.

    • restrictions object
      • validFor array[string]

        A list of customer identifiers, which can redeem the coupon. Cannot be specified for coupons which can be redeemed by anonymous users.

      • validFrom string(date-time)

        Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'

      • validUntil string(date-time)

        Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'

      • minOrderValue object

        Minimum order value which entitles the customer to redeem the coupon.

        • amount number

          The total amount in the specified currency.

          Minimum value is 0. Default value is 0.

        • currency string

          ISO 4217 currency code, e.g.: USD, EUR, CHF

          Default value is USD.

    • issuedTo string

      The Id of the customer who originally received the coupon (seller-only).

    • redemptionCount number

      The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only)

    • status string

      Current status of the coupon (read-only). 'INACTIVE': the coupon is only valid in the future; 'VALID': can be used; 'EXPIRED': the coupon validity period has expired; 'USED': the maximum number of redemptions for the coupon has been reached.

      Values are INACTIVE, VALID, EXPIRED, and USED.

    • links array[object]

      Hypermedia reference to coupon actions (read-only, customer-only)

      • rel Required / string

        Link relation type

      • title Required / string

        Link title

      • href Required / string

        Target URI of the link

      • type Required / string

        A content type of the referenced resource

    • deleted boolean

      Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute

  • validInYears integer
Responses
  • 201 array[object]
    • id string
    • type Required / string
    • name Required / string
    • description string
    • points Required / integer
    • pointsAfterCoupon integer
    • coupon object

      Coupons describe voucher alike commerce capabilities.

      • code string

        e.g.: WINTER-SALE, 10OFF (read-only)

      • name Required / string

        Localized name

      • description string

        Localized coupon description

      • discountType Required / string

        'PERCENT' for relative values or 'ABSOLUTE' for float values, referring to a specific currency.

        Values are PERCENT and ABSOLUTE.

      • discountPercentage number

        A discount percentage within the range [0.00, 100.00]. Required if type is 'PERCENT'.

        Minimum value is 0, maximum value is 100.

      • discountAbsolute object

        Required if type is 'ABSOLUTE'

        • amount number

          The total amount in the specified currency.

          Minimum value is 0. Default value is 0.

        • currency string

          ISO 4217 currency code, e.g.: USD, EUR, CHF

          Default value is USD.

      • allowAnonymous boolean

        Can the coupon be redeemed by anonymous user

      • maxRedemptions number

        Maximum number of redemptions; -1 designates 'unlimited' (seller-only)

        Default value is -1.

      • maxRedemptionsPerCustomer number

        Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.

        Default value is -1.

      • restrictions object
        • validFor array[string]

          A list of customer identifiers, which can redeem the coupon. Cannot be specified for coupons which can be redeemed by anonymous users.

        • validFrom string(date-time)

          Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'

        • validUntil string(date-time)

          Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'

        • minOrderValue object

          Minimum order value which entitles the customer to redeem the coupon.

          • amount number

            The total amount in the specified currency.

            Minimum value is 0. Default value is 0.

          • currency string

            ISO 4217 currency code, e.g.: USD, EUR, CHF

            Default value is USD.

      • issuedTo string

        The Id of the customer who originally received the coupon (seller-only).

      • redemptionCount number

        The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only)

      • status string

        Current status of the coupon (read-only). 'INACTIVE': the coupon is only valid in the future; 'VALID': can be used; 'EXPIRED': the coupon validity period has expired; 'USED': the maximum number of redemptions for the coupon has been reached.

        Values are INACTIVE, VALID, EXPIRED, and USED.

      • links array[object]

        Hypermedia reference to coupon actions (read-only, customer-only)

        • rel Required / string

          Link relation type

        • title Required / string

          Link title

        • href Required / string

          Target URI of the link

        • type Required / string

          A content type of the referenced resource

      • deleted boolean

        Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute

    • validInYears integer
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /public/customer/redeemOptions
$ curl \
 -X POST https://api.emporix.io/reward-points/public/customer/redeemOptions \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -d '{"id":"string","type":"string","name":"string","description":"string","points":42,"pointsAfterCoupon":42,"coupon":{"code":"string","name":"string","description":"string","discountType":"PERCENT","discountPercentage":42.0,"discountAbsolute":{"amount":42.0,"currency":"string"},"allowAnonymous":true,"maxRedemptions":42.0,"maxRedemptionsPerCustomer":42.0,"restrictions":{"validFor":["string"],"validFrom":"2021-05-04T09:42:00+00:00","validUntil":"2021-05-04T09:42:00+00:00","minOrderValue":{"amount...}'
Request payload example
# Headers
authorization: string

# Payload
{
  "id": "string",
  "type": "string",
  "name": "string",
  "description": "string",
  "points": 42,
  "pointsAfterCoupon": 42,
  "coupon": {
    "code": "string",
    "name": "string",
    "description": "string",
    "discountType": "PERCENT",
    "discountPercentage": 42.0,
    "discountAbsolute": {
      "amount": 42.0,
      "currency": "string"
    },
    "allowAnonymous": true,
    "maxRedemptions": 42.0,
    "maxRedemptionsPerCustomer": 42.0,
    "restrictions": {
      "validFor": [
        "string"
      ],
      "validFrom": "2021-05-04T09:42:00+00:00",
      "validUntil": "2021-05-04T09:42:00+00:00",
      "minOrderValue": {
        "amount": 42.0,
        "currency": "string"
      }
    },
    "issuedTo": "string",
    "redemptionCount": 42.0,
    "status": "INACTIVE",
    "links": [
      {
        "rel": "string",
        "title": "string",
        "href": "string",
        "type": "string"
      }
    ],
    "deleted": true
  },
  "validInYears": 42
}
Response example (201)
{
  "points": 30,
  "value": 20,
  "type": "coupon",
  "name": "persönlicher 20 Euro Gutschein",
  "description": "Ein persönlicher Gutschein zum einlösen auf Lieferladen.de (nur gültig im Lieferladen.de Stuttgart Shop)"
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Returns the options you have to redeem your points

returns the options you have to redeem your points

Headers
  • authorization Required / string

    Bearer token

Responses
  • 200 array[object]
    • id string
    • type Required / string
    • name Required / string
    • description string
    • points Required / integer
    • pointsAfterCoupon integer
    • coupon object

      Coupons describe voucher alike commerce capabilities.

      • code string

        e.g.: WINTER-SALE, 10OFF (read-only)

      • name Required / string

        Localized name

      • description string

        Localized coupon description

      • discountType Required / string

        'PERCENT' for relative values or 'ABSOLUTE' for float values, referring to a specific currency.

        Values are PERCENT and ABSOLUTE.

      • discountPercentage number

        A discount percentage within the range [0.00, 100.00]. Required if type is 'PERCENT'.

        Minimum value is 0, maximum value is 100.

      • discountAbsolute object

        Required if type is 'ABSOLUTE'

        • amount number

          The total amount in the specified currency.

          Minimum value is 0. Default value is 0.

        • currency string

          ISO 4217 currency code, e.g.: USD, EUR, CHF

          Default value is USD.

      • allowAnonymous boolean

        Can the coupon be redeemed by anonymous user

      • maxRedemptions number

        Maximum number of redemptions; -1 designates 'unlimited' (seller-only)

        Default value is -1.

      • maxRedemptionsPerCustomer number

        Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.

        Default value is -1.

      • restrictions object
        • validFor array[string]

          A list of customer identifiers, which can redeem the coupon. Cannot be specified for coupons which can be redeemed by anonymous users.

        • validFrom string(date-time)

          Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'

        • validUntil string(date-time)

          Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'

        • minOrderValue object

          Minimum order value which entitles the customer to redeem the coupon.

          • amount number

            The total amount in the specified currency.

            Minimum value is 0. Default value is 0.

          • currency string

            ISO 4217 currency code, e.g.: USD, EUR, CHF

            Default value is USD.

      • issuedTo string

        The Id of the customer who originally received the coupon (seller-only).

      • redemptionCount number

        The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only)

      • status string

        Current status of the coupon (read-only). 'INACTIVE': the coupon is only valid in the future; 'VALID': can be used; 'EXPIRED': the coupon validity period has expired; 'USED': the maximum number of redemptions for the coupon has been reached.

        Values are INACTIVE, VALID, EXPIRED, and USED.

      • links array[object]

        Hypermedia reference to coupon actions (read-only, customer-only)

        • rel Required / string

          Link relation type

        • title Required / string

          Link title

        • href Required / string

          Target URI of the link

        • type Required / string

          A content type of the referenced resource

      • deleted boolean

        Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute

    • validInYears integer
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /public/customer/redeem
$ curl \
 -X GET https://api.emporix.io/reward-points/public/customer/redeem \
 -H "authorization: string"
Response example (200)
[
  {
    "id": "string",
    "type": "string",
    "name": "string",
    "description": "string",
    "points": 42,
    "pointsAfterCoupon": 42,
    "coupon": {
      "code": "string",
      "name": "string",
      "description": "string",
      "discountType": "PERCENT",
      "discountPercentage": 42.0,
      "discountAbsolute": {
        "amount": 42.0,
        "currency": "string"
      },
      "allowAnonymous": true,
      "maxRedemptions": 42.0,
      "maxRedemptionsPerCustomer": 42.0,
      "restrictions": {
        "validFor": [
          "string"
        ],
        "validFrom": "2021-05-04T09:42:00+00:00",
        "validUntil": "2021-05-04T09:42:00+00:00",
        "minOrderValue": {
          "amount": 42.0,
          "currency": "string"
        }
      },
      "issuedTo": "string",
      "redemptionCount": 42.0,
      "status": "INACTIVE",
      "links": [
        {
          "rel": "string",
          "title": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "deleted": true
    },
    "validInYears": 42
  }
]
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Redeems the points and returns a couponCode

redeems the points and returns a couponCode

Headers
  • authorization Required / string

    Bearer token

Body
  • id string
Responses
  • 201 object
    • code string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /public/customer/redeem
$ curl \
 -X POST https://api.emporix.io/reward-points/public/customer/redeem \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -d '{"id":"string"}'
Request payload example
# Headers
authorization: string

# Payload
{
  "id": "string"
}
Response example (201)
{
  "code": "LLS-232394"
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Summarybatch

Gets the rewardPoints of all customers

Gets the rewardPoints of all customers

Headers
  • authorization Required / string

    Bearer token

Responses
  • 200 array[object]
    • customerId string
    • activePoints integer
    • summary object
      • addedPointsList array[object]
        • id string
        • reference-id string
        • description string
        • points Required / integer
        • createdAt string(date-time)
        • allPointsAfterCreation integer
        • usedPoints integer
        • validUntil string(date-time)
        • usedWith array[string]

          redeemPointsIds

      • redeemedPointsList array[object]
        • id string
        • description string
        • points Required / integer
        • createdAt string(date-time)
        • allPointsAfterCreation integer
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /summaryBatch
$ curl \
 -X GET https://api.emporix.io/reward-points/summaryBatch \
 -H "authorization: string"
Response example (200)
[
  {
    "customerId": "string",
    "activePoints": 42,
    "summary": {
      "addedPointsList": [
        {
          "id": "string",
          "reference-id": "string",
          "description": "string",
          "points": 42,
          "createdAt": "2021-05-04T09:42:00+00:00",
          "allPointsAfterCreation": 42,
          "usedPoints": 42,
          "validUntil": "2021-05-04T09:42:00+00:00",
          "usedWith": [
            "string"
          ]
        }
      ],
      "redeemedPointsList": [
        {
          "id": "string",
          "description": "string",
          "points": 42,
          "createdAt": "2021-05-04T09:42:00+00:00",
          "allPointsAfterCreation": 42
        }
      ]
    }
  }
]
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": null,
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}