Statuses

Status is a specific property of a customer account which can be achieved based on the defined criteria, like its validity, achieving principle or loyalty switch. It is often used for management of loyalty membership levels, employees or VIP customers within the loyalty scheme setup and can be processed by this resource.

Available methods

All available methods for resource statuses.

HTTP method Endpoint Description
[badge-blue GET] /statuses Collection of all recent statuses
[badge-blue GET] /statuses/{status_id} Get information about a specific status


Get all statuses

Get information as a collection of all recent statuses
[badge-blue GET] /statuses

Query string

Parameter name Type Description Mandatory (Yes/No)
count integer The number of records to return.
Default value is 100.
No
offset integer The number of records from a collection to skip.
Default value is 0.
No
sort_field string One of the query string parameters for sorting.
Response is sorted by the specified field.
No
sort_direction string Direction of sorting the response list.
Possible values are: ASC / DESC
No


Response

Status code: 200 OK
Output structure: object

Parameter name Type Description
statuses Status[] List of recent statuses
total_items integer Count of all found statuses

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/statuses?count=2
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3DJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 14:42:51 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "statuses": [
      {
        "status_id": "86e05affc7a7abefcd513ab400",
        "name": "Basic",
        "description": null,
        "qualification_period": null,
        "qualification_turnover": [
          {
            "currency_id": "8bed991c68a470e7aaeffbf048",
            "value": null
          },
          {
            "currency_id": "86e05affc7a7abefcd513ab400",
            "value": null
          }
        ],
        "previous_status": null,
        "next_status": "83d1d11ea3884a5d33253fe214",
        "validity_period": "2 years",
        "collection_points": true,
        "payment_points": true,
        "qualification_type": 0,
        "discount": 0,
        "last_change": "2019-01-04 10:31:56"
      },
      {
        "status_id": "83d1d11ea3884a5d33253fe214",
        "name": "Silver",
        "description": null,
        "qualification_period": 12,
        "qualification_turnover": [
          {
            "currency_id": "86e05affc7a7abefcd513ab400",
            "value": 1500
          }
        ],
        "previous_status": "86e05affc7a7abefcd513ab400",
        "next_status": "8ad8b2b701199684f1222961d6",
        "validity_period": "1 year",
        "collection_points": true,
        "payment_points": true,
        "qualification_type": 2,
        "discount": 0,
        "last_change": "2020-05-20 11:35:07"
      }
    ],
    "total_items": 2
  }
}


Get a status

Get information about a specific status
[badge-blue GET] /statuses/{status_id}

Path parameters

Parameter name Type Description
status_id string The unique id for the status

Response

Status code: 200 OK
Output structure : Status

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/statuses/86e05affc77abefc513ab400
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1DI3YWUwTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 14:43:24 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "status_id": "86e05affc7a7abefcd513ab400",
    "name": "Basic",
    "description": null,
    "qualification_period": null,
    "qualification_turnover": [
      {
        "currency_id": "8bed991c68a470e7aaeffbf048",
        "value": null
      },
      {
        "currency_id": "86e05affc7a7abefcd513ab400",
        "value": null
      }
    ],
    "previous_status": null,
    "next_status": "83d1d11ea3884a5d33253fe214",
    "validity_period": "2 years",
    "collection_points": true,
    "payment_points": true,
    "qualification_type": 0,
    "discount": 0,
    "last_change": "2019-01-04 10:31:56"
  }
}