Redesign validation and fulfillment endpoints

This commit is contained in:
Bas Boterman 2024-09-17 16:20:38 +02:00
parent 17d8280bad
commit 26b0e5b957

View File

@ -0,0 +1,241 @@
openapi: 3.0.1
info:
title: ABT Service Engine Order APIs
version: "1.0"
description: Order APIs available in the Service Engine for order validation and fulfillment.
servers:
- url: https://api.integratielaag.nl/v1
paths:
/orders/validation:
post:
tags:
- Order Validation
summary: Validate order.
description: Validate order.
parameters:
- name: X-HTM-JWT-AUTH-HEADER
in: header
required: true
style: simple
explode: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/postOrderValidation'
examples:
postOrderValidation:
value:
- ovPayTokenId: 2
serviceReferenceId: NLOV1234567ABCDEFG
amount: 34
ovpasNumber: OV34567
productId: 2
startDate: 2024-03-22T09:00:00z
quantity: 1
- ovPayTokenId: 3
serviceReferenceId: NLOV1234567ABCDEFG
amount: 89
ovpasNumber: OV34567
productId: 4
startDate: 2024-03-22T09:00:00z
quantity: 4
responses:
'200':
description: Successful
content:
application/json:
schema:
$ref: '#/components/schemas/postCustomerProfileOvPayTokenResponse'
/orders/{orderId}/fulfillment:
post:
tags:
- Order Fulfillment
summary: Order fulfillment
description: Order fulfillment.
parameters:
- name: X-HTM-JWT-AUTH-HEADER
in: header
required: true
style: simple
explode: false
schema:
type: string
- name: orderId
in: path
required: true
style: simple
explode: false
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/postOrderFulfillment'
examples:
postOrderFulfillment:
value:
customerProfileID: 123415
customerProfileData:
dateOfBirth: 09-03-1989
personalAccountData:
birthdate: 09-03-1989
directDebitMandate:
consumerName: J. de Tèster
consumerBic: RABONL2U
consumerIban: NL44RABO0123456789
orderContents:
- ovPayTokenId: 123
serviceReferenceId: NLOV1234567ABCDEFG
amount: 450
ovpasNumber: 63AW974
productId: 2
startDate: '2024-03-22T09:00:00Z'
quantity: 1
orderlineId: 2d7fadc9-b64b-4516-9a7d-cf550f201372
- ovPayTokenId: 123
serviceReferenceId: NLOV1234567ABCDEFG
amount: 450
ovpasNumber: 63AW974
productId: 3
startDate: '2024-03-16T09:00:00Z'
quantity: 1
orderlineId: 9d7fadc9-b64b-4516-9a7d-cf550f201378
orderStatus: succeededPayment
responses:
'200':
description: Successful
components:
schemas:
postOrderFulfillment:
type: object
properties:
customerProfileID:
type: number
customerProfileData:
type: object
properties:
dateOfBirth:
type: string
personalAccountData:
type: object
properties:
birthdate:
type: string
directDebitMandate:
type: object
properties:
consumerName:
type: string
consumerBic:
type: string
consumerIban:
type: string
orderContents:
type: array
items:
type: object
properties:
ovPayTokenId:
type: number
serviceReferenceId:
type: string
amount:
type: number
ovpasNumber:
type: string
productId:
type: number
startDate:
type: string
quantity:
type: number
orderlineId:
type: string
format: uuid
orderStatus:
type: string
postOrderValidation:
type: array
items:
properties:
ovPayTokenId:
type: integer
serviceReferenceId:
type: string
amount:
type: integer
ovpasNumber:
type: string
productId:
type: integer
startDate:
type: string
quantity:
type: integer
postCustomerProfileOvPayTokenResponse:
type: object
properties:
validContents:
type: boolean
amountExclTax:
type: number
taxPercentage:
type: number
amountInclTax:
type: number
contents:
type: array
items:
type: object
properties:
ovPayTokenId:
type: number
serviceReferenceId:
type: string
ovpasNumber:
type: string
productId:
type: number
quantity:
type: number
amountExclTax:
type: number
taxPercentage:
type: number
amountInclTax:
type: number
startDate:
type: string
endDate:
type: string
isRenewable:
type: boolean
nextDebitDate:
type: string
termAmountExclTax:
type: number
termAmountInclTax:
type: number
additionalRemarks:
type: array
items:
type: object
properties:
code:
type: string
parameter:
type: string
validationErrors:
type: array
items:
type: object
properties:
detail:
type: string
pointer:
type: string