Wallet

Actions

Action method for resource wallet.

HTTP method Endpoint Description
[badge-blue GET] /wallet/actions/sales-turnover Sales turnover of the customer in time interval
[badge-blue GET] /wallet/actions/points-overview Points overview of the customer in time interval
[badge-blue GET] /wallet/actions/credits-overview Credits overview of the customer in time interval
[badge-blue GET] /wallet/actions/points-expiration-overview Points expiration overview of the customer
[badge-blue GET] /wallet/actions/credits-expiration-overview Credits expiration overview of the customer


Get sales turnover

Get information about sales turnover of the customer in time interval
[badge-blue GET] /wallet/actions/sales-turnover

Request

Parameter name Type Description Mandatory (Yes/No)
customer_id string The unique id of the customer Yes
date_from string Date (ISO 8601) start of the time interval
YYYY-MM-DD
No
date_to string Date (ISO 8601) end of the time interval
YYYY-MM-DD
No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
turnover QualificationTurnover[] List of all turnover by currency in time interval

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/wallet/actions/sales-turnover?customer_id=8aa9b0ea258c3219f14033939
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NNDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Wed, 09 Dec 2020 15:51:28 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "turnover": [
        {
            "currency_id":"c3219f14033",
            "value":674.80
        },
        {
            "currency_id":"8aa9b0e",
            "value":76402.12
        }
    ],
    "total_items": 1
  }
} 


Get points overview

Get information about points overview of the customer in time interval
[badge-blue GET] /wallet/actions/points-overview

Request

Parameter name Type Description Mandatory (Yes/No)
customer_id string The unique id of the customer Yes
date_from string Date (ISO 8601) start of the time interval
YYYY-MM-DD
No
date_to string Date (ISO 8601) end of the time interval
YYYY-MM-DD
No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
earned_points float Amount of earned points in time interval
redeemed_points float Amount of redeemed points in time interval
available_points float Amount of available points in the moment. Time interval has no influence to the result

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/wallet/actions/points-overview?customer_id=8aa9b0ea258c53219f14033939
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Wed, 09 Dec 2020 15:47:18 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "earned_points": 100,
    "redeemed_points": 20.5,
    "available_points": 79.5
  }
}


Get credits overview

Get information about credits overview of the customer in the time interval
[badge-blue GET] /wallet/actions/credits-overview

Request

Parameter name Type Description Mandatory (Yes/No)
customer_id string The unique id of the customer Yes
date_from string Date (ISO 8601) start of the time interval
YYYY-MM-DD
No
date_to string Date (ISO 8601) end of the time interval
YYYY-MM-DD
No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
earned_credits float Amount of earned credits in the time interval
redeemed_credits float Amount of redeemed credits in the time interval
available_credits float Amount of available credits in the moment. Time interval has no influence to the result

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/wallet/actions/credits-overview?customer_id=8aa9b0ea258c53219f14033939
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Wed, 09 Dec 2020 15:48:49 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "earned_credits": 100,
    "redeemed_credits": 20.1,
    "available_credits": 79.9
  }
}


Get points expiration overview

Get information about points expiration overview of the customer
[badge-blue GET] /wallet/actions/points-expiration-overview

Request

Parameter name Type Description Mandatory (Yes/No)
customer_id string The unique id of the customer Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
next_amount float Amount of points, that will expire first
next_date string Date (ISO 8601) when first points will expire
YYYY-MM-DD
current_month_amount float Amount of points that will expire in current month

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/wallet/actions/points-expiration-overview?customer_id=8aa9b0ea258c53219f14033939
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Wed, 09 Dec 2020 15:49:51 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "next_amount": 77.36,
    "next_date": "2022-01-01",
    "current_month_amount": 0
  }
}


Get credits expiration overview

Get information about credits expiration overview of the customer
[badge-blue GET] /wallet/actions/credits-expiration-overview

Request

Parameter name Type Description Mandatory (Yes/No)
customer_id string The unique id of the customer Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
next_amount float Amount of credits, that will expire first
next_date string Date (ISO 8601) when first credits will expire
YYYY-MM-DD
current_month_amount float Amount of credits that will expire in current month

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/wallet/actions/credits-expiration-overview?customer_id=8aa9b0ea258c53219f14033939
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Wed, 09 Dec 2020 15:50:32 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "next_amount": 77.36,
    "next_date": "2022-01-01",
    "current_month_amount": 0
  }
}