Recardy API (1.6.3)
Recardy offers an easy-to-use REST API to integrate your application with.
If you need support please feel free to contact us at developer@recardy.com.
© Recardy.com
To access our API, you need to have a valid JWT token.
This endpoints create the JWT token accepting an api_key and api_secret. Api keys are meant for integration purposes.
The api_key and api_secret will be generated for you.
The JWT token must be sent with every following request in the Authorization header field using the Bearer authentication scheme.
Authenticates with the API
Returns a JWT token to be used with other API-calls and a refresh token which can be used to refresh a token after its expiration.
Authorizations:
Request Body schema: application/json
| api_key required | string (API Key) an api users api key |
| api_secret required | string (API Secret) the matching api secret |
Responses
Request samples
- Payload
{- "api_key": "live_ade8272e-b272-413f-b348-21a19c4fa8c6",
- "api_secret": "340ca7cb31232a87450c40555cd00765bce12ab017c4f68399d9a2e2833b5542"
}Response samples
- 200
{- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NTYwODUxMDAsImV4cCI6MTY1NjA4ODcwMCwicm9sZXMiOlsiUk9MRV9VU0VSIl0sImFwaV9rZXkiOiJ0c3RfMzE4OTc4NDNjNDFlNmY4NDIxZTkwMDlmYTNkY2QyMDYifQ.O9HRP8MqSHrH9KO8GIixkvxxVcQQU9vhmP6ce0iUIXLNaqdjSeLumlfC2-ZJbfdMLmSfNn5DIiVxRmSP3zgJh1nnzuiMFP81Yq9g0iD6ZKC8ygYKYrN6I71kYPS-q1CPz5Ze4Ethpbh5rsanGdfGCIccpM7Vx5fzxHYWo0Nn0ZAhL9cHiym0CSxc6EbGvHSYESGLidxuI65EGXqxdqXH9B7ZqBBLbPoH6pSUaqCSQ2lbsziALK3wrjgAS6gth3vZvLRiV5oDEU9QagQzpY5hpe_U1CX4SZPqh1PUaSiUUlAOD11hen5h9RtPyZGBPO_AcXucEWjckbTuw0VWgM5gfQ",
- "service_tokens": {
- "service_token": "89096f77fc9595d9bd2b9433d355af2738ba9ebc24"
}, - "refresh_token": "50c774fa8345bd577d61f27f2e0a7fd747e785d491889096f77fc9595d9bd2b9433d355af2738ba9ebc24257f3d056ab024e2dcbb85135447e585fc3250372da"
}Refreshes an expired JWT token
Returns a JWT token to be used with other API-calls and a refresh token which can be used to refresh a token after its expiration.
Authorizations:
Request Body schema: application/json
| refresh_token required | string (Refresh token) a refresh token to refresh an expired token |
Responses
Request samples
- Payload
{- "refresh_token": "50c774fa8345bd577d61f27f2e0a7fd747e785d491889096f77fc9595d9bd2b9433d355af2738ba9ebc24257f3d056ab024e2dcbb85135447e585fc3250372da"
}Response samples
- 200
{- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NTYwODUxMDAsImV4cCI6MTY1NjA4ODcwMCwicm9sZXMiOlsiUk9MRV9VU0VSIl0sImFwaV9rZXkiOiJ0c3RfMzE4OTc4NDNjNDFlNmY4NDIxZTkwMDlmYTNkY2QyMDYifQ.O9HRP8MqSHrH9KO8GIixkvxxVcQQU9vhmP6ce0iUIXLNaqdjSeLumlfC2-ZJbfdMLmSfNn5DIiVxRmSP3zgJh1nnzuiMFP81Yq9g0iD6ZKC8ygYKYrN6I71kYPS-q1CPz5Ze4Ethpbh5rsanGdfGCIccpM7Vx5fzxHYWo0Nn0ZAhL9cHiym0CSxc6EbGvHSYESGLidxuI65EGXqxdqXH9B7ZqBBLbPoH6pSUaqCSQ2lbsziALK3wrjgAS6gth3vZvLRiV5oDEU9QagQzpY5hpe_U1CX4SZPqh1PUaSiUUlAOD11hen5h9RtPyZGBPO_AcXucEWjckbTuw0VWgM5gfQ",
- "service_tokens": {
- "service_token": "89096f77fc9595d9bd2b9433d355af2738ba9ebc24"
}, - "refresh_token": "50c774fa8345bd577d61f27f2e0a7fd747e785d491889096f77fc9595d9bd2b9433d355af2738ba9ebc24257f3d056ab024e2dcbb85135447e585fc3250372da"
}Get redemption configurations
Retrieves a list of redemption configurations available.
Authorizations:
Responses
Response samples
- 200
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "recard_type": "Voucher",
- "name": "Recardy voucher",
- "logo_graphic": "data:image/gif;base64,R0lGODdhEAAQAMwAAP///////wAAACH5BAEAAAIALAAAAAAQABAAAAIplI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zv",
- "params": {
- "voucherType": "VoucherType1",
- "voucherValue": 10
}
}
]Initiate redemption
Initiates and returns a redemption.
Authorizations:
Request Body schema: application/json
| redemption_configuration_id required | string <uuid> (Redemption configuration id) The id of the redemption configuration. |
| code required | string (Redemption code) The code of the redemption request. |
| arguments | object or null (Redemption request arguments) The arguments of the redemption request. |
Responses
Request samples
- Payload
{- "redemption_configuration_id": "b3d0a0e0-9f1a-4e1a-8b0a-0e9f1a4e1a8b",
- "code": "HSCD-UIMA-ROPD-CXMQ",
- "arguments": {
- "amount": "6.9",
- "currency": "EUR"
}
}Response samples
- 201
- 202
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "code": "XLBV-LDEJ-DXLB",
- "amount": 10,
- "currency": "string",
- "booking_text": "Shopping at www.shop.com",
- "redemption_state": "Initial",
- "state": "Initial",
- "recards": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "name": "Gutscheinkarte",
- "code": "XLBV-LDEJ-DXLB",
- "numeric_code": "430010-213756-086842",
- "customer_id": "0512892f-9f36-4898-84b4-2e58bcb9c096",
- "created_at": "2019-08-24",
- "serial_number": "0010029121245871454000002452",
- "pin": "4711",
- "recard_template_id": "22a81dfd-2272-410c-b7ea-f5512aabe8fc:2",
- "state": "Active",
- "account": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "rechargeable": true,
- "authorization_required": false,
- "currency": "string",
- "minimal_redeemable_value": 0,
- "maximal_redeemable_value": null,
- "balance": 0.1,
- "reserved_amount": 0.1,
- "type": "primary",
- "account_no": "A3456783",
- "is_external": false,
- "allows_negative_balance": false
}, - "valid_from": null,
- "valid_till": null,
- "last_redeemed_at": "2019-08-24",
- "multiple_redemptions": false,
- "stackable": false,
- "design_id": "ccc4fc83-3f0d-46d4-b5e7-7a38767c83cc",
- "initial_amount": "6.9",
- "redeemed_amount": "5.0",
- "currency": "EUR"
}
], - "statistically_recorded": true,
- "created_at": "2021-01-01T00:00:00+00:00",
- "updated_at": "2021-01-01T00:00:00+00:00",
- "committed_by": "user@example.net",
- "committed_at": "2021-01-01T00:00:00+00:00",
- "cancelled_by": "user@example.net",
- "cancelled_at": "2021-01-01T00:00:00+00:00"
}Get redemption
Retrieves a single redemption by it's id.
Authorizations:
path Parameters
| id required | string <uuid> Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 Redemption id |
Responses
Response samples
- 200
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "code": "XLBV-LDEJ-DXLB",
- "amount": 10,
- "currency": "string",
- "booking_text": "Shopping at www.shop.com",
- "redemption_state": "Initial",
- "state": "Initial",
- "recards": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "name": "Gutscheinkarte",
- "code": "XLBV-LDEJ-DXLB",
- "numeric_code": "430010-213756-086842",
- "customer_id": "0512892f-9f36-4898-84b4-2e58bcb9c096",
- "created_at": "2019-08-24",
- "serial_number": "0010029121245871454000002452",
- "pin": "4711",
- "recard_template_id": "22a81dfd-2272-410c-b7ea-f5512aabe8fc:2",
- "state": "Active",
- "account": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "rechargeable": true,
- "authorization_required": false,
- "currency": "string",
- "minimal_redeemable_value": 0,
- "maximal_redeemable_value": null,
- "balance": 0.1,
- "reserved_amount": 0.1,
- "type": "primary",
- "account_no": "A3456783",
- "is_external": false,
- "allows_negative_balance": false
}, - "valid_from": null,
- "valid_till": null,
- "last_redeemed_at": "2019-08-24",
- "multiple_redemptions": false,
- "stackable": false,
- "design_id": "ccc4fc83-3f0d-46d4-b5e7-7a38767c83cc",
- "initial_amount": "6.9",
- "redeemed_amount": "5.0",
- "currency": "EUR"
}
], - "statistically_recorded": true,
- "created_at": "2021-01-01T00:00:00+00:00",
- "updated_at": "2021-01-01T00:00:00+00:00",
- "committed_by": "user@example.net",
- "committed_at": "2021-01-01T00:00:00+00:00",
- "cancelled_by": "user@example.net",
- "cancelled_at": "2021-01-01T00:00:00+00:00"
}Commit redemption
Commits a redemption by it's id.
Authorizations:
path Parameters
| id required | string <uuid> Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 Redemption id |
Request Body schema: application/json
| arguments | object or null (Redemption request arguments) The arguments of the redemption request. |
Responses
Request samples
- Payload
{- "arguments": {
- "amount": "6.9",
- "currency": "EUR"
}
}Response samples
- 200
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "code": "XLBV-LDEJ-DXLB",
- "amount": 10,
- "currency": "string",
- "booking_text": "Shopping at www.shop.com",
- "redemption_state": "Initial",
- "state": "Initial",
- "recards": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "name": "Gutscheinkarte",
- "code": "XLBV-LDEJ-DXLB",
- "numeric_code": "430010-213756-086842",
- "customer_id": "0512892f-9f36-4898-84b4-2e58bcb9c096",
- "created_at": "2019-08-24",
- "serial_number": "0010029121245871454000002452",
- "pin": "4711",
- "recard_template_id": "22a81dfd-2272-410c-b7ea-f5512aabe8fc:2",
- "state": "Active",
- "account": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "rechargeable": true,
- "authorization_required": false,
- "currency": "string",
- "minimal_redeemable_value": 0,
- "maximal_redeemable_value": null,
- "balance": 0.1,
- "reserved_amount": 0.1,
- "type": "primary",
- "account_no": "A3456783",
- "is_external": false,
- "allows_negative_balance": false
}, - "valid_from": null,
- "valid_till": null,
- "last_redeemed_at": "2019-08-24",
- "multiple_redemptions": false,
- "stackable": false,
- "design_id": "ccc4fc83-3f0d-46d4-b5e7-7a38767c83cc",
- "initial_amount": "6.9",
- "redeemed_amount": "5.0",
- "currency": "EUR"
}
], - "statistically_recorded": true,
- "created_at": "2021-01-01T00:00:00+00:00",
- "updated_at": "2021-01-01T00:00:00+00:00",
- "committed_by": "user@example.net",
- "committed_at": "2021-01-01T00:00:00+00:00",
- "cancelled_by": "user@example.net",
- "cancelled_at": "2021-01-01T00:00:00+00:00"
}Cancel redemption
Cancels a redemption by it's id.
Authorizations:
path Parameters
| id required | string <uuid> Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 Redemption id |
Responses
Response samples
- 200
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "code": "XLBV-LDEJ-DXLB",
- "amount": 10,
- "currency": "string",
- "booking_text": "Shopping at www.shop.com",
- "redemption_state": "Initial",
- "state": "Initial",
- "recards": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "name": "Gutscheinkarte",
- "code": "XLBV-LDEJ-DXLB",
- "numeric_code": "430010-213756-086842",
- "customer_id": "0512892f-9f36-4898-84b4-2e58bcb9c096",
- "created_at": "2019-08-24",
- "serial_number": "0010029121245871454000002452",
- "pin": "4711",
- "recard_template_id": "22a81dfd-2272-410c-b7ea-f5512aabe8fc:2",
- "state": "Active",
- "account": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "rechargeable": true,
- "authorization_required": false,
- "currency": "string",
- "minimal_redeemable_value": 0,
- "maximal_redeemable_value": null,
- "balance": 0.1,
- "reserved_amount": 0.1,
- "type": "primary",
- "account_no": "A3456783",
- "is_external": false,
- "allows_negative_balance": false
}, - "valid_from": null,
- "valid_till": null,
- "last_redeemed_at": "2019-08-24",
- "multiple_redemptions": false,
- "stackable": false,
- "design_id": "ccc4fc83-3f0d-46d4-b5e7-7a38767c83cc",
- "initial_amount": "6.9",
- "redeemed_amount": "5.0",
- "currency": "EUR"
}
], - "statistically_recorded": true,
- "created_at": "2021-01-01T00:00:00+00:00",
- "updated_at": "2021-01-01T00:00:00+00:00",
- "committed_by": "user@example.net",
- "committed_at": "2021-01-01T00:00:00+00:00",
- "cancelled_by": "user@example.net",
- "cancelled_at": "2021-01-01T00:00:00+00:00"
}Get redemption history
Returns a list of the last redemptions for today.
Authorizations:
Responses
Response samples
- 200
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "code": "XLBV-LDEJ-DXLB",
- "amount": 10,
- "currency": "string",
- "booking_text": "Shopping at www.shop.com",
- "redemption_state": "Initial",
- "state": "Initial",
- "recards": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "name": "Gutscheinkarte",
- "code": "XLBV-LDEJ-DXLB",
- "numeric_code": "430010-213756-086842",
- "customer_id": "0512892f-9f36-4898-84b4-2e58bcb9c096",
- "created_at": "2019-08-24",
- "serial_number": "0010029121245871454000002452",
- "pin": "4711",
- "recard_template_id": "22a81dfd-2272-410c-b7ea-f5512aabe8fc:2",
- "state": "Active",
- "account": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "version": 1,
- "organization_id": "7064c55e-dd59-41e1-847d-6fe265c80293",
- "organization_scope": "Organization",
- "rechargeable": true,
- "authorization_required": false,
- "currency": "string",
- "minimal_redeemable_value": 0,
- "maximal_redeemable_value": null,
- "balance": 0.1,
- "reserved_amount": 0.1,
- "type": "primary",
- "account_no": "A3456783",
- "is_external": false,
- "allows_negative_balance": false
}, - "valid_from": null,
- "valid_till": null,
- "last_redeemed_at": "2019-08-24",
- "multiple_redemptions": false,
- "stackable": false,
- "design_id": "ccc4fc83-3f0d-46d4-b5e7-7a38767c83cc",
- "initial_amount": "6.9",
- "redeemed_amount": "5.0",
- "currency": "EUR"
}
], - "statistically_recorded": true,
- "device_id": "1234567890",
- "request_id": "1234567890",
- "created_at": "2021-01-01T00:00:00+00:00",
- "created_by": "user@example.net",
- "updated_at": "2021-01-01T00:00:00+00:00",
- "committed_by": "user@example.net",
- "committed_at": "2021-01-01T00:00:00+00:00",
- "cancelled_by": "user@example.net",
- "cancelled_at": "2021-01-01T00:00:00+00:00"
}
]