|
411 | 411 | <dl class="typography">
|
412 | 412 | <dt><dfn>Customer</dfn></dt>
|
413 | 413 | <dd>The user who places a booking using an application provided by
|
414 |
| - a <a>Broker</a>.</dd> |
| 414 | + a <a>Broker</a>. The <a>Customers</a> is not necessarily the attendee, |
| 415 | + so e.g. a parent may book on behalf of their child.</dd> |
415 | 416 | <dt><dfn>Broker</dfn></dt>
|
416 | 417 | <dd>The organisation or developer providing an application that
|
417 | 418 | allows <a>Customers</a> to make bookings. Those applications will be
|
|
548 | 549 |
|
549 | 550 | - The <a>Broker</a> MUST store the `Order` request with an internal status of `https://openactive/PaymentAuthorized` at this point.
|
550 | 551 |
|
551 |
| -vii) **B** - <a>Broker</a> call with `Order` including UUID with a Person object to check viability and with a Payment object for the total amount pre-authed (call is idempotent, can be retried if 500 returned), <a>Booking System</a> responds with an `Order`. |
| 552 | +vii) **B** - <a>Broker</a> call with `Order` including UUID with a Person object to check viability, with a Payment object, and `totalPaymentDue` including the total amount pre-authed (call is idempotent, can be retried if 500 returned), <a>Booking System</a> responds with an `Order`. |
552 | 553 |
|
553 | 554 | - The `identifier` of the `Payment` is taken from the payment pre-authorization.
|
554 | 555 |
|
555 |
| - - If the `totalPaymentDue` in the `Order` object is different to the current `totalPaymentDue` (which might have changed since **C2**, e.g. if the headline price is changed in the booking system between these two steps), the booking fails but the lease is sustained so that the user can be prompted whether they want to continue with the new amount. |
| 556 | + - If the `totalPaymentDue` included in the `Order` object is different to the current `totalPaymentDue` (which might have changed since **C2**, e.g. if the headline price is changed in the booking system between these two steps), the booking fails but the lease is sustained so that the user can be prompted whether they want to continue with the new amount. |
556 | 557 |
|
557 | 558 | - If some of the leases have expired, or if leases are not supported, then the booking system attempts to make the booking anyway. If there are no spaces available the booking fails.
|
558 | 559 |
|
|
781 | 782 |
|
782 | 783 | The `taxMode` (`https://openactive/TaxNet` or `https://openactive/TaxGross`) is REQUIRED to be specified at the <a>Seller</a> level, and MUST be reflected within the `Organization` that is included in the REQUIRED `organizer` or `provider` properties within opportunity data specified in [[Modelling-Opportunity-Data]]. It MUST also be consistent for all `Order`s originating from that <a>Seller</a>.
|
783 | 784 |
|
784 |
| -| `taxMode` | `https://openactive/TaxNet` | `https://openactive/TaxGross` | |
785 |
| -|---------------------------------------------|-----------------------------|-------------------------------| |
786 |
| -| Price displayed | Excludes tax | Includes all applicable taxes assuming a `Person` as a `customer` | |
787 |
| -| Currencies usually associated | USD | EUR, AUD, GBP | |
788 |
| -| Example price of opportunity before tax | 10.00 | 10.00 | |
789 |
| -| Example tax rate | 0.2 | 0.2 | |
790 |
| -| Price displayed to Customer during browsing | 10.00 | 12.00 | |
791 |
| -| Total paid by Customer | 12.00 | 12.00 | |
| 785 | +Note that `taxMode` only effects the interpretation of the `price` of the `Offer`. `totalPaymentDue` is always Gross (tax inclusive), and `unitTaxSpecification` and `totalTaxSpecification` include only the taxes themselves so are uneffected. |
| 786 | + |
| 787 | +| `taxMode` | `https://openactive/TaxNet` | `https://openactive/TaxGross` | |
| 788 | +|--------------------------------------------------------|-----------------------------|-------------------------------| |
| 789 | +| Price displayed | Excludes tax | Includes all applicable taxes assuming a `Person` as a `customer` | |
| 790 | +| Currencies usually associated | USD | EUR, AUD, GBP | |
| 791 | +| Example price of opportunity before tax | 10.00 | 10.00 | |
| 792 | +| Example tax rate | 0.2 | 0.2 | |
| 793 | +| Price displayed to Customer during browsing (`Offer`) | 10.00 | 12.00 | |
| 794 | +| Total paid by Customer (`totalPaymentDue`) | 12.00 | 12.00 | |
792 | 795 |
|
793 | 796 |
|
794 | 797 | ## Free opportunities
|
|
899 | 902 |
|
900 | 903 | 1. Use the latest state of the `Order` from the <a>Orders feed</a> to determine which `OrderItem`s may be cancelled. If `allowSimpleCancellation` is `true` and `latestCancellationBeforeStartDate` subtracted from the opportunity `startDate` is in the future, a PATCH against the `OrderItem` `id` with a body of `{ "orderItemStatus": "https://openactive.io/CustomerCancelled" }` MUST succeed.
|
901 | 904 |
|
902 |
| -2. The <a>Customer</a> MUST be informed of the expected refund before they commit to cancellation, where the value of the refund for each `OrderItem` MUST be equal to: |
| 905 | +2. Inform the <a>Customer</a> of the expected refund before they commit to cancellation, where the value of the refund for each `OrderItem` MUST be equal to: |
903 | 906 | - For `taxMode` of `https://openactive/TaxNet`: the sum of the `price` in the `acceptedOffer` and all the prices in `unitTaxSpecification`.
|
904 | 907 | - For `taxMode` of `https://openactive/TaxGross`: the `price` in the `acceptedOffer`.
|
905 | 908 |
|
906 |
| -3. For each `OrderItem` to be cancelled, a PATCH must be submitted using the URI `id` of the `OrderItem` from the feed with a body of `{ "orderItemStatus": "https://openactive.io/CustomerCancelled" }`. On success, a 204 response will be received, without any body. On failure a 5xx response will be received with an error message. |
| 909 | +3. Submit a PATCH for each `OrderItem` to be cancelled using the URL `id` of the `OrderItem` from the feed with a body of `{ "orderItemStatus": "https://openactive.io/CustomerCancelled" }`. On success, a 204 response will be received, without any body. On failure a 5xx response will be received with an error message. |
907 | 910 |
|
908 | 911 | 4. Process any refunds based on the resulting updates to the <a>Orders feed</a>. Successfully cancelled `OrderItems` will have `orderItemStatus` set to `https://openactive.io/CustomerCancelled`. Note refunds MUST NOT be processed except in response to updates in the <a>Orders feed</a>.
|
909 | 912 |
|
|
1121 | 1124 | In the situation where a middleware is used for various <a>Brokers</a>, independently of API key provisioning at the <a>Booking System</a> level (which in some systems is a lengthly and time-consuming process), the `broker` property SHOULD contain the details of the end-user <a>Broker</a> rather than the middleware.
|
1122 | 1125 |
|
1123 | 1126 |
|
| 1127 | +#### `orderQuantity` expansion |
| 1128 | + |
| 1129 | +`orderQuantity` within `OrderItem` is only used during Order Creation, and is not persisted, as follows: |
| 1130 | + |
| 1131 | +- For `OrderQuote` request, `OrderQuote` response, and `Order` request the `OrderItem`s MUST be unique based on the `id` of their `acceptedOffer` and the `id` of their `orderedItem`, and `orderQuantity` MUST be used to specify more than one is desired. |
| 1132 | +- For `Order` response, and the <a>Orders feed</a>, the `OrderItems` MUST NOT include `orderQuantity`, and instead `OrderItem`s must be duplicated according to their original `orderQuanity`, with a unique `id` provided for each resulting `OrderItem`. |
| 1133 | + |
| 1134 | +This allows `OrderItem`s to be cancelled individually once the `Order` has been created, and errors regarding capacity to be attributed appropriately during Order Creation. |
| 1135 | + |
| 1136 | +| Scenario | `orderQuantity` status | Unique `OrderItem` key | |
| 1137 | +|-----------------------|------------------------|------------------------------------------------| |
| 1138 | +| `OrderQuote` request | REQUIRED | Composite of `acceptedOffer` and `orderedItem` | |
| 1139 | +| `OrderQuote` response | REQUIRED | Composite of `acceptedOffer` and `orderedItem` | |
| 1140 | +| `Order` request | REQUIRED | Composite of `acceptedOffer` and `orderedItem` | |
| 1141 | +| `Order` response | - | `id` of `OrderItem` | |
| 1142 | +| <a>Orders feed</a> | - | `id` of `OrderItem` | |
| 1143 | + |
| 1144 | + |
1124 | 1145 | #### `OrderQuote`
|
1125 | 1146 |
|
1126 | 1147 | A PUT request to the Order Creation endpoint of the <a>Booking System</a> with an object of type `OrderQuote` will return a `OrderQuote` which represents a "dry run" of the booking, with the state of the `Order` identical to if request of type `Order` be made, without any side effects (with the exception of optional leasing).
|
|
1285 | 1306 | | [`schema:customer`](http://schema.org/customer) | REQUIRED | - | - | [`schema:Organization`](https://schema.org/Organization) or a [`schema:Person`](https://schema.org/Person) | The person or organization purchasing the Order. MUST be either an . |
|
1286 | 1307 | | [`oa:bookingService`](https://openactive.io/bookingService) | - | REQUIRED | - | [`oa:BookingService`](https://openactive.io/BookingService) | Details about the <a>Booking System</a> |
|
1287 | 1308 | | [`schema:orderedItem`](http://schema.org/orderedItem) | REQUIRED | REQUIRED | REQUIRED | Array of [`schema:OrderItem`](http://schema.org/OrderItem) | The items that constitute the `Order` |
|
1288 |
| -| [`schema:totalPaymentDue`](http://schema.org/totalPaymentDue) | - | REQUIRED | REQUIRED | [`schema:PriceSpecification`](http://schema.org/PriceSpecification) | The total price of the `Order`, which includes or excludes tax depending on the `taxMode`. | |
| 1309 | +| [`schema:totalPaymentDue`](http://schema.org/totalPaymentDue) | REQUIRED | REQUIRED | REQUIRED | [`schema:PriceSpecification`](http://schema.org/PriceSpecification) | The total price of the `Order`, which includes or excludes tax depending on the `taxMode`. | |
1289 | 1310 | | [`oa:totalTaxSpecification`](https://openactive.io/totalTaxSpecification) | - | REQUIRED | REQUIRED | Array of [`oa:TaxChargeSpecification`](https://openactive.io/TaxChargeSpecification) | Breakdown of tax payable for the Order. |
|
1290 | 1311 | | [`oa:payment`](https://openactive.io/payment) | REQUIRED | OPTIONAL | - | [`oa:Payment`](https://openactive.io/Payment) | The payment associated with the Order by the Broker |
|
1291 | 1312 |
|
|
1294 | 1315 |
|
1295 | 1316 | ### `oa:OrderQuote`
|
1296 | 1317 |
|
1297 |
| -`OrderQuote` subclasses `Order`, and includes of the above properties as specified for `Order` with the addition of `oa:lease` and without `oa:payment`: |
| 1318 | +`OrderQuote` subclasses `Order`, and includes of the above properties as specified for `Order` with the addition of `oa:lease`, without `oa:payment`, and with `totalPaymentDue` only required in the response: |
1298 | 1319 |
|
1299 | 1320 | | Property | Broker Request | Booking System Response | Type | Notes |
|
1300 | 1321 | |--------------------------------------------------------------------|----------|----------|-|------|
|
1301 | 1322 | | `@type` | REQUIRED | REQUIRED | [`schema:Text`](https://schema.org/Text) | `OrderQuote` |
|
1302 | 1323 | | [`oa:lease`](https://openactive.io/lease) | - | OPTIONAL | [`oa:Lease`](https://openactive.io/Lease) | The lease on the OrderItems which lasts for the duration specified by the booking system. |
|
1303 | 1324 | | [`oa:payment`](https://openactive.io/payment) | - | - | [`oa:Payment`](https://openactive.io/Payment) | Payment is not expected for `OrderQuote` |
|
| 1325 | +| [`schema:totalPaymentDue`](http://schema.org/totalPaymentDue) | - | REQUIRED | REQUIRED | [`schema:PriceSpecification`](http://schema.org/PriceSpecification) | The total price of the `Order`, which includes or excludes tax depending on the `taxMode`. | |
1304 | 1326 |
|
1305 | 1327 |
|
1306 | 1328 | ### `schema:Organization` for `seller`
|
|
1357 | 1379 | | [`oa:error`](https://openactive.io/error) | - | REQUIRED | Array of [`oa:Error`](https://openactive.io/Error) | Array of errors related to the OrderItem being included in the Order, only applicable for an `OrderQuote`. |
|
1358 | 1380 | | [`oa:cancellationMessage`](https://openactive.io/cancellationMessage) | - | OPTIONAL | [`schema:Text`](https://schema.org/Text) | A message set by the Seller in the event of opportunity cancellation, only applicable for an `Order` and where the `OrderItem` has `orderItemStatus` set to `https://openactive.io/SellerCancelled` |
|
1359 | 1381 |
|
1360 |
| -Note that [`schema:orderQuantity`](http://schema.org/orderQuantity) is not supported in this version of the specification. |
| 1382 | +Note that [`schema:orderQuantity`](http://schema.org/orderQuantity) is only used during the booking flow, and MUST NOT be used within the completed `Order`. |
1361 | 1383 |
|
1362 | 1384 |
|
1363 | 1385 | ### `schema:Offer`
|
|
0 commit comments