UNPKG

@openactive/data-models

Version:

Data models used to drive that OpenActive validator, developer documentation, and model libraries

300 lines 8.38 kB
{ "type": "Order", "derivedFrom": "https://schema.org/Order", "hasId": true, "sampleId": "https://api.example.com/orders/1a80eca5-99f1-4e9a-81da-937e5621b246", "validationMode": { "PRequest": "request", "PResponse": "response", "PResponseOrderItemError": "response", "BRequest": "request", "BOrderProposalRequest": "orderProposalRequest", "BResponse": "response", "BResponseOrderItemError": "response_error", "OrderProposalPatch": "request", "OrderPatch": "cancellation", "OrdersFeed": "ordersFeed", "OrderProposalsFeed": "ordersFeed", "OrderStatus": "response" }, "imperativeConfiguration": { "request": { "requiredFields": [ "type", "brokerRole", "orderedItem", "totalPaymentDue", "seller" ], "recommendedFields": [], "shallNotInclude": [ "id", "identifier", "orderNumber", "bookingService", "totalPaymentTax", "orderCreationStatus", "orderProposalVersion" ], "requiredOptions": [], "referencedFields": [ "seller" ] }, "orderProposalRequest": { "requiredFields": [ "type", "orderProposalVersion" ], "recommendedFields": [], "shallNotInclude": [ "id", "identifier", "seller", "orderNumber", "bookingService", "totalPaymentTax", "orderCreationStatus", "brokerRole", "customer", "orderedItem", "totalPaymentDue" ], "requiredOptions": [] }, "response": { "requiredFields": [ "type", "id", "seller", "brokerRole", "orderedItem", "totalPaymentDue" ], "recommendedFields": [ "bookingService" ], "shallNotInclude": [ "orderCreationStatus", "orderProposalVersion" ], "shallNotBeReferencedFields": [ "seller" ] }, "response_error": { "requiredFields": [ "type", "seller", "brokerRole", "orderedItem", "totalPaymentDue" ], "recommendedFields": [ "bookingService" ], "shallNotInclude": [ "orderCreationStatus", "orderProposalVersion" ], "shallNotBeReferencedFields": [ "seller" ] }, "ordersFeed": { "requiredFields": [ "type", "id", "identifier", "orderedItem", "totalPaymentDue" ], "recommendedFields": [], "shallNotInclude": [ "orderCreationStatus", "broker", "brokerRole", "bookingService", "customer", "orderProposalVersion", "orderNumber", "payment", "seller" ] }, "cancellation": { "requiredFields": [ "type", "orderedItem" ], "recommendedFields": [], "shallNotInclude": [ "id", "identifier", "seller", "orderNumber", "bookingService", "totalPaymentTax", "orderCreationStatus", "orderProposalVersion", "broker", "brokerRole", "customer", "totalPaymentDue" ], "requiredOptions": [] } }, "inSpec": [ "type", "id", "identifier", "seller", "taxCalculationExcluded", "broker", "brokerRole", "orderNumber", "customer", "bookingService", "orderedItem", "totalPaymentDue", "totalPaymentTax", "payment", "orderCreationStatus", "orderProposalVersion" ], "fields": { "type": { "fieldName": "type", "requiredType": "https://schema.org/Text", "requiredContent": "Order" }, "identifier": { "fieldName": "identifier", "sameAs": "https://schema.org/identifier", "requiredType": "https://schema.org/Text", "example": "123e4567-e89b-12d3-a456-426614174000", "description": [ "The Order UUID of the Order, OrderQuote or OrderProposal, which is required within the Orders feed." ], "valueConstraint": "UUID" }, "seller": { "fieldName": "seller", "sameAs": "https://schema.org/seller", "model": "#Organization", "alternativeModels": [ "#Person" ], "allowReferencing": true, "requireReferencingInValidationMode": [ "C1Request", "C2Request", "PRequest", "BRequest" ], "description": [ "The organisation (schema:Organization) or person (schema:Person) providing access to events or facilities via a Booking System. e.g. a leisure provider or independent instructor running a yoga classes." ] }, "taxCalculationExcluded": { "fieldName": "taxCalculationExcluded", "requiredType": "https://schema.org/Boolean", "description": [ "Set to true when business-to-business tax calculation is required by the seller or brokerRole settings, but not supported by the Broker." ], "sameAs": "https://openactive.io/taxCalculationExcluded" }, "broker": { "fieldName": "broker", "sameAs": "https://schema.org/broker", "model": "#Organization", "description": [ "The organisation or developer providing an application that allows Customers to make bookings. Those applications will be clients of the API defined in this specification. If brokerRole is set to https://openactive.io/NoBroker this is not required." ] }, "brokerRole": { "fieldName": "brokerRole", "sameAs": "https://openactive.io/brokerRole", "requiredType": "https://openactive.io/BrokerType", "description": [ "Either https://openactive.io/AgentBroker, https://openactive.io/ResellerBroker or https://openactive.io/NoBroker, as agreed in advance between the Broker and Seller." ] }, "orderNumber": { "fieldName": "orderNumber", "sameAs": "https://schema.org/orderNumber", "requiredType": "https://schema.org/Text", "description": [ "The Customer-facing identifier of the Order." ] }, "customer": { "fieldName": "customer", "sameAs": "https://schema.org/customer", "model": "#Person", "alternativeModels": [ "#Organization" ], "description": [ "The person or organization purchasing the Order." ] }, "bookingService": { "fieldName": "bookingService", "sameAs": "https://openactive.io/bookingService", "model": "#BookingService", "description": [ "Details about the Booking System" ] }, "orderedItem": { "fieldName": "orderedItem", "sameAs": "https://schema.org/orderedItem", "model": "ArrayOf#OrderItem", "description": [ "The items that constitute the Order." ] }, "totalPaymentTax": { "fieldName": "totalPaymentTax", "sameAs": "https://openactive.io/totalPaymentTax", "model": "ArrayOf#TaxChargeSpecification", "description": [ "Breakdown of tax payable for the Order." ] }, "payment": { "fieldName": "payment", "sameAs": "https://openactive.io/payment", "model": "#Payment", "description": [ "The payment associated with the Order by the Broker. It is required for cases where a payment has been taken." ] }, "orderCreationStatus": { "fieldName": "orderCreationStatus", "sameAs": "https://openactive.io/orderCreationStatus", "requiredType": "https://openactive.io/OrderCreationStatus", "description": [ "This property is internal to the Broker in this version of the specification." ] }, "orderProposalVersion": { "fieldName": "orderProposalVersion", "requiredType": "https://schema.org/URL", "sameAs": "https://openactive.io/orderProposalVersion", "description": [ "The unique URL representing this version of the OrderProposal, or the version of the OrderProposal to which this Order is related." ] }, "totalPaymentDue": { "fieldName": "totalPaymentDue", "sameAs": "https://schema.org/totalPaymentDue", "model": "#PriceSpecification", "description": [ "" ] } } }