diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 5718941..48cc497 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -479,7 +479,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/PostOrder" examples: Create order with OVpas and PAD: summary: Create order with OVpas and PAD @@ -494,7 +494,11 @@ paths: { "externalOrderLineId": null, "productId": 1, - "vouchers":[], + "vouchers":[ + { + "voucherCode": "Voucher1234" + } + ], "quantity": 1, "validFrom": "2024-03-22T09:00:00", "validUntil": null, @@ -6872,6 +6876,31 @@ components: ageToInclusive: type: integer example: 11 + PostOrder: + type: object + required: + properties: + externalOrderId: + type: string + description: |- + The id used in an external sales system + example: "MyOrder123" + languageId: + type: integer + description: |- + The id of the language for this order, all communications about the order will be in the given language + example: 1 + externalDeviceId: + type: string + description: |- + The mobile device in use when placing the order + example: "ae3d9f69-945b-4290-a286-8c2dd5d7db8e" + orderLines: + type: array + description: |- + The orderLines with the chosen product and if known/required a voucher and customerToken + items: + $ref: "#/components/schemas/PostOrderLine" PostOrderLine: type: object required: @@ -6880,22 +6909,34 @@ components: - createdOn properties: productId: - type: integer + type: integer + description: |- + The id of the chosen product example: 1 quantity: - type: integer + type: integer + description: |- + Amount of the products to be delivered, in case of saldo quantity is used to define the amount of saldo to be charged in eurocents. If multiple GBO products are added, the same amount of customerTokens will be required. example: 1 createdOn: - type: datetime + type: datetime + description: |- + Current datetime, moment client added orderLine to the order example: "2024-03-22T09:00:00" externalOrderLineId: type: string - example: "MyOrder123" + description: |- + The orderLineId as known in an external sales system, used for reconcilliation + example: "MyOrderLine123" validFrom: type: datetime + description: |- + The moment the chosen product should be activated example: "2024-03-30T09:00:00" validUntil: type: datetime + description: |- + Only required when a product does not have a fixed duration, otherwise it is calculated by the back end system example: null vouchers: type: array @@ -6927,28 +6968,3 @@ components: voucherCode: type: string example: "Voucher1234" - ResponseOrder: - type: object - required: - - orderId - - validContents - - orderNumber - - externalOrderId - - customerProfileId - - device - - vouchers - - totalAmount - - touchpoint - - language - - createdOn - - lastUpdatedOn - - order_OrderStatus - - orderLines - - payments - - orderCustomer - properties: - orderId: - type: uuid - example: "a7e122a4-0273-45d2-b590-7e9b2442c56c" - validContents: - type: \ No newline at end of file