DHIL-3732 - GET/POST/PATCH OrderLine.
This commit is contained in:
parent
bd24e91971
commit
ad21a41b55
@ -18,14 +18,14 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: "a0ef57fa-395c-4a03-96e9-234c26dccea9"
|
||||
example: a0ef57fa-395c-4a03-96e9-234c26dccea9
|
||||
required: false
|
||||
description: The id of the order at the external party (e.g. Perplex).
|
||||
- in: query
|
||||
name: orderNumber
|
||||
schema:
|
||||
type: string
|
||||
example: "OV-1337"
|
||||
example: OV-1337
|
||||
required: false
|
||||
description: The human readable number of the order.
|
||||
- in: query
|
||||
@ -75,7 +75,7 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2024-03-22T09:00:00"
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp before which the order should have been created.
|
||||
- in: query
|
||||
@ -83,7 +83,7 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2024-03-22T09:00:00"
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp after which the order should have been created.
|
||||
- in: query
|
||||
@ -91,7 +91,7 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2024-03-22T09:00:00"
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp before which the order should have been updated.
|
||||
- in: query
|
||||
@ -99,7 +99,7 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2024-03-22T09:00:00"
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp after which the order should have been updated.
|
||||
- in: query
|
||||
@ -113,7 +113,7 @@ paths:
|
||||
description: Filter on possible order statuses. 1 = concept, 2 = awaitingPayment, 3 = pendingPayment, 4 = paid, 5 = delivered, 6 = cancelled.
|
||||
responses:
|
||||
"200":
|
||||
description: "OK"
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@ -413,7 +413,7 @@ paths:
|
||||
}
|
||||
responses:
|
||||
"201":
|
||||
description: "Created"
|
||||
description: Created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@ -610,12 +610,330 @@ paths:
|
||||
}
|
||||
responses:
|
||||
"200":
|
||||
description: "Created"
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example: { "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d" }
|
||||
/orders/{orderId}/orderlines:
|
||||
parameters:
|
||||
- in: path
|
||||
name: orderId
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: d1dd439b-6072-4b97-89c9-724268865b93
|
||||
required: true
|
||||
description: The id of the order to process.
|
||||
post:
|
||||
summary: Add one or more order lines to an order.
|
||||
description: Add one or more order lines to an order.
|
||||
tags:
|
||||
- Order Line
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
[
|
||||
{
|
||||
"externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f",
|
||||
"productId": 1,
|
||||
"productName": "HTM Maandkorting 20%",
|
||||
"productCode": "HTM-MND-20",
|
||||
"productDescription": "HTM Maandkorting 20%",
|
||||
"taxAmount": 21,
|
||||
"taxCodeId": "V21",
|
||||
"amountExclTax": 100,
|
||||
"amountInclTax": 121,
|
||||
"quantity": 1,
|
||||
"terms": "generalTermsAndConditions.pdf",
|
||||
"validFrom": "2024-03-22T09:00:00",
|
||||
"validUntil": "2025-03-22T09:00:00",
|
||||
"orderLineStatusId": 4,
|
||||
"createdOn": "2024-03-22T09:00:00",
|
||||
"customerTokens":
|
||||
[
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"ovPayTokenId": 1,
|
||||
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
||||
"amount": 34,
|
||||
"ovpasNumber": "OV34567",
|
||||
"verificationCode": "A7H6",
|
||||
"xTAT": "3b5f2354-d8a1-4317-bb6e-2c32458bc061",
|
||||
"xBOT": "0fbdb14c-9306-462e-aca7-765a4980a2f7",
|
||||
"personalAccountData":
|
||||
{
|
||||
"name": "Jan de Vries",
|
||||
"dateOfBirth": "01-01-1970",
|
||||
"photoReference": "DSC_0502.JPG",
|
||||
"fileType": "image/jpg",
|
||||
"challengeTypeId": 1,
|
||||
"oneTimePassword": "H5Iiz3JTaQeIV8p",
|
||||
},
|
||||
},
|
||||
],
|
||||
"orderAccountingStatuses":
|
||||
[
|
||||
{
|
||||
"accountingStatusId": 1,
|
||||
"createdOn": "2024-03-22T09:00:00",
|
||||
"description": "Financiele transactie voor de FIKO.",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example: { "orderLineId": "1e441d7d-50d6-4006-aca7-5e87e2f218df" }
|
||||
/orderlines:
|
||||
get:
|
||||
summary: Find order lines.
|
||||
description: Find order lines.
|
||||
tags:
|
||||
- Order Line
|
||||
parameters:
|
||||
- in: query
|
||||
name: orderLineId
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 4ea492ff-8ffc-4a4e-901e-59f05e854285
|
||||
required: false
|
||||
description: The id of the order line.
|
||||
- in: query
|
||||
name: externalOrderLineId
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 292e5f86-cefc-4224-9506-d204ed3a426f
|
||||
required: false
|
||||
description: The id of the order line at the external party (Perplex).
|
||||
- in: query
|
||||
name: productId
|
||||
schema:
|
||||
type: integer
|
||||
example: 42
|
||||
required: false
|
||||
description: The technical id of the product.
|
||||
- in: query
|
||||
name: productName
|
||||
schema:
|
||||
type: string
|
||||
example: HTM Maandkorting 20%
|
||||
required: false
|
||||
description: The name of the product.
|
||||
- in: query
|
||||
name: productCode
|
||||
schema:
|
||||
type: string
|
||||
example: HTM-MND-20
|
||||
required: false
|
||||
description: The code of the product.
|
||||
- in: query
|
||||
name: taxAmount
|
||||
schema:
|
||||
type: integer
|
||||
example: 21
|
||||
required: false
|
||||
description: The amount of tax calculated.
|
||||
- in: query
|
||||
name: taxCodeId
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
required: false
|
||||
description: The technical id of the tax code.
|
||||
- in: query
|
||||
name: amountExclTax
|
||||
schema:
|
||||
type: integer
|
||||
example: 100
|
||||
required: false
|
||||
description: The amount of the order line before taxes.
|
||||
- in: query
|
||||
name: amountInclTax
|
||||
schema:
|
||||
type: integer
|
||||
example: 121
|
||||
required: false
|
||||
description: The amount of the order line after taxes.
|
||||
- in: query
|
||||
name: quantity
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
required: false
|
||||
description: The quantity of products for this order line.
|
||||
- in: query
|
||||
name: terms
|
||||
schema:
|
||||
type: string
|
||||
example: generalTermsAndConditions.pdf
|
||||
required: false
|
||||
description: The terms of conditions that apply on this order line.
|
||||
- in: query
|
||||
name: validFrom
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp from which the ordered product is valid.
|
||||
- in: query
|
||||
name: validUntil
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp from which the ordered product is valid.
|
||||
- in: query
|
||||
name: orderLineStatusId
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
explode: false
|
||||
required: false
|
||||
description: Filter on possible order line statuses. 1 = pending, 3 = delivered, 4 = cancelled, 5 = refunded, 7 = shipped.
|
||||
- in: query
|
||||
name: createdBefore
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp before which the order line should have been created.
|
||||
- in: query
|
||||
name: createdAfter
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp after which the order line should have been created.
|
||||
- in: query
|
||||
name: updatedBefore
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp before which the order line should have been updated.
|
||||
- in: query
|
||||
name: updatedAfter
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-03-22T09:00:00
|
||||
required: false
|
||||
description: Timestamp after which the order line should have been updated.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
[
|
||||
{
|
||||
"orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311",
|
||||
"externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f",
|
||||
"productId": 1,
|
||||
"productName": "HTM Maandkorting 20%",
|
||||
"productCode": "HTM-MND-20",
|
||||
"productDescription": "HTM Maandkorting 20%",
|
||||
"taxAmount": 21,
|
||||
"taxCodeId": "V21",
|
||||
"amountExclTax": 100,
|
||||
"amountInclTax": 121,
|
||||
"quantity": 1,
|
||||
"terms": "generalTermsAndConditions.pdf",
|
||||
"validFrom": "2024-03-22T09:00:00",
|
||||
"validUntil": "2025-03-22T09:00:00",
|
||||
"orderLineStatus":
|
||||
{ "orderLineStatusId": 4, "name": "delivered" },
|
||||
"createdOn": "2024-03-22T09:00:00",
|
||||
"lastUpdatedOn": "2024-03-22T09:00:00",
|
||||
"customerTokens":
|
||||
[
|
||||
{
|
||||
"customerTokeId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e",
|
||||
"tokenType": { "tokenTypeId": 1, "name": "EMV" },
|
||||
|
||||
"ovPayTokenId": 1,
|
||||
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
||||
"amount": 34,
|
||||
"ovpasNumber": "OV34567",
|
||||
"verificationCode": "A7H6",
|
||||
"xTAT": "3b5f2354-d8a1-4317-bb6e-2c32458bc061",
|
||||
"xBOT": "0fbdb14c-9306-462e-aca7-765a4980a2f7",
|
||||
"personalAccountData":
|
||||
{
|
||||
"personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47",
|
||||
"name": "Jan de Vries",
|
||||
"dateOfBirth": "01-01-1970",
|
||||
"photoReference": "DSC_0502.JPG",
|
||||
"fileType": "image/jpg",
|
||||
"challengeType":
|
||||
{ "challengeTypeId": 1, "name": "email" },
|
||||
"oneTimePassword": "H5Iiz3JTaQeIV8p",
|
||||
},
|
||||
},
|
||||
],
|
||||
"orderAccountingStatuses":
|
||||
[
|
||||
{
|
||||
"orderAccountingStatusId": "7c5118d0-8535-4464-9239-83a7ba8fd2db",
|
||||
"accountingStatus":
|
||||
{ "accountingStatusId": 1, "name": "open" },
|
||||
"createdOn": "2024-03-22T09:00:00",
|
||||
"description": "Financiele transactie voor de FIKO.",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
/orderlines/{orderLineId}:
|
||||
patch:
|
||||
summary: Update an order line.
|
||||
description: Update an order line.
|
||||
tags:
|
||||
- Order Line
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
{
|
||||
"taxAmount": 21,
|
||||
"taxCodeId": "V21",
|
||||
"amountExclTax": 100,
|
||||
"amountInclTax": 121,
|
||||
"quantity": 1,
|
||||
"terms": "generalTermsAndConditions.pdf",
|
||||
"validFrom": "2024-03-22T09:00:00",
|
||||
"validUntil": "2025-03-22T09:00:00",
|
||||
"orderLineStatusId": 4,
|
||||
}
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example: { "orderLineId": "ee82686a-a9f6-4888-b336-8e2aab6f4e13" }
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerToken:
|
||||
@ -631,23 +949,23 @@ components:
|
||||
type:
|
||||
type: string
|
||||
format: url
|
||||
example: "https://example.com/probs/out-of-credit"
|
||||
example: https://example.com/probs/out-of-credit
|
||||
title:
|
||||
type: string
|
||||
example: "You do not have enough credit."
|
||||
example: You do not have enough credit.
|
||||
detail:
|
||||
type: string
|
||||
example: "Your current balance is 30, but that costs 50."
|
||||
example: Your current balance is 30, but that costs 50.
|
||||
instance:
|
||||
type: string
|
||||
example: "/account/12345/msgs/abc"
|
||||
example: /account/12345/msgs/abc
|
||||
balance:
|
||||
type: string
|
||||
example: "30"
|
||||
example: 30
|
||||
accounts:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
example:
|
||||
- "/account/12345"
|
||||
- "/account/67890"
|
||||
- /account/12345
|
||||
- /account/67890
|
||||
|
||||
Loading…
Reference in New Issue
Block a user