Compare commits
2 Commits
develop
...
feature/OV
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c7b54c386 | |||
| ca784314ec |
Binary file not shown.
@ -215,14 +215,9 @@ public class ABTProductsPUTGenerator {
|
||||
}
|
||||
case "paymentMoment" -> {
|
||||
LOGGER.info("Rewriting paymentMoment to paymentMomentId...");
|
||||
if (jsonField.getValue().get("paymentMomentId").isNull()) {
|
||||
LOGGER.info("Rewriting null paymentMomentId...");
|
||||
((ObjectNode)newJsonNode).putRawValue("paymentMomentId", null);
|
||||
} else {
|
||||
Long paymentMomentId = jsonField.getValue().get("paymentMomentId").asLong();
|
||||
((ObjectNode)newJsonNode).put("paymentMomentId", paymentMomentId);
|
||||
}
|
||||
}
|
||||
case "requiredCustomerLevel" -> {
|
||||
LOGGER.info("Rewriting requiredCustomerLevel to requiredCustomerLevelId...");
|
||||
Long requiredCustomerLevelId = jsonField.getValue().get("requiredCustomerLevelId").asLong();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,417 +0,0 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Integration layer APIs for token storage for ABT
|
||||
description: >-
|
||||
APIs that give business processes access to the security and authorization state of a token within the scope of HTM. In the backend this is connected to a container which handles the accessToken en refreshToken management for an OVpas as given by GBO.
|
||||
version: "1.0"
|
||||
servers:
|
||||
- url: https://services.acc.api.htm.nl/abt/containertokens/1.0
|
||||
security:
|
||||
- oAuthSample: [profile]
|
||||
tags:
|
||||
- name: securitytokens
|
||||
paths:
|
||||
/securitytokens:
|
||||
post:
|
||||
tags:
|
||||
- securitytokens
|
||||
summary: Create a new security token entry in the vault
|
||||
description: Create a new security token entry in the vault, if the customerProfileId has been supplied create in the customerToken DB otherwise in the AnonymousToken DB
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateSecurityTokenBody"
|
||||
examples:
|
||||
token details:
|
||||
value:
|
||||
{
|
||||
"xTat": "cf694905-7f76-4799-b0bc-490716921323",
|
||||
"otpKey": "123456789123456789123456789abcde",
|
||||
"customerProfileId": 12314
|
||||
}
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
"400":
|
||||
description: Bad Request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Missing Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Missing Mandatory Parameter
|
||||
detail: Required parameter {0} is missing.
|
||||
Invalid Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Invalid Parameter
|
||||
detail: Required parameter {0} is invalid.
|
||||
"401":
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Unauthorized:
|
||||
value:
|
||||
status: 401
|
||||
title: Unauthorized
|
||||
detail: Invalid Access Token
|
||||
"404":
|
||||
description: Not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
TAT not found:
|
||||
value:
|
||||
status: 404
|
||||
title: Not Found
|
||||
detail: TAT Account Not Found
|
||||
"409":
|
||||
description: Conflict
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
TAT already exists:
|
||||
value:
|
||||
status: 409
|
||||
title: Conflict
|
||||
detail: Security Token already exists
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Internal Server Error:
|
||||
value:
|
||||
status: 500
|
||||
title: Internal Server Error
|
||||
detail: An unknown error has occurred
|
||||
/securitytokens/{xTat}/status:
|
||||
parameters:
|
||||
- name: xTat
|
||||
in: path
|
||||
schema:
|
||||
type: string
|
||||
example: 85dbeacc-b9aa-4d5b-bdec-9319010c597f
|
||||
required: true
|
||||
description: The xTat of the OVpastoken for which the status needs to be checked
|
||||
- name: customerProfileId
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
example: 323
|
||||
required: false
|
||||
description: The id of the customer Profile for which the request is being done, if customer has identified themselves
|
||||
get:
|
||||
tags:
|
||||
- securitytokens
|
||||
summary: Request the security and authorization status of an OV pas token
|
||||
description: Request the security and authorization status of an OV pas token, if the customerProfileId has been supplied look in the customerToken DB otherwise check the AnonymousToken DB.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SecurityTokenStatusResponse"
|
||||
examples:
|
||||
Not secured and not authorized :
|
||||
summary: Not secured, not authorized
|
||||
value:
|
||||
{
|
||||
"isAuthorized": false,
|
||||
"isSecured": false
|
||||
}
|
||||
Secured and not authorized :
|
||||
summary: Secured, not authorized
|
||||
value:
|
||||
{
|
||||
"isAuthorized": false,
|
||||
"isSecured": true
|
||||
}
|
||||
Secured and authorized :
|
||||
summary: Secured and authorized
|
||||
value:
|
||||
{
|
||||
"isAuthorized": true,
|
||||
"isSecured": true
|
||||
}
|
||||
"400":
|
||||
description: Bad Request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Missing Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Missing Mandatory Parameter
|
||||
detail: Required parameter {0} is missing.
|
||||
Invalid Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Invalid Parameter
|
||||
detail: Required parameter {0} is invalid.
|
||||
"401":
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Unauthorized:
|
||||
value:
|
||||
status: 401
|
||||
title: Unauthorized
|
||||
detail: Invalid Access Token
|
||||
"404":
|
||||
description: Not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
TAT not found:
|
||||
value:
|
||||
status: 404
|
||||
title: Not Found
|
||||
detail: TAT Account Not Found
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Internal Server Error:
|
||||
value:
|
||||
status: 500
|
||||
title: Internal Server Error
|
||||
detail: An unknown error has occurred
|
||||
/securitytokens/{xTat}:
|
||||
parameters:
|
||||
- name: xTat
|
||||
in: path
|
||||
schema:
|
||||
type: string
|
||||
example: uuid
|
||||
required: true
|
||||
description: The xTat of the ovPastoken for which the status needs to be checked
|
||||
- name: customerProfileId
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
example: 323
|
||||
required: false
|
||||
description: The id of the customer Profile for which the request is being done, if customer has identified themselves
|
||||
patch:
|
||||
tags:
|
||||
- securitytokens
|
||||
summary: Validate the supplied OTP and secure and/or authorize the token
|
||||
description: Validate the supplied OTP and secure and/or authorize the token if the customerProfileId has been supplied look in the customerToken DB otherwise check the AnonymousToken DB.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SecurityValidateTokenBody"
|
||||
examples:
|
||||
token:
|
||||
value:
|
||||
{
|
||||
"otp": "123456"
|
||||
}
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SecurityTokenStatusResponse"
|
||||
examples:
|
||||
Not secured and not authorized :
|
||||
summary: Not secured, not authorized
|
||||
value:
|
||||
{
|
||||
"isAuthorized": false,
|
||||
"isSecured": false
|
||||
}
|
||||
Secured and not authorized :
|
||||
summary: Secured, not authorized
|
||||
value:
|
||||
{
|
||||
"isAuthorized": false,
|
||||
"isSecured": true
|
||||
}
|
||||
Secured and authorized :
|
||||
summary: Secured and authorized
|
||||
value:
|
||||
{
|
||||
"isAuthorized": true,
|
||||
"isSecured": true
|
||||
}
|
||||
"400":
|
||||
description: Bad Request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Missing Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Missing Mandatory Parameter
|
||||
detail: Required parameter {0} is missing.
|
||||
Invalid Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Invalid Parameter
|
||||
detail: Required parameter {0} is invalid.
|
||||
"422":
|
||||
description: Unprocessable Entity
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Validation failed:
|
||||
value:
|
||||
status: 422
|
||||
title: OTP validation failed
|
||||
detail: The supplied OTP could not be validated
|
||||
"401":
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Unauthorized:
|
||||
value:
|
||||
status: 401
|
||||
title: Unauthorized
|
||||
detail: Invalid Access Token
|
||||
"404":
|
||||
description: Not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
TAT not found:
|
||||
value:
|
||||
status: 404
|
||||
title: Not Found
|
||||
detail: TAT Account Not Found
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Internal Server Error:
|
||||
value:
|
||||
status: 500
|
||||
title: Internal Server Error
|
||||
detail: An unknown error has occurred
|
||||
delete:
|
||||
tags:
|
||||
- securitytokens
|
||||
summary: Delete the authorization for HTM for an ovpaytoken
|
||||
description: Delete the authorization for HTM for an ovpaytoken if the customerProfileId has been supplied look in the customerToken DB otherwise check the AnonymousToken DB.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SecurityTokenStatusResponse"
|
||||
example:
|
||||
{}
|
||||
components:
|
||||
securitySchemes:
|
||||
oAuthSample:
|
||||
type: oauth2
|
||||
description: This API uses OAuth 2 with the clientCredentials flow. [More info](https://api.example.com/docs/auth)
|
||||
flows:
|
||||
clientCredentials: # <---- OAuth flow( clientCredentials)
|
||||
tokenUrl: https://identity.{env}.api.htm.nl/oauth2/token
|
||||
scopes:
|
||||
profile: "Access user profile"
|
||||
schemas:
|
||||
ErrorResponse:
|
||||
description: Default response when an invalid request has been sent
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: integer
|
||||
description: >-
|
||||
A status IS An integer that represents the HTTP status code of the
|
||||
response.
|
||||
example: 400
|
||||
title:
|
||||
type: string
|
||||
description: A title IS A string that provides a brief summary of the error.
|
||||
detail:
|
||||
type: string
|
||||
description: A detail IS A string that provides more details about the error.
|
||||
CreateSecurityTokenBody:
|
||||
description: Body for when the a new security token entry is created
|
||||
type: object
|
||||
required:
|
||||
- xTat
|
||||
- otpKey
|
||||
properties:
|
||||
xTat:
|
||||
type : string
|
||||
description: >-
|
||||
Unique identifier for the GBO transit account
|
||||
example: 03071794-482a-4168-b60f-84669a9e6a76
|
||||
otpKey:
|
||||
type : string
|
||||
description: >-
|
||||
Key used to validate the OTP at GBO
|
||||
example: 123456789123456789123456789abcde
|
||||
customerProfileId:
|
||||
type : integer
|
||||
description: >-
|
||||
CustomerProfileId of the account requesting security or giving authorization
|
||||
example: 123456
|
||||
SecurityTokenStatusResponse:
|
||||
description: Response for when the status of a token is requested
|
||||
type: object
|
||||
properties:
|
||||
isSecured:
|
||||
type: boolean
|
||||
description: >-
|
||||
Is the OVpas secured according to the GBO
|
||||
example: false
|
||||
isAuthorized:
|
||||
type: boolean
|
||||
description: >-
|
||||
Does HTM have the authorization to access the secured the data of the OVpas
|
||||
example: false
|
||||
SecurityValidateTokenBody:
|
||||
description: Body for when the a token entry is validated
|
||||
type: object
|
||||
required:
|
||||
- otp
|
||||
properties:
|
||||
otp:
|
||||
type : string
|
||||
description: >-
|
||||
OTP to be used to secure the token and retrieve the JWT at GBO
|
||||
example: 123456
|
||||
@ -45,36 +45,12 @@ paths:
|
||||
"contractStatus":
|
||||
{ "contractStatusId": 2, "name": "active" },
|
||||
"productId": 1,
|
||||
"productName": "HTM Maand 20% korting doorlopend",
|
||||
"termDuration": "P1M",
|
||||
"productName": "HTM Maand 20% korting",
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"created": "2024-08-01T15:01:00.000Z",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
"ovPayTokenId": 1337,
|
||||
"contractVersions": [
|
||||
{
|
||||
"contractVersionId": 1,
|
||||
"termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/",
|
||||
"productId": 1,
|
||||
"productName": "HTM Maand 20% korting doorlopend",
|
||||
"taxCode": "V9",
|
||||
"taxPercentage": 9,
|
||||
"termAmountInclTax": 400,
|
||||
"start": "2024-08-01T15:01:00.000Z",
|
||||
"end": "2025-01-01T03:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"contractVersionId": 2,
|
||||
"termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/",
|
||||
"productId": 1,
|
||||
"productName": "HTM Maand 20% korting doorlopend",
|
||||
"taxCode": "V9",
|
||||
"taxPercentage": 9,
|
||||
"termAmountInclTax": 500,
|
||||
"start": "2025-01-01T03:00:00.000Z",
|
||||
"end": null
|
||||
}
|
||||
],
|
||||
"_links":
|
||||
{
|
||||
"get_token":
|
||||
@ -92,38 +68,14 @@ paths:
|
||||
"orderLineId": "42f68042-908f-41f4-9d9b-4cab843ff0e8",
|
||||
"touchpointId": 2,
|
||||
"contractStatus":
|
||||
{ "contractStatusId": 6, "name": "pending cancellation" },
|
||||
{ "contractStatusId": 1, "name": "new" },
|
||||
"productId": 1,
|
||||
"productName": "HTM 20% Korting doorlopend",
|
||||
"termDuration": "P1M",
|
||||
"productName": "HTM Maand 20% korting",
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"created": "2024-08-01T15:01:00.000Z",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
"ovPayTokenId": 1338,
|
||||
"contractVersions": [
|
||||
{
|
||||
"contractVersionId": 1,
|
||||
"termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/",
|
||||
"productId": 1,
|
||||
"productName": "HTM 20% Korting doorlopend",
|
||||
"taxCode": "V9",
|
||||
"taxPercentage": 9,
|
||||
"termAmountInclTax": 400,
|
||||
"start": "2024-08-01T15:01:00.000Z",
|
||||
"end": "2025-01-01T03:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"contractVersionId": 2,
|
||||
"termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/",
|
||||
"productId": 1,
|
||||
"productName": "HTM 20% Korting doorlopend",
|
||||
"taxCode": "V9",
|
||||
"taxPercentage": 9,
|
||||
"termAmountInclTax": 500,
|
||||
"start": "2025-01-01T03:00:00.000Z",
|
||||
"end": "2025-02-01T03:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"_links":
|
||||
{
|
||||
"get_token":
|
||||
@ -202,8 +154,8 @@ paths:
|
||||
"contractStatus":
|
||||
{ "contractStatusId": 2, "name": "active" },
|
||||
"productId": 1,
|
||||
"productName": "HTM 20% Korting doorlopend",
|
||||
"termDuration": "P1M",
|
||||
"productName": "HTM Maand 20% korting",
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"ovPayTokenId": 1337,
|
||||
@ -213,22 +165,22 @@ paths:
|
||||
"contractVersionId": 1,
|
||||
"termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/",
|
||||
"productId": 1,
|
||||
"productName": "HTM 20% Korting doorlopend",
|
||||
"productName": "HTM Maand 20% korting",
|
||||
"taxCode": "V9",
|
||||
"taxPercentage": 9.0,
|
||||
"termAmountInclTax": 400,
|
||||
"start": "2024-08-01T15:01:00.000Z",
|
||||
"end": "2025-01-01T03:00:00.000Z",
|
||||
"start": "2024-07-04 15:01:00.000",
|
||||
"end": "2024-12-31 15:01:00.000",
|
||||
},
|
||||
{
|
||||
"contractVersionId": 2,
|
||||
"termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/",
|
||||
"productId": 1,
|
||||
"productName": "HTM 20% Korting doorlopend",
|
||||
"productName": "HTM Maand 20% korting",
|
||||
"taxCode": "V9",
|
||||
"taxPercentage": 9.0,
|
||||
"termAmountInclTax": 400,
|
||||
"start": "2025-01-01T03:00:00.000Z",
|
||||
"start": "2025-01-01 15:01:00.000",
|
||||
},
|
||||
],
|
||||
"contractActions":
|
||||
@ -238,7 +190,7 @@ paths:
|
||||
"actionType":
|
||||
{ "actionTypeId": 1, "name": "create" },
|
||||
"user": "subid123456",
|
||||
"timestamp": "2024-07-02T15:01:00.000Z",
|
||||
"timestamp": "2024-07-02 15:01:00.000",
|
||||
"details": "Contract created",
|
||||
"correlationId": "976e7a4c-bf24-43d2-b444-55817556e7ee",
|
||||
},
|
||||
@ -247,7 +199,7 @@ paths:
|
||||
"actionType":
|
||||
{ "actionTypeId": 2, "name": "change" },
|
||||
"user": "subid123456",
|
||||
"timestamp": "2024-07-03T15:01:00.000Z",
|
||||
"timestamp": "2024-07-03 15:01:00.000",
|
||||
"details": "Contract changed",
|
||||
"correlationId": "e2462347-6749-4841-b42a-cf8de19ec727",
|
||||
},
|
||||
@ -259,8 +211,8 @@ paths:
|
||||
"externalReference": "F2024-0001",
|
||||
"term": 1,
|
||||
"invoiceDate": "2024-07-02",
|
||||
"created": "2024-07-02T15:01:00.000Z",
|
||||
"updated": "2024-07-02T15:01:00.000Z",
|
||||
"created": "2024-07-02 15:01:00.000",
|
||||
"updated": "2024-07-02 15:01:00.000",
|
||||
"state": "invoice_created",
|
||||
"data": "{json}",
|
||||
"isCredit": false,
|
||||
@ -318,8 +270,8 @@ paths:
|
||||
"externalReference": "F2024-0001",
|
||||
"term": 1,
|
||||
"invoiceDate": "2024-07-02",
|
||||
"created": "2024-07-02T15:01:34.000Z",
|
||||
"updated": "2024-07-04T00:04:56.000Z",
|
||||
"created": "2024-07-02 15:01:34.000",
|
||||
"updated": "2024-07-04 00:04:56.000",
|
||||
"state": "invoice_created",
|
||||
"public_link": "http://mijnfactuurinzien.nl/F2024-0001",
|
||||
"isCredit": false,
|
||||
@ -330,8 +282,8 @@ paths:
|
||||
"externalReference": "F2024-0002",
|
||||
"term": 2,
|
||||
"invoiceDate": "2024-08-02",
|
||||
"created": "2024-08-02T15:01:34.000Z",
|
||||
"updated": "2024-08-04T00:04:56.000Z",
|
||||
"created": "2024-08-02 15:01:34.000",
|
||||
"updated": "2024-08-04 00:04:56.000",
|
||||
"state": "invoice_created",
|
||||
"public_link": "http://mijnfactuurinzien.nl/F2024-0002",
|
||||
"isCredit": false,
|
||||
@ -376,8 +328,8 @@ paths:
|
||||
"cancellationMoment": "termBound",
|
||||
"termDuration": "P1M",
|
||||
"billingDay": 18,
|
||||
"cancellationFrom": "2024-08-10T00:00:00Z",
|
||||
"cancellationUntil": "2026-08-10T00:00:00Z",
|
||||
"cancellationFrom": "2024-08-10T00:00:00",
|
||||
"cancellationUntil": "2026-08-10T00:00:00",
|
||||
}
|
||||
/contracts/{contractId}/cancellationvalidation:
|
||||
parameters:
|
||||
@ -430,7 +382,7 @@ paths:
|
||||
{
|
||||
"validationResult": true,
|
||||
"validationMessage": "",
|
||||
"end": "2024-08-10T03:59:59Z",
|
||||
"end": "2024-08-10T03:59:59",
|
||||
"refundAmount": 2489,
|
||||
"refundMethods": ["creditInvoice", "iDeal"],
|
||||
}
|
||||
@ -499,7 +451,7 @@ paths:
|
||||
the refund amount and refund method.
|
||||
value:
|
||||
{
|
||||
"end": "2024-08-10T03:59:59Z",
|
||||
"end": "2024-08-10T03:59:59",
|
||||
"refundAmount": 2489,
|
||||
"refundMethod": "creditInvoice",
|
||||
}
|
||||
@ -564,8 +516,8 @@ paths:
|
||||
"taxCode": "V9",
|
||||
"taxPercentage": 9.0,
|
||||
"termAmountInclTax": 400,
|
||||
"start": "2024-07-04T15:01:00.000Z",
|
||||
"end": "2024-12-31T15:01:00.000Z",
|
||||
"start": "2024-07-04 15:01:00.000",
|
||||
"end": "2024-12-31 15:01:00.000",
|
||||
},
|
||||
{
|
||||
"contractVersionId": 2,
|
||||
@ -575,8 +527,7 @@ paths:
|
||||
"taxCode": "V9",
|
||||
"taxPercentage": 9.0,
|
||||
"termAmountInclTax": 400,
|
||||
"start": "2025-01-01T15:01:00.000Z",
|
||||
"end": null
|
||||
"start": "2025-01-01 15:01:00.000",
|
||||
},
|
||||
],
|
||||
"contractActions":
|
||||
@ -586,7 +537,7 @@ paths:
|
||||
"actionType":
|
||||
{ "actionTypeId": 1, "name": "create" },
|
||||
"user": "subid123456",
|
||||
"timestamp": "2024-07-02T15:01:00.000Z",
|
||||
"timestamp": "2024-07-02 15:01:00.000",
|
||||
"details": "Contract created",
|
||||
"correlationId": "976e7a4c-bf24-43d2-b444-55817556e7ee",
|
||||
},
|
||||
@ -595,7 +546,7 @@ paths:
|
||||
"actionType":
|
||||
{ "actionTypeId": 2, "name": "change" },
|
||||
"user": "subid123456",
|
||||
"timestamp": "2024-07-03T15:01:00.000Z",
|
||||
"timestamp": "2024-07-03 15:01:00.000",
|
||||
"details": "Contract changed",
|
||||
"correlationId": "e2462347-6749-4841-b42a-cf8de19ec727",
|
||||
},
|
||||
@ -607,8 +558,8 @@ paths:
|
||||
"externalReference": "F2024-0001",
|
||||
"term": 1,
|
||||
"invoiceDate": "2024-07-02",
|
||||
"created": "2024-07-02T15:01:00.000Z",
|
||||
"updated": "2024-07-02T15:01:00.000Z",
|
||||
"created": "2024-07-02 15:01:00.000",
|
||||
"updated": "2024-07-02 15:01:00.000",
|
||||
"state": "invoice_created",
|
||||
"data": "{json}",
|
||||
"isCredit": false,
|
||||
@ -731,7 +682,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"created": "2024-08-01T15:01:00.000Z",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
"ovPayTokenId": 1337,
|
||||
"contractVersions":
|
||||
[
|
||||
@ -830,7 +781,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"created": "2024-08-01T15:01:00.000Z",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
"ovPayTokenId": 1337,
|
||||
"contractVersions":
|
||||
[
|
||||
|
||||
@ -1081,10 +1081,6 @@ paths:
|
||||
"photo": null,
|
||||
},
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -1134,9 +1130,9 @@ paths:
|
||||
},
|
||||
},
|
||||
}
|
||||
OV pas without PAD, without AGO:
|
||||
summary: OV pas without PAD, without AGO
|
||||
description: OV pas without PAD, without AGO
|
||||
OV pas without PAD:
|
||||
summary: OV pas without PAD
|
||||
description: OV pas without PAD
|
||||
value:
|
||||
{
|
||||
"ovPayTokens":
|
||||
@ -1168,10 +1164,6 @@ paths:
|
||||
"photo": null,
|
||||
},
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": false,
|
||||
"isAuthorized": false,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -1209,10 +1201,6 @@ paths:
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/51compare",
|
||||
"method": "POST",
|
||||
},
|
||||
"secure": {
|
||||
"href": "/tokens/securetoken",
|
||||
"method": "POST"
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -1225,9 +1213,9 @@ paths:
|
||||
},
|
||||
},
|
||||
}
|
||||
OV pas with PAD, with autoReload, with AGO:
|
||||
summary: OV pas with PAD, with autoReload, with AGO
|
||||
description: OV pas with PAD, with autoReload, with AGO
|
||||
OV pas with PAD and autoReload:
|
||||
summary: OV pas with PAD and autoReload
|
||||
description: OV pas with PAD and autoReload
|
||||
value:
|
||||
{
|
||||
"ovPayTokens":
|
||||
@ -1299,10 +1287,6 @@ paths:
|
||||
"ageFromInclusive": 4,
|
||||
"ageToInclusive": 11,
|
||||
},
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -1401,10 +1385,6 @@ paths:
|
||||
"ageFromInclusive": 4,
|
||||
"ageToInclusive": 11,
|
||||
},
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -1521,10 +1501,6 @@ paths:
|
||||
"ageFromInclusive": 4,
|
||||
"ageToInclusive": 11,
|
||||
},
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -1601,22 +1577,6 @@ paths:
|
||||
"birthdate": null,
|
||||
"photo": null,
|
||||
},
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": false,
|
||||
},
|
||||
"_links":{
|
||||
"self":
|
||||
{
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
|
||||
"method": "GET",
|
||||
},
|
||||
"authorize":
|
||||
{
|
||||
"href": "/tokens/authorizetoken",
|
||||
"method": "POST"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"customerProfileId": 1,
|
||||
@ -1639,17 +1599,6 @@ paths:
|
||||
"photo": null,
|
||||
},
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":{
|
||||
"self":
|
||||
{
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"customerProfileId": 18,
|
||||
@ -1672,17 +1621,6 @@ paths:
|
||||
"photo": null,
|
||||
},
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":{
|
||||
"self":
|
||||
{
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"customerProfileId": 132,
|
||||
@ -1705,17 +1643,6 @@ paths:
|
||||
"photo": null,
|
||||
},
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":{
|
||||
"self":
|
||||
{
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"customerProfileId": 166,
|
||||
@ -1741,22 +1668,6 @@ paths:
|
||||
"photo": null,
|
||||
},
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": false,
|
||||
"isAuthorized": false,
|
||||
},
|
||||
"_links":{
|
||||
"self":
|
||||
{
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
|
||||
"method": "GET",
|
||||
},
|
||||
"secure":
|
||||
{
|
||||
"href": "/tokens/securetoken",
|
||||
"method": "POST"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"customerProfileId": 166,
|
||||
@ -1779,17 +1690,6 @@ paths:
|
||||
"photo": null,
|
||||
},
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":{
|
||||
"self":
|
||||
{
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"customerProfileId": 1,
|
||||
@ -1812,17 +1712,6 @@ paths:
|
||||
"photo": null,
|
||||
},
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":{
|
||||
"self":
|
||||
{
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
|
||||
"method": "GET",
|
||||
},
|
||||
}
|
||||
},
|
||||
],
|
||||
_links:
|
||||
@ -1923,10 +1812,6 @@ paths:
|
||||
"personalAccountData":
|
||||
{ "name": null, "birthdate": null, "photo": null },
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -2005,10 +1890,6 @@ paths:
|
||||
"personalAccountData":
|
||||
{ "name": null, "birthdate": null, "photo": null },
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": false,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -2046,12 +1927,6 @@ paths:
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/compare",
|
||||
"method": "POST",
|
||||
},
|
||||
"authorize":{
|
||||
{
|
||||
"href": "/tokens/authorizetoken",
|
||||
"method": "POST"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
"_links":
|
||||
@ -2211,10 +2086,6 @@ paths:
|
||||
"personalAccountData":
|
||||
{ "name": null, "birthdate": null, "photo": null },
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -2278,10 +2149,6 @@ paths:
|
||||
"personalAccountData":
|
||||
{ "name": null, "birthdate": null, "photo": null },
|
||||
"gboAgeProfile": null,
|
||||
"tatSecurity": {
|
||||
"isSecured": true,
|
||||
"isAuthorized": true,
|
||||
},
|
||||
"_links":
|
||||
{
|
||||
"self":
|
||||
@ -3769,6 +3636,7 @@ paths:
|
||||
"vouchers": []
|
||||
}
|
||||
}
|
||||
|
||||
/customers/devices:
|
||||
post:
|
||||
summary: Add a new device to a customer profile.
|
||||
@ -4735,3 +4603,4 @@ components:
|
||||
customerDataItem:
|
||||
type: string
|
||||
example: emailAddress
|
||||
|
||||
@ -1,617 +0,0 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Service Engine APIs for TAT security
|
||||
description: >-
|
||||
Service Engine APIs for TAT security. These are NOT the raw GBO APIs to access TAT security at GBO directly.
|
||||
To be used by touch points to get secure a TAT.
|
||||
version: "2.0"
|
||||
servers:
|
||||
- url: https://services.acc.api.htm.nl/abt/touchpoint/2.0
|
||||
tags:
|
||||
- name: TAT Security
|
||||
paths:
|
||||
/tokens/status:
|
||||
parameters:
|
||||
- name: X-HTM-JWT-AUTH-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||
required: false
|
||||
description: The JWT of a customer in case of touchpoint were customer logs in themselves
|
||||
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: integer
|
||||
example: 323
|
||||
required: false
|
||||
description: The id of the customer Profile
|
||||
- name: X-HTM-ROLE-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: Customer
|
||||
required: false
|
||||
description: The role of the HTM employee in the case of the SMP
|
||||
- name: xTat
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format : uuid
|
||||
example: 5c4cba83-1ecd-46a4-b712-a8de0dcb7bbf
|
||||
required: false
|
||||
description: The xtat of the customerToken
|
||||
- name: ovPayTokenId
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
required: false
|
||||
description: The ovpay token id of a specific customer token
|
||||
- name: serviceReferenceId
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
example: NLOV1234567ABCDEFG
|
||||
required: false
|
||||
description: The serviceReferencId found on the bankstatement for a given trip with a bankcard, required for an unknown EMV card
|
||||
- name: amount
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
example: 0
|
||||
required: false
|
||||
description: The amount of the value of the bankstatement in cents, required for an unknown EMV card
|
||||
- name: ovpasNumber
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
example: OV34567
|
||||
required: false
|
||||
description: The number of the ovpas, required for an unknown Ovpas card
|
||||
- name: verificationCode
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
example: HL78
|
||||
required: false
|
||||
description: The 4 digit verificationCode found on the backside of the Ovpas, required for an unknown Ovpas card
|
||||
get:
|
||||
tags:
|
||||
- TAT Security
|
||||
summary: Check the status of the security and authorization status of the given token
|
||||
description: Check the status of the security and authorization status of the given token, check anonymous tokenDB if no customer headers are supplied otherwise check customer tokenDB
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/TokenStatusResponse"
|
||||
examples:
|
||||
isSecuredandnotAuthorized:
|
||||
summary: Token is secured but HTM is not authorized
|
||||
description: Token is secured but HTM is not authorized
|
||||
value:
|
||||
isSecured: true
|
||||
isAuthorized: false
|
||||
xTat: 12da8f2a-6390-408a-94eb-a6701b5daf27
|
||||
_links: {
|
||||
"authorize": {
|
||||
"href": "/tokens/authorizetoken",
|
||||
"method": "POST"
|
||||
}
|
||||
}
|
||||
notSecuredandnotAuthorized:
|
||||
summary: Token is not secured but HTM is not authorized
|
||||
description: Token is not secured but HTM is not authorized
|
||||
value:
|
||||
isSecured: false
|
||||
isAuthorized: false
|
||||
xTat: 12da8f2a-6390-408a-94eb-a6701b5daf27
|
||||
_links: {
|
||||
"secure": {
|
||||
"href": "/tokens/securetoken",
|
||||
"method": "POST"
|
||||
}
|
||||
}
|
||||
"400":
|
||||
description: Bad Request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Missing Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Missing Mandatory Parameter
|
||||
detail: Required parameter {0} is missing.
|
||||
Invalid Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Invalid Parameter
|
||||
detail: Required parameter {0} is invalid.
|
||||
"404":
|
||||
description: Not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
TAT not found:
|
||||
value:
|
||||
status: 404
|
||||
title: Not Found
|
||||
detail: XTAT Account Not Found
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
example:
|
||||
error: An unknown error has occurred
|
||||
/tokens/securetoken:
|
||||
parameters:
|
||||
- name: X-HTM-JWT-AUTH-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||
required: false
|
||||
description: The JWT of a customer in case of touchpoint were customer logs in themselves
|
||||
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: integer
|
||||
example: 323
|
||||
required: false
|
||||
description: The id of the customer Profile
|
||||
- name: X-HTM-ROLE-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: Customer
|
||||
required: false
|
||||
description: The role of the HTM employee in the case of the SMP
|
||||
post:
|
||||
tags:
|
||||
- TAT Security
|
||||
summary: Request additional OV-pas security for a token either in profile or anonymous.
|
||||
description: Request additional OV-pas security for a token either in profile or anonymous
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SecureTokenRequest"
|
||||
examples:
|
||||
With customer account:
|
||||
value:
|
||||
ovPayTokenId: 42
|
||||
emailAddress: stasjo@htm.nl
|
||||
Without customer account:
|
||||
value:
|
||||
xTat: 62914b49-2c7f-437f-b4b0-2ad61a9f902d
|
||||
emailAddress: stasjo@htm.nl
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/EmailNotPreApprovedResponse"
|
||||
example:
|
||||
recipient: xxxxxx.user@gmail.com
|
||||
description: OTP Sent
|
||||
_links: {
|
||||
"verifyotp": {
|
||||
"href": "/tokens/verifyotp",
|
||||
"method": "POST"
|
||||
}
|
||||
}
|
||||
"400":
|
||||
description: Bad Request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Missing Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Missing Mandatory Parameter
|
||||
detail: Required parameter {0} is missing.
|
||||
Invalid Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Invalid Parameter
|
||||
detail: Required parameter {0} is invalid.
|
||||
"401":
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Unauthorized:
|
||||
value:
|
||||
status: 401
|
||||
title: Unauthorized
|
||||
detail: Invalid Access Token
|
||||
"404":
|
||||
description: Not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
TAT not found:
|
||||
value:
|
||||
status: 404
|
||||
title: Not Found
|
||||
detail: TAT Account Not Found
|
||||
"409":
|
||||
description: Conflict
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
examples:
|
||||
TAT Already Secured:
|
||||
value:
|
||||
status: 409
|
||||
title: Conflict
|
||||
detail: TAT Already Secured
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
example:
|
||||
error: An unknown error has occurred
|
||||
/tokens/authorizetoken:
|
||||
parameters:
|
||||
- name: X-HTM-JWT-AUTH-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||
required: false
|
||||
description: The JWT of a customer in case of touchpoint were customer logs in themselves
|
||||
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: integer
|
||||
example: 323
|
||||
required: false
|
||||
description: The id of the customer Profile
|
||||
- name: X-HTM-ROLE-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: Customer
|
||||
required: false
|
||||
description: The role of the HTM employee in the case of the SMP
|
||||
post:
|
||||
tags:
|
||||
- TAT Authorization
|
||||
summary: Request authorization for HTM to access the data secured by additional OV-pas security for a token either in profile or anonymous.
|
||||
description: Request authorization for HTM to access the data secured by additional OV-pas security for a token either in profile or anonymous.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/AuthorizeTokenRequest"
|
||||
examples:
|
||||
With customer account:
|
||||
value:
|
||||
ovPayTokenId: 42
|
||||
Without customer account:
|
||||
value:
|
||||
xTat: 62914b49-2c7f-437f-b4b0-2ad61a9f902d
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/EmailNotPreApprovedResponse"
|
||||
example:
|
||||
recipient: xxxxxx.user@gmail.com
|
||||
description: OTP Sent
|
||||
_links: {
|
||||
"verifyotp": {
|
||||
"href": "/tokens/verifyotp",
|
||||
"method": "POST"
|
||||
}
|
||||
}
|
||||
"400":
|
||||
description: Bad Request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Missing Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Missing Mandatory Parameter
|
||||
detail: Required parameter {0} is missing.
|
||||
Invalid Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Invalid Parameter
|
||||
detail: Required parameter {0} is invalid.
|
||||
"401":
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Unauthorized:
|
||||
value:
|
||||
status: 401
|
||||
title: Unauthorized
|
||||
detail: Invalid Access Token
|
||||
"404":
|
||||
description: Not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
TAT not found:
|
||||
value:
|
||||
status: 404
|
||||
title: Not Found
|
||||
detail: TAT Account Not Found
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
example:
|
||||
error: An unknown error has occurred
|
||||
/tokens/verifyotp:
|
||||
parameters:
|
||||
- name: X-HTM-JWT-AUTH-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||
required: false
|
||||
description: The JWT of a customer in case of touchpoint were customer logs in themselves
|
||||
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: integer
|
||||
example: 323
|
||||
required: false
|
||||
description: The id of the customer Profile
|
||||
- name: X-HTM-ROLE-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: Customer
|
||||
required: false
|
||||
description: The role of the HTM employee in the case of the SMP
|
||||
post:
|
||||
tags:
|
||||
- TAT Verification
|
||||
summary: Submit an OTP for a triggered OTP flow.
|
||||
description: |
|
||||
Submit an OTP for a triggered OTP flow. This can either be result of an AGO activation, or
|
||||
result of an AGO authorization flow. Since the backoffice behaves slightly different depending
|
||||
on which use case is executed, the calling TP needs to provide an `action` in the request body.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/VerifyOtpRequest"
|
||||
examples:
|
||||
OTP verification for TAT security activation for token in customer account:
|
||||
value:
|
||||
ovPayTokenId: 42
|
||||
otp: 123456
|
||||
action: secure
|
||||
OTP verification for TAT security authorization for anonymous token:
|
||||
value:
|
||||
xTat: 0f0defe8-828c-48e5-97e5-26d1d0179ef0
|
||||
otp: 123456
|
||||
action: authorize
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/VerifyOtpResponse'
|
||||
examples:
|
||||
Tat Secured:
|
||||
value:
|
||||
status: Success
|
||||
description: TAT Secured
|
||||
Tat Unsecured:
|
||||
value:
|
||||
status: Success
|
||||
description: TAT Unsecured
|
||||
Tat Authorized:
|
||||
value:
|
||||
status: Success
|
||||
description: TAT Authorized
|
||||
"400":
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Missing Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Missing Mandatory Parameter
|
||||
detail: Required parameter {0} is missing.
|
||||
Invalid Parameters:
|
||||
value:
|
||||
status: 400
|
||||
title: Invalid Parameter
|
||||
detail: Required parameter {0} is invalid.
|
||||
"401":
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
examples:
|
||||
Unauthorized:
|
||||
value:
|
||||
status: 401
|
||||
title: Unauthorized
|
||||
detail: Invalid Access Token
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
example:
|
||||
error: An unknown error has occurred
|
||||
components:
|
||||
schemas:
|
||||
unavailable:
|
||||
type: object
|
||||
GenerateTatOutput:
|
||||
type: object
|
||||
properties:
|
||||
uid:
|
||||
type: string
|
||||
description: >-
|
||||
An uid IS A unique identifier THAT is associated with the
|
||||
user.
|
||||
recipient:
|
||||
type: string
|
||||
description: >-
|
||||
A recipient IS A unique identifier THAT is associated with the
|
||||
TAT owner.
|
||||
key:
|
||||
type: string
|
||||
description: >-
|
||||
A key IS a 32 character string THAT uniquely identifies the
|
||||
OTP session.
|
||||
EmailNotPreApprovedResponse:
|
||||
type: object
|
||||
description: >-
|
||||
EmailNotPreApprovedResponse IS AN object THAT represents the response of
|
||||
email pre-approval check.
|
||||
properties:
|
||||
recipient:
|
||||
type: string
|
||||
description: >-
|
||||
A recipient IS A unique identifier THAT is associated with the TAT
|
||||
owner.
|
||||
example: xxxxxx.user@gmail.com
|
||||
description:
|
||||
type: string
|
||||
description: >-
|
||||
A description IS A string THAT describes the reason why the email is
|
||||
not pre-approved.
|
||||
example: OTP Sent
|
||||
SecureTokenRequest:
|
||||
type: object
|
||||
properties:
|
||||
ovPayTokenId:
|
||||
type: integer
|
||||
example: 42
|
||||
xTat:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 6134db53-9ae5-41d1-a343-36656b60b510
|
||||
emailAddress:
|
||||
type: string
|
||||
format: email
|
||||
example: stasjo@htm.nl
|
||||
required:
|
||||
- emailAddress
|
||||
AuthorizeTokenRequest:
|
||||
type: object
|
||||
properties:
|
||||
ovPayTokenId:
|
||||
type: integer
|
||||
example: 42
|
||||
xTat:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 6134db53-9ae5-41d1-a343-36656b60b510
|
||||
VerifyOtpRequest:
|
||||
type: object
|
||||
properties:
|
||||
ovPayTokenId:
|
||||
type: integer
|
||||
example: 42
|
||||
xTat:
|
||||
type: string
|
||||
format: uuid
|
||||
example: f3474452-e1d4-428c-b366-e5ad5965eb8c
|
||||
otp:
|
||||
type: string
|
||||
example: 123456
|
||||
action:
|
||||
type: string
|
||||
example: secure
|
||||
required:
|
||||
- otp
|
||||
- action
|
||||
VerifyOtpResponse:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example: Success
|
||||
description:
|
||||
type: string
|
||||
example: TAT Secured
|
||||
ErrorResponse:
|
||||
description: Default response when an invalid request has been sent
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: integer
|
||||
description: >-
|
||||
A status IS An integer that represents the HTTP status code of the
|
||||
response.
|
||||
example: 400
|
||||
title:
|
||||
type: string
|
||||
description: A title IS A string that provides a brief summary of the error.
|
||||
detail:
|
||||
type: string
|
||||
description: A detail IS A string that provides more details about the error.
|
||||
TokenStatusResponse:
|
||||
type: object
|
||||
description: >-
|
||||
TokenStatusResponse IS AN object THAT represents the current state of the token in relation to the AGO security and authorization status of HTM.
|
||||
required:
|
||||
- isSecured
|
||||
- isAuthorized
|
||||
properties:
|
||||
isSecured:
|
||||
type: boolean
|
||||
description: >-
|
||||
Is the token secured in the national database (GBO)
|
||||
example: false
|
||||
isAuthorized:
|
||||
type: boolean
|
||||
description: >-
|
||||
Does HTM have the authorization to access the secured data for this token, only applicable when isSecured equals True.
|
||||
example: false
|
||||
xTat:
|
||||
type: string
|
||||
format: uuid
|
||||
description: >-
|
||||
The xtat of the customerToken given when token is unknown for the customer
|
||||
example: 883674e5-54c7-47d6-a3e3-8781f0d3ffea
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -111,6 +111,14 @@ paths:
|
||||
explode: false
|
||||
required: false
|
||||
description: Filter on most recent order status. 1 = concept, 2 = awaitingPayment, 3 = pendingPayment, 4 = paid, 5 = delivered, 6 = cancelled.
|
||||
- in: query
|
||||
name: issuedVoucherId
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: "b0a9f3c9-9b92-4f8c-b78d-6129be7218a6"
|
||||
required: false
|
||||
description: Filter on applied issuedVoucherId for the order.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@ -769,13 +777,6 @@ paths:
|
||||
example: 9e3363c8-e776-4675-b108-99b8c2e38eb6
|
||||
required: false
|
||||
description: The id of the orderLine
|
||||
- in: query
|
||||
name: issuedVoucherId
|
||||
schema:
|
||||
type: string
|
||||
example: 9e3363c8-e776-4675-b108-99b8c2e38eb6
|
||||
required: false
|
||||
description: The id of the issuedVoucher
|
||||
get:
|
||||
summary: Find vouchers on the order
|
||||
description: Find vouchers on the order
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Service Engine APIs for HTM voucher suppliers
|
||||
description: Service Engine APIs for HTM voucher suppliers, this means all instances responsible for supplying vouchers. These are NOT the CRUD APIs to the data hub. These are ALSO NOT the APIs for sales touchpoints.
|
||||
description: Service Engine APIs for HTM voucher suppliers, this means all instances responsible for supplying vouchers. These are NOT the CRUD APIs to the data hub. These are ALSO NOT the api's for sales touchpoints.
|
||||
version: "1.0"
|
||||
servers:
|
||||
- url: https://services.acc.api.htm.nl/abt/abtvouchers/1.0
|
||||
@ -24,6 +24,15 @@ paths:
|
||||
|
||||
When a requiredProduct is configured, all attributes of the requiredProduct are also prerequisites for redeeming the voucher; thus they do not need to also be configured for the voucher definition. The requiredProduct itself is the single source of truth for this; and voucher definitions do not need to be updated if the requirements of the requiredProduct change. For example, if the requiredProduct requires an OVpay token, an OVpay token is automatically required to redeem issued vouchers.
|
||||
parameters:
|
||||
- name: touchpointId
|
||||
in: query
|
||||
required: false
|
||||
description: |
|
||||
Filter the voucher definitions on a specific touchpointId. This means that only voucher definitions with active selling periods for the specified touchpoint are returned.
|
||||
This query parameter is only intended for administrative purposes, since the touchpoint associated with the access token used in the request is used to determine which voucher definitions are returned. This query parameter can be used to retrieve voucher definitions for other touchpoints within the same retailer, for example to retrieve voucher definitions for a specific sales touchpoint that is different from the calling touchpoint.
|
||||
schema:
|
||||
type: integer
|
||||
example: 12
|
||||
- name: productId
|
||||
in: query
|
||||
required: false
|
||||
@ -57,8 +66,8 @@ paths:
|
||||
summary: No products / Empty list
|
||||
description: No products
|
||||
value: { "voucherDefinitions": [] }
|
||||
List containing one voucher definition (called by touchPointId 12):
|
||||
summary: List containing one voucher definition (called by touchPointId 12)
|
||||
List containing one voucher definition (called by touchpointId 12):
|
||||
summary: List containing one voucher definition (called by touchpointId 12)
|
||||
description: |-
|
||||
List containing one voucher definition for a voucher that can be redeemed for the product "Ooievaarspas voor AOW-ers in Den Haag".\
|
||||
In this case, the voucher definition has a sellingPrice of 0, which means that vouchers issued from this voucher definition can be redeemed to acquire the requiredProduct for free. The requiredProduct also has a sellingPrice of 0, so no "discount" is shown to the customer; just the voucher's amountInclTax.\
|
||||
@ -197,20 +206,18 @@ paths:
|
||||
/issuedvouchers:
|
||||
get:
|
||||
summary: Get a list of issued vouchers that were issued for a specific touch point
|
||||
description: |-
|
||||
Retrieve all issued vouchers that match the given query parameters. \
|
||||
Every request is automatically filtered to return only vouchers issued by the calling touch point (based on the touchPointId that is assigned to the caller's API credentials).
|
||||
|
||||
Further filtering can be done by providing any of the following query parameters:
|
||||
- `issuedVoucherId` (internal and globally unique ID);
|
||||
- `voucherCode` (code that the customer uses for redeeming the voucher, can be reissued as long as only one instance is active at the same time);
|
||||
- `productId` (the `productId` of the voucher definition);
|
||||
- `voucherStatusId` (return only voucher instances with the given status(es));
|
||||
- `statusChangedAfter` (only return voucher instances whose status changed after this date-time);
|
||||
- `includeStatusHistory` (include the status history for each voucher instance).
|
||||
|
||||
When a voucher code has been issued multiple times, all issuedvouchers with the same voucher code will be returned, together with their status (or optionally also the status history).
|
||||
description:
|
||||
Retrieve all issued vouchers for a specific touchpoint. This means that only vouchers that were issued by a touchpoint within the same retailer as the calling touchpoint are returned.
|
||||
parameters:
|
||||
- name: touchpointId
|
||||
in: query
|
||||
required: false
|
||||
description: |-
|
||||
Filter the issued vouchers on a specific touchpointId. This means that only vouchers that were issued by the specified touchpoint are returned.
|
||||
This query parameter is only intended for administrative purposes, since the touchpoint associated with the access token used in the request is used to determine which issued vouchers are returned. This query parameter can be used to retrieve issued vouchers for other touchpoints within the same retailer, for example to retrieve issued vouchers for a specific sales touchpoint that is different from the calling touchpoint.
|
||||
schema:
|
||||
type: integer
|
||||
example: 12
|
||||
- name: issuedVoucherId
|
||||
in: query
|
||||
required: false
|
||||
@ -233,21 +240,6 @@ paths:
|
||||
schema:
|
||||
type: integer
|
||||
example: 321
|
||||
- name: touchpointId
|
||||
in: query
|
||||
required: false
|
||||
description: Return only issued vouchers that were issued by a specific touchpoint.
|
||||
schema:
|
||||
type: integer
|
||||
example: 3
|
||||
- name: statusChangedAfter
|
||||
in: query
|
||||
required: false
|
||||
description: Return only issued vouchers that have had their status changed after the given date and time.
|
||||
schema:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2024-10-04T00:00:00.000Z"
|
||||
- name: voucherStatusId
|
||||
in: query
|
||||
required: false
|
||||
@ -266,14 +258,6 @@ paths:
|
||||
items:
|
||||
type: integer
|
||||
example: [4,5]
|
||||
- name: includeStatusHistory
|
||||
in: query
|
||||
required: false
|
||||
description: Include the status history for each voucher instance. Is false by default (if not provided).
|
||||
schema:
|
||||
type: boolean
|
||||
example: false
|
||||
|
||||
tags:
|
||||
- Vouchers
|
||||
responses:
|
||||
@ -297,9 +281,9 @@ paths:
|
||||
{
|
||||
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||
"voucherCode": "HTM-A7J-128-PYT",
|
||||
"fromInclusive": "2024-10-04T00:00:00.000Z",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000Z",
|
||||
"voucherStatus": { "voucherStatusId": 2, "name": "issued", "createdOn": "2024-10-04T00:00:00.000Z", "reason": "Test reason" },
|
||||
"fromInclusive": "2024-10-04T00:00:00.000",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000",
|
||||
"voucherStatus": { "voucherStatusId": 2, "name": "issued" },
|
||||
"product":
|
||||
{
|
||||
"productId": 263,
|
||||
@ -339,95 +323,10 @@ paths:
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"customerDataItem": "padBirthDate",
|
||||
},
|
||||
"value": "1980-06-30",
|
||||
}
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
"value": "1980-06-31",
|
||||
}
|
||||
]
|
||||
}
|
||||
List containing one issued voucher, with status history:
|
||||
summary: List containing one issued voucher, with status history
|
||||
description: |-
|
||||
The same issued voucher is returned as was shown in the first example, but in this case
|
||||
requested with query parameter `includeStatusHistory=true`.
|
||||
value:
|
||||
{
|
||||
"issuedVouchers":
|
||||
[
|
||||
{
|
||||
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||
"voucherCode": "HTM-A7J-128-PYT",
|
||||
"fromInclusive": "2024-10-04T00:00:00.000Z",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000Z",
|
||||
"voucherStatus": { "voucherStatusId": 2, "name": "issued", "createdOn": "2024-10-04T00:00:00.000Z", "reason": "Test reason" },
|
||||
"product":
|
||||
{
|
||||
"productId": 263,
|
||||
"productName": "Voucher Ooievaarspas-product AOW",
|
||||
"productDescription": "Voucher voor AOW-ers in Den Haag met een Ooievaarspas, die ingewisseld kan worden voor het product \"Ooievaarspas voor AOW-ers in Den Haag\"",
|
||||
"amountInclTax": 0,
|
||||
"requiredProducts":
|
||||
[
|
||||
{
|
||||
"productId": 982,
|
||||
"productName": "Ooievaarspas voor AOW-ers in Den Haag",
|
||||
"productDescription": "Vrij reizen bij HTM voor Haagse AOW-gerechtigden met een Ooievaarspas.",
|
||||
"productCategory":
|
||||
{
|
||||
"productCategoryId": 2,
|
||||
"isTravelProduct": true,
|
||||
"name": "Afgekocht reisrecht",
|
||||
},
|
||||
"amountInclTax": 0
|
||||
|
||||
},
|
||||
],
|
||||
"_links":
|
||||
{
|
||||
"get_voucher_definition_details":
|
||||
{
|
||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/voucherdefinitions/263",
|
||||
"method": "GET",
|
||||
},
|
||||
},
|
||||
},
|
||||
"voucherClaims":
|
||||
[
|
||||
{
|
||||
"mandatoryCustomerDataItem":
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"customerDataItem": "padBirthDate",
|
||||
},
|
||||
"value": "1980-06-30",
|
||||
}
|
||||
],
|
||||
"voucherStatusInstances":
|
||||
[
|
||||
{
|
||||
"voucherStatusId": 1,
|
||||
"name": "new",
|
||||
"createdOn": "2024-10-04T12:34:56.000Z",
|
||||
"reason": null
|
||||
},
|
||||
{
|
||||
"voucherStatusId": 2,
|
||||
"name": "issued",
|
||||
"createdOn": "2024-10-04T12:37:14.000Z",
|
||||
"reason": "Test reason"
|
||||
},
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
]
|
||||
}
|
||||
List containing one issued voucher that grants a product for a reduced price:
|
||||
@ -444,9 +343,9 @@ paths:
|
||||
{
|
||||
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||
"voucherCode": "HTM-A7J-128-PYT",
|
||||
"fromInclusive": "2024-10-04T00:00:00.000Z",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000Z",
|
||||
"voucherStatus": { "voucherStatusId": 2, "name": "issued", "createdOn": "2024-10-04T00:00:00.000Z", "reason": "Test reason" },
|
||||
"fromInclusive": "2024-10-04T00:00:00.000",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000",
|
||||
"voucherStatus": { "voucherStatusId": 2, "name": "issued" },
|
||||
"product":
|
||||
{
|
||||
"productId": 264,
|
||||
@ -477,12 +376,7 @@ paths:
|
||||
}
|
||||
}
|
||||
},
|
||||
"voucherClaims": [],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
"voucherClaims":[]
|
||||
},
|
||||
]
|
||||
}
|
||||
@ -499,9 +393,9 @@ paths:
|
||||
{
|
||||
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||
"voucherCode": "HTM-A7J-128-PYT",
|
||||
"fromInclusive": "2024-10-04T00:00:00.000Z",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000Z",
|
||||
"voucherStatus": { "voucherStatusId": 2, "name": "issued", "createdOn": "2024-10-04T00:00:00.000Z", "reason": "Test reason" },
|
||||
"fromInclusive": "2024-10-04T00:00:00.000",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000",
|
||||
"voucherStatus": { "voucherStatusId": 2, "name": "issued" },
|
||||
"product":
|
||||
{
|
||||
"productId": 265,
|
||||
@ -518,31 +412,10 @@ paths:
|
||||
}
|
||||
}
|
||||
},
|
||||
"voucherClaims": [],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
"voucherClaims":[]
|
||||
}
|
||||
]
|
||||
}
|
||||
"400":
|
||||
description: Bad request
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/rfc9457"
|
||||
examples:
|
||||
Missing required query parameters:
|
||||
summary: Missing required query parameters
|
||||
value:
|
||||
{
|
||||
"type": "https://example.com/probs/bad-request",
|
||||
"title": "Missing required query parameters",
|
||||
"detail": "At least one of the following query parameters should be provided: issuedVoucherId, voucherCode, or productId.",
|
||||
"instance": "/issuedvouchers"
|
||||
}
|
||||
"403":
|
||||
description: Forbidden
|
||||
content:
|
||||
@ -593,20 +466,10 @@ paths:
|
||||
}
|
||||
post:
|
||||
summary: Issue a voucher for a specific voucher definition
|
||||
description: |-
|
||||
Issue a voucher for a specific voucher definition. Vouchers can only be issued on a one-by-one basis, so that it is always clear what voucher code has been issued for specific voucher claims (which by itself may not uniquely identify the voucher; however the voucher code is guaranteed to be unique).\
|
||||
The voucher can only be issued if the calling touchpoint (recognized by the access token) has an active selling period for the voucher definition (recognized by the productId).
|
||||
|
||||
When providing a voucher code, the supplier is allowed to re-use a voucher code that has already been issued, but only if the previously issued voucher is not active anymore.\
|
||||
This means that a voucher code can only be re-used once the previous instance has a `voucherStatus` of "revoked" or "expired".\
|
||||
Redeemed is NOT a valid end-state, as this voucher might still refer to an active travel product (which can be revoked by revoking the voucher).
|
||||
|
||||
The `fromInclusive` and `untilInclusive` fields specify the date-time range in which the voucher can be redeemed by the customer.\
|
||||
This has nothing to do with the allowed start date of a requiredProduct (for this, the existing order flow logic is applied).
|
||||
|
||||
description: |
|
||||
Issue a voucher for a specific voucher definition. Vouchers can only be issued on a one-by-one basis, so that it is always clear what voucher code has been issued for specific voucher claims (which by itself my not uniquely identify the voucher; however the voucher code is guaranteed to be unique). The voucher can only be issued if the calling touchpoint (recognized by the access token) has an active selling period for the voucher definition (recognized by the productId).\
|
||||
The \"fromInclusive\" and \"untilInclusive\" fields specify the date-time range in which the voucher can be redeemed by the customer. This has nothing to do with the allowed start date of a requiredProduct (for this, the existing order flow logic is applied).\
|
||||
If the voucher definition contains mandatoryCustomerDataItems, a value (to be checked against customer input when redeeming the voucher) has to be provided for each of these items.
|
||||
|
||||
A newly issued voucher will always receive the status "new". Vouchers can only be redeemed after they have been explicitly set to the status "issued" (via `PATCH /issuedvouchers/{issuedVoucherId}`), for example when the customer receives the actual voucher code.
|
||||
tags:
|
||||
- Vouchers
|
||||
requestBody:
|
||||
@ -618,9 +481,7 @@ paths:
|
||||
examples:
|
||||
Issue a voucher and supply own voucher code:
|
||||
summary: Issue a voucher and supply own voucher code
|
||||
description: |-
|
||||
This allows the voucher supplier to supply its own voucher code, which can be useful if the supplier already has its own (internal or external) source for voucher codes.\
|
||||
The supplied voucher code must be unique (or a previous instance must be revoked/expired, see main endpoint description).
|
||||
description: This allows the voucher supplier to supply its own voucher code, which can be useful if the supplier already has its own (internal or external) source for voucher codes. The supplied voucher code must be unique - if this code is already in use, the request will fail.
|
||||
value:
|
||||
{
|
||||
"voucherCode": "HTM-A7J-128-PYT",
|
||||
@ -631,37 +492,18 @@ paths:
|
||||
[
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"value": "1980-06-30",
|
||||
"value": "1980-06-31",
|
||||
}
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
Issue a voucher and receive a voucher code (generated by ABT backend) in response:
|
||||
summary: Issue a voucher and receive a voucher code (generated by ABT backend) in response
|
||||
description: |-
|
||||
If the supplier is not able to generate its own unique voucher codes, it can issue a voucher without supplying any voucher code.\
|
||||
The ABT backend will then generate a unique voucher code and return it in response.
|
||||
description: If the supplier is not able to generate its own unique voucher codes, it can issue a voucher without supplying any voucher code - the ABT backend will then receive a unique voucher code and return it in response.
|
||||
value:
|
||||
{
|
||||
"fromInclusive": "2026-01-01T00:00:00.000+00:00",
|
||||
"untilInclusive": "2030-12-31T23:59:59.000+00:00",
|
||||
"productId": 264,
|
||||
"voucherClaims":
|
||||
[
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"value": "1980-06-30",
|
||||
}
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
"productId": 264
|
||||
}
|
||||
responses:
|
||||
"201":
|
||||
@ -677,9 +519,9 @@ paths:
|
||||
{
|
||||
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||
"voucherCode": "HTM-A7J-128-PYT",
|
||||
"fromInclusive": "2024-10-04T00:00:00.000Z",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000Z",
|
||||
"voucherStatus": { "voucherStatusId": 1, "name": "new", "createdOn": "2024-10-04T00:00:00.000Z", "reason": null },
|
||||
"fromInclusive": "2024-10-04T00:00:00.000",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000",
|
||||
"voucherStatus": { "voucherStatusId": 2, "name": "issued" },
|
||||
"product":
|
||||
{
|
||||
"productId": 263,
|
||||
@ -719,14 +561,9 @@ paths:
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"customerDataItem": "padBirthDate",
|
||||
},
|
||||
"value": "1980-06-30",
|
||||
"value": "1980-06-31",
|
||||
}
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
"400":
|
||||
description: Bad request
|
||||
@ -736,12 +573,12 @@ paths:
|
||||
$ref: "#/components/schemas/rfc9457"
|
||||
examples:
|
||||
Voucher code already in use:
|
||||
summary: Another active voucher instance already exists for this voucher code
|
||||
summary: Voucher code already in use
|
||||
value:
|
||||
{
|
||||
"type": "https://example.com/probs/bad-request",
|
||||
"title": "Invalid voucher code",
|
||||
"detail": "Another active voucher instance already exists for this voucher code.",
|
||||
"detail": "This voucher code is already in use.",
|
||||
"instance": "/issuedvouchers"
|
||||
}
|
||||
Missing mandatory voucher claims:
|
||||
@ -777,9 +614,6 @@ paths:
|
||||
summary: Update the status of an issued voucher
|
||||
description: |-
|
||||
Update the status of an issued voucher. Not every state change is allowed; an error will be returned if an invalid state change is attempted.\
|
||||
If a redeemed voucher is revoked using this endpoint, it may also impact any active travel products that have been acquired using this voucher.\
|
||||
This depends on specific business rules that are agreed upon with HTM.
|
||||
|
||||
Possible voucher statuses are:
|
||||
- 1 = new
|
||||
- 2 = issued
|
||||
@ -796,20 +630,11 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/supplierTouchpointUpdateIssuedVoucherRequest"
|
||||
examples:
|
||||
Mark a voucher as issued:
|
||||
summary: Mark a voucher as issued
|
||||
description: Mark a voucher as issued. Only vouchers with a status of "issued" can actually be redeemed.
|
||||
value:
|
||||
{
|
||||
"voucherStatusId": 2
|
||||
}
|
||||
Mark a voucher as revoked (with reason):
|
||||
Mark a voucher as revoked:
|
||||
summary: Mark a voucher as revoked
|
||||
description: Mark a voucher as revoked. This may also impact any active travel products that have been acquired using this voucher. This depends on specific business rules that are agreed upon with HTM.
|
||||
value:
|
||||
{
|
||||
"voucherStatusId": 4,
|
||||
"reason": "Voucher was redeemed by an unauthorized person"
|
||||
"voucherStatusId": 4
|
||||
}
|
||||
responses:
|
||||
"200":
|
||||
@ -825,9 +650,9 @@ paths:
|
||||
{
|
||||
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||
"voucherCode": "HTM-A7J-128-PYT",
|
||||
"fromInclusive": "2024-10-04T00:00:00.000Z",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000Z",
|
||||
"voucherStatus": { "voucherStatusId": 4, "name": "revoked", "createdOn": "2024-10-04T12:34:56.000Z", "reason": "Voucher was redeemed by an unauthorized person" },
|
||||
"fromInclusive": "2024-10-04T00:00:00.000",
|
||||
"untilInclusive": "2024-11-04T00:00:00.000",
|
||||
"voucherStatus": { "voucherStatusId": 4, "name": "revoked" },
|
||||
"product":
|
||||
{
|
||||
"productId": 263,
|
||||
@ -866,14 +691,9 @@ paths:
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"customerDataItem": "padBirthDate",
|
||||
},
|
||||
"value": "1980-06-30",
|
||||
"value": "1980-06-31",
|
||||
}
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
]
|
||||
}
|
||||
"400":
|
||||
description: Bad request
|
||||
@ -914,6 +734,7 @@ components:
|
||||
- validityPeriod
|
||||
- productCategory
|
||||
- sellingPeriods
|
||||
|
||||
properties:
|
||||
productId:
|
||||
type: integer
|
||||
@ -937,11 +758,11 @@ components:
|
||||
fromInclusive:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2024-09-03T10:01:34.000+00:00Z"
|
||||
example: "2024-09-03T10:01:34.000+00:00"
|
||||
toInclusive:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2024-09-03T23:59:59.999+00:00Z"
|
||||
example: "2024-09-03T23:59:59.999+00:00"
|
||||
productCategory:
|
||||
type: object
|
||||
required:
|
||||
@ -1011,11 +832,11 @@ components:
|
||||
fromInclusive:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2022-03-01T00:00:00.000+00:00Z"
|
||||
example: "2022-03-01T00:00:00.000+00:00"
|
||||
toInclusive:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2022-06-01T00:00:00.000+00:00Z"
|
||||
example: "2022-06-01T00:00:00.000+00:00"
|
||||
salesTouchpoint:
|
||||
type: object
|
||||
required:
|
||||
@ -1102,11 +923,11 @@ components:
|
||||
fromInclusive:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2022-03-01T00:00:00.000+00:00Z"
|
||||
example: "2022-03-01T00:00:00.000+00:00"
|
||||
toInclusive:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2022-06-01T00:00:00.000+00:00Z"
|
||||
example: "2022-06-01T00:00:00.000+00:00"
|
||||
internalPrice:
|
||||
type: number
|
||||
example: 908.1234
|
||||
@ -1155,26 +976,6 @@ components:
|
||||
type: string
|
||||
description: The value that the customer must provide for this mandatoryCustomerDataItem to be able to redeem the voucher.
|
||||
example: "1970-01-01"
|
||||
metadata1:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata2:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata3:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata4:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata5:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
supplierTouchpointUpdateIssuedVoucherRequest:
|
||||
type: object
|
||||
required:
|
||||
@ -1184,10 +985,6 @@ components:
|
||||
type: integer
|
||||
description: The new status of the voucher.
|
||||
example: 4
|
||||
reason:
|
||||
type: string
|
||||
description: The reason for the change of the voucher status.
|
||||
example: "Voucher was redeemed by an unauthorized person"
|
||||
supplierTouchpointIssuedVouchersListResponse:
|
||||
type: object
|
||||
properties:
|
||||
@ -1229,10 +1026,11 @@ components:
|
||||
the maximum allowed start date of a requiredProduct (for this, the existing order flow logic is applied).
|
||||
example: "2024-11-04T00:00:00.000+01:00"
|
||||
voucherStatus:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/voucherStatusInstance"
|
||||
- type: object
|
||||
- description: |-
|
||||
type: object
|
||||
required:
|
||||
- voucherStatusId
|
||||
- name
|
||||
description: |-
|
||||
The current status of the voucher. Can be any of the following:
|
||||
- 1 = new
|
||||
- 2 = issued
|
||||
@ -1240,6 +1038,13 @@ components:
|
||||
- 4 = revoked
|
||||
- 5 = expired
|
||||
- 6 = pendingRedemption
|
||||
properties:
|
||||
voucherStatusId:
|
||||
type: integer
|
||||
example: 2
|
||||
name:
|
||||
type: string
|
||||
example: "issued"
|
||||
product:
|
||||
type: object
|
||||
description: The "product" referencing the voucher definition that this voucher instance is based on
|
||||
@ -1355,51 +1160,7 @@ components:
|
||||
value:
|
||||
type: string
|
||||
example: 1970-01-01
|
||||
voucherStatusInstances:
|
||||
type: array
|
||||
description: List of voucherStatusInstances, providing information about the status history of the voucher
|
||||
items:
|
||||
$ref: "#/components/schemas/voucherStatusInstance"
|
||||
metadata1:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata2:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata3:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata4:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata5:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
voucherStatusInstance:
|
||||
type: object
|
||||
required:
|
||||
- voucherStatusId
|
||||
- name
|
||||
- createdOn
|
||||
properties:
|
||||
voucherStatusId:
|
||||
type: integer
|
||||
example: 4
|
||||
name:
|
||||
type: string
|
||||
example: "revoked"
|
||||
createdOn:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2021-05-23T12:00:00.000+02:00"
|
||||
reason:
|
||||
type: string
|
||||
example: "Voucher revoked because it was redeemed by an unauthorized user."
|
||||
|
||||
unavailable:
|
||||
type: object
|
||||
rfc9457:
|
||||
|
||||
@ -209,12 +209,6 @@ paths:
|
||||
{
|
||||
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
|
||||
"voucherCode": "VOUCHER12345",
|
||||
"touchPointId": 23,
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null,
|
||||
"voucherStatusInstances":
|
||||
[
|
||||
{
|
||||
@ -225,7 +219,6 @@ paths:
|
||||
"name": "New",
|
||||
},
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"reason": null,
|
||||
},
|
||||
{
|
||||
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
|
||||
@ -235,7 +228,6 @@ paths:
|
||||
"name": "Issued",
|
||||
},
|
||||
"createdOn": "2024-10-04T12:37:14.000",
|
||||
"reason": "test reason"
|
||||
},
|
||||
],
|
||||
"voucherClaims":
|
||||
@ -256,155 +248,6 @@ paths:
|
||||
],
|
||||
"href": null,
|
||||
}
|
||||
post:
|
||||
tags:
|
||||
- Purchased Product
|
||||
summary: Create a new purchased product.
|
||||
description: Create a new purchased product. Only one single instance of `purchasedGboProducts`, `purchasedTapconnectTickets` or `issuedVouchers` can be specified at once.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
examples:
|
||||
Create Purchased GBO Product:
|
||||
value:
|
||||
{
|
||||
"productId": 11,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"purchasedProductResources":
|
||||
[
|
||||
{
|
||||
"resourceNameId": 1,
|
||||
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
|
||||
},
|
||||
{
|
||||
"resourceNameId": 2,
|
||||
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
|
||||
},
|
||||
],
|
||||
"purchasedGboProducts":
|
||||
[
|
||||
{
|
||||
"salesTimestamp": "2024-10-04T12:34:56.000",
|
||||
"refundTimestamp": "2024-10-04T12:34:56.000",
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
"untilInclusive": "2024-10-04T12:34:56.000",
|
||||
"packageTemplateId": "30003",
|
||||
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
|
||||
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
|
||||
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
|
||||
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
|
||||
"ovPayTokenId": 13,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"createdBy": "someuser",
|
||||
"lastUpdatedBy": null
|
||||
},
|
||||
],
|
||||
"purchasedTapconnectTickets": [],
|
||||
"issuedVouchers": [],
|
||||
}
|
||||
Create Purchased TapConnect Ticket:
|
||||
value:
|
||||
{
|
||||
"productId": 11,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"purchasedProductResources":
|
||||
[
|
||||
{
|
||||
"resourceNameId": 1,
|
||||
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
|
||||
},
|
||||
{
|
||||
"resourceNameId": 2,
|
||||
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
|
||||
},
|
||||
],
|
||||
"purchasedGboProducts": [],
|
||||
"purchasedTapconnectTickets":
|
||||
[
|
||||
{
|
||||
"issuedAt": "2024-10-04T12:34:56.000",
|
||||
"activatedAt": "2024-10-04T12:34:56.000",
|
||||
"cancelledAt": "2024-10-04T12:34:56.000",
|
||||
"ticketReference": "KJj43nejhbTxhr897287",
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"createdBy": "John Doe",
|
||||
"lastUpdatedBy": "John Doe",
|
||||
"externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848",
|
||||
"serviceId": "HTM-1234-7654-8945",
|
||||
"activateBefore": "2024-10-08",
|
||||
"validityStart": "2024-10-05T12:34:56.000",
|
||||
"validityEnd": "2024-10-06T12:34:56.000"
|
||||
},
|
||||
],
|
||||
"issuedVouchers": [],
|
||||
}
|
||||
Create Issued Voucher:
|
||||
value:
|
||||
{
|
||||
"productId": 11,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"purchasedProductResources":
|
||||
[
|
||||
{
|
||||
"resourceNameId": 1,
|
||||
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
|
||||
},
|
||||
{
|
||||
"resourceNameId": 2,
|
||||
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
|
||||
},
|
||||
],
|
||||
"purchasedGboProducts": [],
|
||||
"purchasedTapconnectTickets": [],
|
||||
"issuedVouchers":
|
||||
[
|
||||
{
|
||||
"voucherCode": "VOUCHER123",
|
||||
"touchPointId": 23,
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null,
|
||||
"voucherStatusInstances": [
|
||||
{
|
||||
"voucherStatusId": 1,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"reason": "test reason"
|
||||
}
|
||||
],
|
||||
"voucherClaims": [
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"value": "1999-12-31"
|
||||
},
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 4,
|
||||
"value": "john.doe@example.com"
|
||||
}
|
||||
],
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
"untilInclusive": "2025-10-04T12:34:56.000"
|
||||
},
|
||||
],
|
||||
}
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
{ "purchasedProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd" }
|
||||
/purchasedproducts/{purchasedProductId}:
|
||||
parameters:
|
||||
- in: path
|
||||
@ -539,12 +382,6 @@ paths:
|
||||
{
|
||||
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
|
||||
"voucherCode": "VOUCHER12345",
|
||||
"touchPointId": 23,
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null,
|
||||
"voucherStatusInstances":
|
||||
[
|
||||
{
|
||||
@ -552,14 +389,12 @@ paths:
|
||||
"voucherStatus":
|
||||
{ "voucherStatusId": 1, "name": "New" },
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"reason": null,
|
||||
},
|
||||
{
|
||||
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
|
||||
"voucherStatus":
|
||||
{ "voucherStatusId": 2, "name": "Issued" },
|
||||
"createdOn": "2024-10-04T12:37:14.000",
|
||||
"reason": "test reason"
|
||||
},
|
||||
],
|
||||
"voucherClaims":
|
||||
@ -1219,18 +1054,11 @@ paths:
|
||||
example:
|
||||
{
|
||||
"voucherCode": "VOUCHER123",
|
||||
"touchPointId": 23,
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null,
|
||||
"voucherStatusInstances":
|
||||
[
|
||||
{
|
||||
"voucherStatusId": 1,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"reason": "test reason"
|
||||
},
|
||||
],
|
||||
"voucherClaims":
|
||||
@ -1238,7 +1066,7 @@ paths:
|
||||
{ "mandatoryCustomerDataItemId": 8, "value": "1999-12-31" },
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 4,
|
||||
"value": "john.doe@example.com",
|
||||
"value": "vlad.harkonnen@househarkonnen.net",
|
||||
},
|
||||
],
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
@ -1274,14 +1102,6 @@ paths:
|
||||
format: uuid
|
||||
example: 058a1af7-897f-45d5-b691-9cc9161e387f
|
||||
description: The id of the purchased product.
|
||||
- in: query
|
||||
name: statusChangedAfter
|
||||
required: false
|
||||
description: Return only issued vouchers that have had their status changed after the given date and time.
|
||||
schema:
|
||||
type: string
|
||||
format: date-time-offset
|
||||
example: "2024-10-04T00:00:00.000Z"
|
||||
- in: query
|
||||
name: productId
|
||||
schema:
|
||||
@ -1326,13 +1146,6 @@ paths:
|
||||
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||
"purchasedProductId": "058a1af7-897f-45d5-b691-9cc9161e387f",
|
||||
"voucherCode": "VOUCHER123",
|
||||
"productId": 888,
|
||||
"touchPointId": 23,
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null,
|
||||
"voucherStatusInstances":
|
||||
[
|
||||
{
|
||||
@ -1340,14 +1153,12 @@ paths:
|
||||
"voucherStatus":
|
||||
{ "voucherStatusId": 1, "name": "New" },
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"reason": null,
|
||||
},
|
||||
{
|
||||
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
|
||||
"voucherStatus":
|
||||
{ "voucherStatusId": 2, "name": "Issued" },
|
||||
"createdOn": "2024-10-04T12:37:14.000",
|
||||
"reason": "test reason",
|
||||
},
|
||||
],
|
||||
"voucherClaims":
|
||||
@ -1366,7 +1177,7 @@ paths:
|
||||
"mandatoryCustomerDataItemId": 4,
|
||||
"customerDataItem": "emailAddress",
|
||||
},
|
||||
"value": "john.doe@example.com",
|
||||
"value": "vlad.harkonnen@househarkonnen.net",
|
||||
},
|
||||
],
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
@ -1394,16 +1205,9 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PostIssuedVoucherStatusInstanceRequest"
|
||||
examples:
|
||||
newToIssued:
|
||||
summary: Mark a voucher as issued
|
||||
value:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
{ "voucherStatusId": 2, "createdOn": "2024-10-04T12:34:56.000" }
|
||||
issuedToRevokedWithReason:
|
||||
summary: Mark a voucher as revoked with reason
|
||||
value:
|
||||
{ "voucherStatusId": 4, "createdOn": "2024-10-04T12:34:56.000", "reason": "Voucher revoked because it was redeemed by an unauthorized user." }
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@ -1437,7 +1241,6 @@ paths:
|
||||
{ "voucherStatusId": 3, "name": "Redeemed" },
|
||||
{ "voucherStatusId": 4, "name": "Revoked" },
|
||||
{ "voucherStatusId": 5, "name": "Expired" },
|
||||
{ "voucherStatusId": 6, "name": "PendingRedemption" },
|
||||
],
|
||||
}
|
||||
components:
|
||||
@ -1449,22 +1252,6 @@ components:
|
||||
schemas:
|
||||
unavailable:
|
||||
type: object
|
||||
PostIssuedVoucherStatusInstanceRequest:
|
||||
type: object
|
||||
required:
|
||||
- voucherStatusId
|
||||
- createdOn
|
||||
properties:
|
||||
voucherStatusId:
|
||||
type: integer
|
||||
example: 4
|
||||
createdOn:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-10-04T12:34:56.000
|
||||
reason:
|
||||
type: string
|
||||
example: "Voucher revoked because it was redeemed by an unauthorized user."
|
||||
PostPurchasedTapConnectTicketRequest:
|
||||
type: object
|
||||
required:
|
||||
@ -1526,6 +1313,56 @@ components:
|
||||
format: date-time
|
||||
description: The date-time at which the ticket will become invalid for traveling. The ticket will not be valid after this date/time.
|
||||
example: 2024-10-06T12:34:56.000
|
||||
BulkResponseBody:
|
||||
type: object
|
||||
properties:
|
||||
startTime:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2025-02-14T05:32:47.0672237Z
|
||||
status:
|
||||
type: string
|
||||
example: Running
|
||||
clientTrackingId:
|
||||
type: string
|
||||
example: 08584620957189579629541919368CU00
|
||||
callbackurl:
|
||||
type: string
|
||||
format: uri
|
||||
example: https://services.api.htm.nl/purchasedproducts/responsestatus/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/6fd466916c
|
||||
retryAfter:
|
||||
type: integer
|
||||
example: 10
|
||||
summary:
|
||||
$ref: "#/components/schemas/summaryBody"
|
||||
required:
|
||||
- startTime
|
||||
- status
|
||||
- clientTrackingId
|
||||
- callbackurl
|
||||
- retryAfter
|
||||
- summary
|
||||
summaryBody:
|
||||
type: object
|
||||
properties:
|
||||
summary:
|
||||
type: object
|
||||
properties:
|
||||
created:
|
||||
type: integer
|
||||
example: 15
|
||||
updated:
|
||||
type: integer
|
||||
example: 2
|
||||
total:
|
||||
type: integer
|
||||
example: 17
|
||||
required:
|
||||
- created
|
||||
- total
|
||||
- updated
|
||||
required:
|
||||
- summary
|
||||
rfc9457:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
151
trip2.json
151
trip2.json
@ -1,151 +0,0 @@
|
||||
{ "tripId": 796727186, "tripVersion": 1, "tripStatus": "COMPLETE", "organisationIcon": "/icons/organisations/3.svg", "organisationId": "3", "organisationName": "HTM", "supersededByTripIds": [], "supersedesTripIds": [], "products": [ {
|
||||
"productTemplateId": "30901", "productCommercialName": { "items": [ {
|
||||
"key": "nl-NL", "value": "HTM 90% Korting" },
|
||||
{
|
||||
"key": "en-US", "value": "HTM 90% Discount" }
|
||||
]
|
||||
},
|
||||
"productIcon": "001.jpg", "purchaseDateTime": "2026-04-02T12:38:28+02:00", "organisationName": "ProductRetailer HTM", "appliedValue": -125, "organisationId": "3", "category": "SALES", "typesOfFareProduct": [ {
|
||||
"privateCode": "discount" }
|
||||
],
|
||||
"xspit": "821ddb0d-4ea7-4a0d-84aa-bb7facce15d1" },
|
||||
{
|
||||
"productTemplateId": "N/A", "purchaseDateTime": "2025-07-09T12:39:27+02:00", "appliedValue": 139, "category": "SALES", "typesOfFareProduct": [ {
|
||||
"privateCode": "payg" }
|
||||
],
|
||||
"xspit": "7618337f-c986-4bef-990d-f5a6b47292b8" },
|
||||
{
|
||||
"productTemplateId": "1:2000", "productCommercialName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Basis Bus Tram Metro" },
|
||||
{
|
||||
"key": "en-US", "value": "BTM full fare" }
|
||||
]
|
||||
},
|
||||
"validFrom": "2000-01-01T01:00:00+01:00", "validUntil": "2100-01-01T00:59:59+01:00", "weight": 116, "appliedMetric": "FARE", "appliedValue": 116, "category": "INTERNAL", "typesOfFareProduct": [ {
|
||||
"privateCode": "payg" }
|
||||
],
|
||||
"xspit": "7618337f-c986-4bef-990d-f5a6b47292b8", "xpit": "f4256df6-b767-460f-9880-f7597bd7f3f2" },
|
||||
{
|
||||
"productTemplateId": "2:2000", "productCommercialName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Basis Bus Tram Metro" },
|
||||
{
|
||||
"key": "en-US", "value": "BTM full fare" }
|
||||
]
|
||||
},
|
||||
"validFrom": "2000-01-01T01:00:00+01:00", "validUntil": "2100-01-01T00:59:59+01:00", "weight": 23, "appliedMetric": "FARE", "appliedValue": 23, "category": "INTERNAL", "typesOfFareProduct": [ {
|
||||
"privateCode": "payg" }
|
||||
],
|
||||
"xspit": "7618337f-c986-4bef-990d-f5a6b47292b8", "xpit": "f4256df6-b767-460f-9880-f7597bd7f3f2" },
|
||||
{
|
||||
"productTemplateId": "3:30901", "productCommercialName": { "items": [ {
|
||||
"key": "nl-NL", "value": "HTM 90% Korting" },
|
||||
{
|
||||
"key": "en-US", "value": "HTM 90% Discount" },
|
||||
{
|
||||
"key": "nl-NL", "value": "Reis je regelmatig met HTM? Activeer dan HTM 90% Korting op je betaalpas of credit card en reis een week lang met korting!" },
|
||||
{
|
||||
"key": "en-US", "value": "Are you a regular traveler? Activate HTM 90% discount on your EMV card!" }
|
||||
]
|
||||
},
|
||||
"validFrom": "2026-04-03T04:00:00+02:00", "validUntil": "2031-04-03T04:00:00+02:00", "organisationName": "Product Owner HTM", "weight": -125, "appliedMetric": "DISCOUNT", "appliedValue": -125, "organisationId": "3", "category": "INTERNAL", "typesOfFareProduct": [ {
|
||||
"privateCode": "discount" }
|
||||
],
|
||||
"productCatalogVersionId": "PC-HTM:70", "xspit": "821ddb0d-4ea7-4a0d-84aa-bb7facce15d1", "xpit": "1848597c-5ba9-4dab-8d9f-3948948706a1" }
|
||||
],
|
||||
"checkinTransactionTimestamp": "2026-04-20T16:59:48+02:00", "checkoutTransactionTimestamp": "2026-04-20T17:04:50+02:00", "checkinTransactionReference": "00310F92;29023;emvClt", "checkoutTransactionReference": "0030DBC1;30528;emvClt", "checkinLocation": { "stopId": 2721, "stopName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Station Hollands Spoor" },
|
||||
{
|
||||
"key": "en-US", "value": "Station Hollands Spoor" }
|
||||
]
|
||||
},
|
||||
"stopDesc": "Stop point2721", "stopUrl": "/icons/stops/stop.svg", "locationType": 0 },
|
||||
"checkoutLocation": { "stopId": 2862, "stopName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Kalvermarkt-Stadhuis" },
|
||||
{
|
||||
"key": "en-US", "value": "Kalvermarkt-Stadhuis" }
|
||||
]
|
||||
},
|
||||
"stopDesc": "Stop point2862", "stopUrl": "/icons/stops/stop.svg", "locationType": 0 },
|
||||
"tokenType": "EMV-CLT", "transportType": "TRAM", "lineId": "17", "lineName": "Tram17", "networkId": "1", "networkName": "HTM netwerk", "currency": "EUR", "transportIcon": "/icons/transportTypes/tram.svg", "legs": [ {
|
||||
"legId": 1614950977, "checkinTransactionTimestamp": "2026-04-20T16:59:48+02:00", "checkoutTransactionTimestamp": "2026-04-20T17:04:50+02:00", "checkinLocation": { "stopId": 2721, "stopName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Station Hollands Spoor" },
|
||||
{
|
||||
"key": "en-US", "value": "Station Hollands Spoor" }
|
||||
]
|
||||
},
|
||||
"stopDesc": "Stop point2721", "stopUrl": "/icons/stops/stop.svg", "locationType": 0 },
|
||||
"checkoutLocation": { "stopId": 2862, "stopName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Kalvermarkt-Stadhuis" },
|
||||
{
|
||||
"key": "en-US", "value": "Kalvermarkt-Stadhuis" }
|
||||
]
|
||||
},
|
||||
"stopDesc": "Stop point2862", "stopUrl": "/icons/stops/stop.svg", "locationType": 0 },
|
||||
"baseRate": 139, "lineId": "17", "lineName": "Tram17", "networkId": "1", "networkName": "HTM netwerk", "fare": 14, "fareState": "CALCULATED", "currency": "EUR", "products": [ {
|
||||
"productTemplateId": "30901", "productCommercialName": { "items": [ {
|
||||
"key": "nl-NL", "value": "HTM 90% Korting" },
|
||||
{
|
||||
"key": "en-US", "value": "HTM 90% Discount" }
|
||||
]
|
||||
},
|
||||
"productIcon": "001.jpg", "purchaseDateTime": "2026-04-02T12:38:28+02:00", "organisationName": "ProductRetailer HTM", "appliedValue": -125, "organisationId": "3", "category": "SALES", "typesOfFareProduct": [ {
|
||||
"privateCode": "discount" }
|
||||
],
|
||||
"xspit": "821ddb0d-4ea7-4a0d-84aa-bb7facce15d1" },
|
||||
{
|
||||
"productTemplateId": "N/A", "purchaseDateTime": "2025-07-09T12:39:27+02:00", "appliedValue": 139, "category": "SALES", "typesOfFareProduct": [ {
|
||||
"privateCode": "payg" }
|
||||
],
|
||||
"xspit": "7618337f-c986-4bef-990d-f5a6b47292b8" },
|
||||
{
|
||||
"productTemplateId": "1:2000", "productCommercialName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Basis Bus Tram Metro" },
|
||||
{
|
||||
"key": "en-US", "value": "BTM full fare" }
|
||||
]
|
||||
},
|
||||
"validFrom": "2000-01-01T01:00:00+01:00", "validUntil": "2100-01-01T00:59:59+01:00", "weight": 116, "appliedMetric": "FARE", "appliedValue": 116, "category": "INTERNAL", "typesOfFareProduct": [ {
|
||||
"privateCode": "payg" }
|
||||
],
|
||||
"xspit": "7618337f-c986-4bef-990d-f5a6b47292b8", "xpit": "f4256df6-b767-460f-9880-f7597bd7f3f2" },
|
||||
{
|
||||
"productTemplateId": "2:2000", "productCommercialName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Basis Bus Tram Metro" },
|
||||
{
|
||||
"key": "en-US", "value": "BTM full fare" }
|
||||
]
|
||||
},
|
||||
"validFrom": "2000-01-01T01:00:00+01:00", "validUntil": "2100-01-01T00:59:59+01:00", "weight": 23, "appliedMetric": "FARE", "appliedValue": 23, "category": "INTERNAL", "typesOfFareProduct": [ {
|
||||
"privateCode": "payg" }
|
||||
],
|
||||
"xspit": "7618337f-c986-4bef-990d-f5a6b47292b8", "xpit": "f4256df6-b767-460f-9880-f7597bd7f3f2" },
|
||||
{
|
||||
"productTemplateId": "3:30901", "productCommercialName": { "items": [ {
|
||||
"key": "nl-NL", "value": "HTM 90% Korting" },
|
||||
{
|
||||
"key": "en-US", "value": "HTM 90% Discount" },
|
||||
{
|
||||
"key": "nl-NL", "value": "Reis je regelmatig met HTM? Activeer dan HTM 90% Korting op je betaalpas of credit card en reis een week lang met korting!" },
|
||||
{
|
||||
"key": "en-US", "value": "Are you a regular traveler? Activate HTM 90% discount on your EMV card!" }
|
||||
]
|
||||
},
|
||||
"validFrom": "2026-04-03T04:00:00+02:00", "validUntil": "2031-04-03T04:00:00+02:00", "organisationName": "Product Owner HTM", "weight": -125, "appliedMetric": "DISCOUNT", "appliedValue": -125, "organisationId": "3", "category": "INTERNAL", "typesOfFareProduct": [ {
|
||||
"privateCode": "discount" }
|
||||
],
|
||||
"discountPercentage": 90, "productCatalogVersionId": "PC-HTM:70", "xspit": "821ddb0d-4ea7-4a0d-84aa-bb7facce15d1", "xpit": "1848597c-5ba9-4dab-8d9f-3948948706a1" }
|
||||
],
|
||||
"appliedTimePeriods": [], "tariffJourneyStart": true, "topoDistance": 1161, "concessionId": "1", "appliedZones": [] }
|
||||
],
|
||||
"lastUpdatedTripDateTime": "2026-04-20T17:04:50+02:00", "fare": 14, "loyaltyOrDiscount": true, "supportCode": "pWM8Km6J8aHg5n", "tripVersionReason": "STRUCTURE", "checkinTransactionId": "00310F92-29023-emvClt-1776697188000", "checkoutTransactionId": "0030DBC1-30528-emvClt-1776697490000", "tariffVersionId": "HTM-CF1:278", "correlationId": "4bc7a040-71bf-4084-a61e-b2dd72092079", "createdAt": "2026-04-20T17:05:01.473+02:00", "entryTariffLocation": { "stopId": 2721, "stopName": { "items": [ {
|
||||
"key": "nl-NL", "value": "Station Hollands Spoor" },
|
||||
{
|
||||
"key": "en-US", "value": "Station Hollands Spoor" }
|
||||
]
|
||||
},
|
||||
"stopDesc": "Stop point2721", "stopUrl": "/icons/stops/stop.svg", "locationType": 0 },
|
||||
"traveledLines": [ {
|
||||
"lineId": "17", "lineName": "Tram17" }
|
||||
],
|
||||
"tripFareNature": "FIXED", "paymentMethodId": "229a01ff-7bd9-4740-9b19-00637146a6ca", "paymentMethodMode": "PREPAID", "paymentMethodName": "EPURSE", "paymentProviderName": "TPURSE", "paymentProviderBusinessEntityId": "600027", "registryFragmentVersionId": "REG:27", "vehicleId": 5063, "xbot": "c85e34d6-f9c1-49c2-8574-59b37e0f3b8e" }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user