|
512 | 512 | The `leaseExpires` MAY be used to inform the `Customer` of the time they have remaining.
|
513 | 513 |
|
514 | 514 |
|
515 |
| - |
516 | 515 | ## Step-by-step process description
|
517 | 516 |
|
518 | 517 | <figure>
|
|
856 | 855 |
|
857 | 856 | - The `validFromBeforeStartDate` duration (if provided) subtracted from the `startDate` in the past. This allows for a "bookahead" window to be specified.
|
858 | 857 |
|
| 858 | +- The `taxMode` (`https://openactive/TaxNet` or `https://openactive/TaxGross`) is specified within the `Organization` that is included in the REQUIRED `organizer` or `provider` properties. |
| 859 | + |
859 | 860 | - The <a>Broker</a> has machine readable permission to access the relevant instance of a compliant Open Booking API provided by the <a>Booking System</a> via an API key or similar token.
|
860 | 861 |
|
861 | 862 | The <a>Broker</a> MUST NOT attempt to book an opportunity that is not <a>bookable</a> by the above criteria. The <a>Booking System</a> MUST return an error if an `Order` is submitted that contains activities that are not <a>bookable</a>, and include an `error` against each `OrderItem` in the `OrderQuote` that is not <a>bookable</a>.
|
|
1164 | 1165 | <pre class="example" title="Order Creation: OrderQuote example failure response" data-transform="dataExampleOrderQuoteCreationErrorResponse">
|
1165 | 1166 | </pre>
|
1166 | 1167 |
|
1167 |
| -If there are issues with other properties of the `OrderQuote` outside of `orderedItem`, the <a>Booking System</a> MUST respond with a `400 Bad Request` response, which includes only the appropriate `Error`. |
| 1168 | +If there are issues with other properties of the `OrderQuote` outside of `orderedItem`, the <a>Booking System</a> MUST respond with a JSON-LD response which includes only the appropriate `OpenBookingError` and the appropriate status code. |
1168 | 1169 |
|
| 1170 | +<pre class="example" title="Order Creation: OrderQuote example failure response" data-transform="dataExampleOrderQuoteCreationGenericErrorResponse"> |
| 1171 | +</pre> |
1169 | 1172 |
|
1170 | 1173 |
|
1171 | 1174 | #### `Order`
|
|
1573 | 1576 |
|
1574 | 1577 | ## Error Model
|
1575 | 1578 |
|
1576 |
| -### `oa:Error` |
1577 |
| - |
1578 |
| -| Property | Status | Type | Notes | |
1579 |
| -|--------------------------------------------------------------------|-------------|-|------| |
1580 |
| -| `@type` | REQUIRED | [`schema:Text`](https://schema.org/Text) | `Error` | |
1581 |
| -| [`oa:error`](https://openactive.io/error) | REQUIRED | Array of [`oa:OpenBookingError`](https://openactive.io/OpenBookingError) | An array of errors related to the request. | |
1582 |
| - |
1583 | 1579 |
|
1584 | 1580 | ### `oa:OpenBookingError`
|
1585 | 1581 |
|
|
1614 | 1610 |
|
1615 | 1611 | | Error Type | Status Code | Use Case |
|
1616 | 1612 | |---------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
1617 |
| -| `IncompleteOrderItemError` | 400 | If there is a missing `acceptedOffer` or `orderedItem` property on the `schema:OrderItem`. | |
1618 |
| -| `UnacceptableOfferError` | 400 | If the `acceptedOffer` is not a URL which corresponds to an <a>Applicable `Offer`</a> for the opportunity. | |
1619 |
| -| `UnknownOfferError` | 404 | If the `acceptedOffer` is not a URL which corresponds to an `Offer` within the <a>Booking System</a>. | |
1620 |
| -| `UnknownOpportunityDetailsError` | 404 | If the `orderedItem` is not a URL which corresponds to an opportunity on the <a>Booking System</a>. | |
1621 |
| -| `UnavailableOpportunityError` | 400 | If the `Offer` contained in the `acceptedOffer` property is not bookable | |
1622 |
| -| `OpportunityIsFullError` | 400 | If there are no available spaces for the opportunity contained in the `orderedItem` property | |
1623 |
| -| `OpportunityHasInsufficientCapacityError` | 400 | If there are not enough available spaces in the opportunity contained in the `orderedItem` property to fulfil the number requested by the `orderQuantity` property. | |
| 1613 | +| `IncompleteOrderItemError` | 409 | If there is a missing `acceptedOffer` or `orderedItem` property on the `schema:OrderItem`. | |
| 1614 | +| `UnacceptableOfferError` | 409 | If the `acceptedOffer` is not a URL which corresponds to an <a>Applicable `Offer`</a> for the opportunity. | |
| 1615 | +| `UnknownOfferError` | 409 | If the `acceptedOffer` is not a URL which corresponds to an `Offer` within the <a>Booking System</a>. | |
| 1616 | +| `UnknownOpportunityDetailsError` | 409 | If the `orderedItem` is not a URL which corresponds to an opportunity on the <a>Booking System</a>. | |
| 1617 | +| `UnavailableOpportunityError` | 409 | If the `Offer` contained in the `acceptedOffer` property is not bookable | |
| 1618 | +| `OpportunityIsFullError` | 409 | If there are no available spaces for the opportunity contained in the `orderedItem` property | |
| 1619 | +| `OpportunityHasInsufficientCapacityError` | 409 | If there are not enough available spaces in the opportunity contained in the `orderedItem` property to fulfil the number requested by the `orderQuantity` property. | |
1624 | 1620 |
|
1625 | 1621 |
|
1626 | 1622 | #### API authentication
|
|
1732 | 1728 | <pre class="example" title="Error response format">
|
1733 | 1729 | {
|
1734 | 1730 | "@context": "https://openactive.io/",
|
1735 |
| - "type": "Error", |
1736 |
| - "error": [ |
1737 |
| - "type": "IncompleteCustomerDetailsError", |
1738 |
| - "description": "No customer details supplied" |
1739 |
| - ] |
| 1731 | + "type": "IncompleteCustomerDetailsError", |
| 1732 | + "description": "No customer details supplied" |
1740 | 1733 | }
|
1741 | 1734 | </pre>
|
1742 | 1735 |
|
|
0 commit comments