added delete on order address

This commit is contained in:
Mirjam Herald 2025-02-26 16:11:39 +01:00
parent 2bf79f1fa0
commit 8461b117bd
2 changed files with 206 additions and 56 deletions

View File

@ -1395,6 +1395,42 @@ paths:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
{ "customerTokenId": "0aedb483-2477-4720-aee6-7abcd016843b" } { "customerTokenId": "0aedb483-2477-4720-aee6-7abcd016843b" }
/customertokens/{customerTokenId}/personalaccountdata:
parameters:
- in: path
name: customerTokenId
schema:
type: string
format: uuid
example: 510194ef-0038-45ef-94c7-262df93ef1d7
required: true
description: The id of the customer token.
post:
summary: P3. Add personal account data to token.
description: Add personal account data to token.
tags:
- Order Line
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"photoReference": "DSC_0502.JPG",
"fileType": "image/jpg",
"challengeTypeId": 1,
"oneTimePassword": "H5Iiz3JTaQeIV8p",
}
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{ "personalAccountDataId": "0aedb483-2477-4720-aee6-7abcd016843b" }
/personalaccountdata: /personalaccountdata:
get: get:
summary: P5. Find personal account data. summary: P5. Find personal account data.

View File

@ -9,7 +9,7 @@ paths:
/orders/validation: /orders/validation:
post: post:
tags: tags:
- Order Validation v1 & v1 - Order Validation v1 & v2
summary: Validate order. summary: Validate order.
description: Validate order. description: Validate order.
parameters: parameters:
@ -972,18 +972,18 @@ paths:
} }
post: post:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Create a new order v3.0. summary: Create a new order v2.0.
description: Create a new order v3.0. description: Create a new order v2.0.
requestBody: requestBody:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
summary: Order creation v3.0 summary: Order creation v2.0
description: Order creation v3.0 description: Order creation v2.0
value: value:
{ {
"externalOrderId": null, "externalOrderId": null,
@ -1318,7 +1318,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -1692,7 +1692,7 @@ paths:
} }
patch: patch:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Update an existing order. summary: Update an existing order.
description: Update an existing order. description: Update an existing order.
requestBody: requestBody:
@ -1701,9 +1701,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
summary: Order update v3.0 summary: Order update v2.0
description: Order update v3.0 description: Order update v2.0
value: { value: {
"languageId": 1, "languageId": 1,
"billingAddressId": 2, "billingAddressId": 2,
@ -1729,7 +1729,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -1902,15 +1902,32 @@ paths:
} }
delete: delete:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Delete an existing order. summary: Delete an existing order.
description: Delete an existing order. description: Delete an existing order.
responses: responses:
"200": "200":
description: OK description: OK
"400": "400":
description: "Bad request" description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"type": "https://htm.nl/api/v1/probs/validationerror",
"title": "Your request is not valid.",
"detail": "The order can not be deleted.",
"instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
"errors": [
{
"detail": "Order status is paid",
"pointer": "#/order_OrderStatus/1/orderStatus/orderStatusId",
"orderStatusId": 4
}
]
}
/orders/{orderId}/orderlines: /orders/{orderId}/orderlines:
parameters: parameters:
- in: path - in: path
@ -1930,7 +1947,7 @@ paths:
description: The JWT of the logged in customer (in case of a web shop). description: The JWT of the logged in customer (in case of a web shop).
post: post:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Add a new order line to an existing order. summary: Add a new order line to an existing order.
description: Add a new order line to an existing order. description: Add a new order line to an existing order.
requestBody: requestBody:
@ -1939,9 +1956,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
summary: Create orderLine v3.0 summary: Create orderLine v2.0
description: Create orderLine v3.0 description: Create orderLine v2.0
value: value:
{ {
"externalOrderLineId": null, "externalOrderLineId": null,
@ -2022,7 +2039,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -2244,7 +2261,7 @@ paths:
description: The JWT of the logged in customer (in case of a web shop). description: The JWT of the logged in customer (in case of a web shop).
patch: patch:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Update an existing order line. summary: Update an existing order line.
description: Update an existing order line. description: Update an existing order line.
requestBody: requestBody:
@ -2253,9 +2270,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
summary: Order creation v3.0 summary: Orderline update v2.0
description: Order creation v3.0 description: Orderline update v2.0
value: value:
{ {
"quantity": 1, "quantity": 1,
@ -2263,8 +2280,8 @@ paths:
"validUntil": null "validUntil": null
} }
v1.2: v1.2:
summary: Order creation v1.2 summary: Orderline updatev1.2
description: Order creation v1.2 description: Orderline update v1.2
value: value:
{ {
"taxAmount": 21, "taxAmount": 21,
@ -2284,7 +2301,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -2448,7 +2465,7 @@ paths:
} }
delete: delete:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Delete an existing order line. summary: Delete an existing order line.
description: Delete an existing order line. description: Delete an existing order line.
responses: responses:
@ -2459,7 +2476,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -2556,7 +2573,7 @@ paths:
description: The JWT of the logged in customer (in case of a web shop). description: The JWT of the logged in customer (in case of a web shop).
post: post:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Add a payment to an existing order. summary: Add a payment to an existing order.
description: Add a payment to an existing order. description: Add a payment to an existing order.
requestBody: requestBody:
@ -2565,9 +2582,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
summary: Order creation v3.0 summary: Order creation v2.0
description: Order creation v3.0 description: Order creation v2.0
value: value:
{ {
"createdOn": "2024-03-22T09:00:00", "createdOn": "2024-03-22T09:00:00",
@ -2636,7 +2653,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -2824,7 +2841,7 @@ paths:
description: The JWT of the logged in customer (in case of a web shop). description: The JWT of the logged in customer (in case of a web shop).
patch: patch:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Update a payment on an existing order. summary: Update a payment on an existing order.
description: Update a payment on an existing order. description: Update a payment on an existing order.
requestBody: requestBody:
@ -2833,9 +2850,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
summary: Order payment update v3.0 summary: Order payment update v2.0
description: Order payment update v3.0 description: Order payment update v2.0
value: value:
{ {
"htmPaymentReference": "HTM-1234", "htmPaymentReference": "HTM-1234",
@ -2876,7 +2893,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -3030,7 +3047,7 @@ paths:
description: The JWT of the logged in customer (in case of a web shop). description: The JWT of the logged in customer (in case of a web shop).
post: post:
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Add a customer to an existing order. summary: Add a customer to an existing order.
description: Add a customer to an existing order. description: Add a customer to an existing order.
requestBody: requestBody:
@ -3039,9 +3056,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
summary: Order payment update v3.0 summary: Order payment update v2.0
description: Order payment update v3.0 description: Order payment update v2.0
value: value:
{ {
"birthname": "Jan", "birthname": "Jan",
@ -3093,7 +3110,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -3217,7 +3234,7 @@ paths:
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
description: The JWT of the logged in customer (in case of a web shop). description: The JWT of the logged in customer (in case of a web shop).
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Update a customer on an existing order. summary: Update a customer on an existing order.
description: Update a customer on an existing order. description: Update a customer on an existing order.
requestBody: requestBody:
@ -3226,9 +3243,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
summary: Order customer update v3.0 summary: Order customer update v2.0
description: Order customer update v3.0 description: Order customer update v2.0
value: value:
{ {
"birthname": "Jan", "birthname": "Jan",
@ -3256,7 +3273,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -3381,7 +3398,7 @@ paths:
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
description: The JWT of the logged in customer (in case of a web shop). description: The JWT of the logged in customer (in case of a web shop).
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Create a customer address for an existing order. summary: Create a customer address for an existing order.
description: Create a customer address for an existing order. description: Create a customer address for an existing order.
requestBody: requestBody:
@ -3390,7 +3407,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
v3.0: v2.0:
summary: Order customer address create v1.2 summary: Order customer address create v1.2
description: Order customer address create v1.2 description: Order customer address create v1.2
value: value:
@ -3411,7 +3428,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -3539,7 +3556,7 @@ paths:
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
description: The JWT of the logged in customer (in case of a web shop). description: The JWT of the logged in customer (in case of a web shop).
tags: tags:
- Order Creation v3.0 - Order Creation v2.0
summary: Update a customer address for an existing order. summary: Update a customer address for an existing order.
description: Update a customer address for an existing order. description: Update a customer address for an existing order.
requestBody: requestBody:
@ -3548,7 +3565,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
v3.0: v2.0:
summary: Order customer address create v1.2 summary: Order customer address create v1.2
description: Order customer address create v1.2 description: Order customer address create v1.2
value: value:
@ -3569,7 +3586,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
v3.0: v2.0:
value: value:
{ {
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
@ -3678,6 +3695,103 @@ paths:
] ]
} }
} }
delete:
tags:
- Order Creation v2.0
summary: Delete an existing order address
description: Delete an existing order address
parameters:
- in: path
name: orderCustomerAddressId
required: true
style: simple
explode: false
schema:
type: string
format: uuid
example: a0ef57fa-395c-4a03-96e9-234c26dccea9
- in: header
name: X-HM-JWT-AUTH-HEADER
schema:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
description: The JWT of the logged in customer (in case of a web shop).
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
examples:
v2.0:
value:
{
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
"externalOrderId": null,
"orderNumber": "ORD-123456",
"customerProfileId": 1337,
"totalAmount": 0,
"language": {
"languageId": 1,
"name": "Nederlands",
"iso639Code": "nl-NL",
"ietfCode": "nl"
},
"billingAddressId": 1,
"shippingAddressId": 1,
"touchPoint":
{
"salesTouchpointId": 3,
"name": "Website (Perplex)",
"isActive": true,
"retailerId": 1001,
},
"createdOn": "2024-03-22T09:00:00",
"lastUpdatedOn": "2024-03-22T09:00:00",
"order_OrderStatus":
[
{
"order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f",
"orderStatus": { "orderStatusId": 1, "name": "concept" },
"createdOn": "2024-03-22T09:00:00",
"description": "Order is aangemaakt",
}
],
"orderLines": null,
"payments": null,
"customer":
{
"birthname": "Jan",
"surname": "Vries",
"prefix": "de",
"emailAddress": "jandevries@outlook.com",
"dateOfBirth": "1970-01-01",
"addresses": null
}
}
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"type": "https://htm.nl/api/v1/probs/validationerror",
"title": "Your request is not valid.",
"detail": "The combination of tokens and/or products chosen is not valid. See errors for more details.",
"instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
"errors": [
{
"detail": "Product requires product with productId=2",
"pointer": "#/1/orderLine",
"orderLineId": "0574440e-7fa0-401f-b907-539c91633a5d",
"productId": 3
}
]
}
/orders/{orderId}/fulfill: /orders/{orderId}/fulfill:
parameters: parameters:
- in: path - in: path