UNPKG

@openactive/data-models

Version:

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

420 lines (419 loc) 11.6 kB
{ "type": "OrderItem", "derivedFrom": "https://schema.org/OrderItem", "hasId": true, "sampleId": "https://api.example.com/orders/1a80eca5-99f1-4e9a-81da-937e5621b246#/orderedItem/12345", "validationMode": { "C1Request": "request", "C1Response": "Cresponse", "C1ResponseOrderItemError": "Cresponse_error", "C2Request": "request", "C2Response": "Cresponse", "C2ResponseOrderItemError": "Cresponse_error", "PRequest": "request", "PResponse": "Presponse", "PResponseOrderItemError": "Presponse_error", "BRequest": "request", "BResponse": "response", "BResponseOrderItemError": "response_error", "OrderProposalPatch": "request", "OrderPatch": "cancellation", "OrdersFeed": "ordersFeed", "OrderProposalsFeed": "orderProposalsFeed", "OrderStatus": "orderStatus" }, "imperativeConfiguration": { "request": { "requiredFields": [ "type", "acceptedOffer", "orderedItem", "position" ], "recommendedFields": [], "shallNotInclude": [ "id", "orderItemStatus", "unitTaxSpecification", "accessCode", "error", "cancellationMessage", "customerNotice", "orderItemIntakeForm" ], "requiredOptions": [], "referencedFields": [ "orderedItem", "acceptedOffer" ] }, "Cresponse": { "requiredFields": [ "type", "acceptedOffer", "orderedItem", "position" ], "shallNotInclude": [ "id", "orderItemStatus", "cancellationMessage", "customerNotice", "accessCode", "accessPass", "error" ], "requiredOptions": [], "shallNotBeReferencedFields": [ "orderedItem", "acceptedOffer" ] }, "Cresponse_error": { "requiredFields": [ "type", "acceptedOffer", "orderedItem", "position" ], "shallNotInclude": [ "id", "orderItemStatus", "cancellationMessage", "customerNotice", "accessCode", "accessPass" ], "requiredOptions": [] }, "response": { "requiredFields": [ "type", "id", "orderItemStatus", "acceptedOffer", "orderedItem" ], "recommendedFields": [ "accessCode", "accessPass", "accessChannel" ], "shallNotInclude": [ "cancellationMessage", "customerNotice", "error" ], "requiredOptions": [], "shallNotBeReferencedFields": [ "orderedItem", "acceptedOffer" ] }, "response_error": { "requiredFields": [ "type", "acceptedOffer", "orderedItem" ], "recommendedFields": [ "accessCode", "accessPass", "accessChannel" ], "shallNotInclude": [ "cancellationMessage", "customerNotice" ], "requiredOptions": [] }, "Presponse": { "requiredFields": [ "type", "id", "acceptedOffer", "orderedItem", "position" ], "recommendedFields": [], "shallNotInclude": [ "cancellationMessage", "customerNotice", "orderItemStatus", "accessCode", "accessPass", "accessChannel", "error" ], "requiredOptions": [], "shallNotBeReferencedFields": [ "orderedItem", "acceptedOffer" ] }, "Presponse_error": { "requiredFields": [ "type", "acceptedOffer", "orderedItem", "position" ], "recommendedFields": [], "shallNotInclude": [ "cancellationMessage", "customerNotice", "orderItemStatus", "accessCode", "accessPass", "accessChannel" ], "requiredOptions": [] }, "orderStatus": { "requiredFields": [ "type", "id", "orderItemStatus", "acceptedOffer", "orderedItem" ], "recommendedFields": [ "accessCode", "accessPass", "accessChannel" ], "shallNotInclude": [ "position" ], "requiredOptions": [], "shallNotBeReferencedFields": [ "orderedItem", "acceptedOffer" ] }, "ordersFeed": { "requiredFields": [ "type", "id", "orderItemStatus" ], "recommendedFields": [ "accessCode", "accessPass", "accessChannel" ], "shallNotInclude": [ "attendee", "attendeeDetailsRequired", "orderItemIntakeForm", "orderItemIntakeFormResponse", "position" ], "requiredOptions": [] }, "orderProposalsFeed": { "requiredFields": [ "type", "id" ], "recommendedFields": [], "shallNotInclude": [ "attendee", "attendeeDetailsRequired", "position", "accessCode", "accessPass", "accessChannel", "orderItemStatus", "cancellationMessage", "customerNotice" ], "requiredOptions": [] }, "cancellation": { "requiredFields": [ "type", "id", "orderItemStatus" ], "recommendedFields": [], "shallNotInclude": [ "unitTaxSpecification", "accessCode", "accessPass", "error", "cancellationMessage", "customerNotice", "orderItemIntakeForm", "acceptedOffer", "orderedItem", "position" ], "requiredOptions": [], "referencedFields": [ "orderedItem", "acceptedOffer" ] } }, "inSpec": [ "id", "type", "position", "orderItemStatus", "unitTaxSpecification", "acceptedOffer", "orderedItem", "accessCode", "accessPass", "accessChannel", "error", "cancellationMessage", "customerNotice", "attendee", "attendeeDetailsRequired", "orderItemIntakeForm", "orderItemIntakeFormResponse" ], "fields": { "type": { "fieldName": "type", "requiredType": "https://schema.org/Text", "requiredContent": "OrderItem" }, "position": { "fieldName": "position", "sameAs": "https://schema.org/position", "requiredType": "https://schema.org/Integer", "description": [ "An integer representing the order of OrderItems within the array." ] }, "orderItemStatus": { "fieldName": "orderItemStatus", "sameAs": "https://schema.org/orderItemStatus", "requiredType": "https://openactive.io/OrderItemStatus", "description": [] }, "unitTaxSpecification": { "fieldName": "unitTaxSpecification", "sameAs": "https://openactive.io/unitTaxSpecification", "model": "ArrayOf#TaxChargeSpecification", "description": [ "Breakdown of tax payable for the OrderItem." ] }, "acceptedOffer": { "fieldName": "acceptedOffer", "sameAs": "https://schema.org/acceptedOffer", "model": "#Offer", "allowReferencing": true, "requireReferencingInValidationMode": [ "C1Request", "C2Request", "PRequest", "BRequest", "OrdersFeed" ], "description": [ "The offer from the associated orderedItem that has been selected by the Customer. The price of this includes or excludes tax depending on the taxMode of the Order." ] }, "orderedItem": { "fieldName": "orderedItem", "sameAs": "https://schema.org/orderedItem", "model": "#Event", "allowReferencing": true, "requireReferencingInValidationMode": [ "C1Request", "C2Request", "PRequest", "BRequest", "OrdersFeed" ], "description": [ "The specific bookable Thing that has been selected by the Customer. See the [Modelling-Opportunity-Data] for more information on these types. Note that the Broker Request and Orders feed only require id within these objects to be included; in these contexts, all other properties are ignored." ] }, "accessCode": { "fieldName": "accessCode", "sameAs": "https://schema.org/accessCode", "model": "ArrayOf#PropertyValue", "description": [ "PropertyValue that contains a text value usable for entrance. Not applicable for an OrderQuote." ] }, "accessPass": { "fieldName": "accessPass", "sameAs": "https://openactive.io/accessPass", "model": "ArrayOf#ImageObject", "description": [ "ImageObject or Barcode that contains reference to an asset (e.g. Barcode, QR code image or PDF) usable for entrance. Not applicable for an OrderQuote." ] }, "accessChannel": { "fieldName": "accessChannel", "sameAs": "https://openactive.io/accessChannel", "model": "#VirtualLocation", "description": [ "Channel through which the user can participate in the Opportunity. Not applicable for an OrderQuote." ] }, "error": { "fieldName": "error", "sameAs": "https://schema.org/error", "model": "ArrayOf#OpenBookingError", "description": [ "Array of errors related to the OrderItem being included in the Order, only applicable for an OrderQuote." ] }, "cancellationMessage": { "fieldName": "cancellationMessage", "sameAs": "https://openactive.io/cancellationMessage", "requiredType": "https://schema.org/Text", "description": [ "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`" ] }, "customerNotice": { "fieldName": "customerNotice", "sameAs": "https://openactive.io/customerNotice", "requiredType": "https://schema.org/Text", "description": [ "A message set by the Seller to trigger a notification to the Customer, only applicable for an `Order` and where the `OrderItem` has `orderItemStatus` set to `https://openactive.io/OrderItemConfirmed` or `https://openactive.io/CustomerAttended`" ] }, "attendee": { "fieldName": "attendee", "sameAs": "https://schema.org/attendee", "model": "#Person", "description": [ "The person attending the Opportunity related to the OrderItem." ] }, "attendeeDetailsRequired": { "fieldName": "attendeeDetailsRequired", "sameAs": "https://openactive.io/attendeeDetailsRequired", "requiredType": "ArrayOf#https://schema.org/Property", "description": [ "The properties of `schema:Person` that are required to describe an `attendee` for this `OrderItem`." ] }, "orderItemIntakeForm": { "fieldName": "orderItemIntakeForm", "sameAs": "https://openactive.io/orderItemIntakeForm", "model": "ArrayOf#PropertyValueSpecification", "description": [ "PropertyValueSpecifications that describe fields in the orderItemIntakeForm." ] }, "orderItemIntakeFormResponse": { "fieldName": "orderItemIntakeFormResponse", "sameAs": "https://openactive.io/orderItemIntakeFormResponse", "model": "ArrayOf#PropertyValue", "description": [ "PropertyValues that contains a text value responses to the orderItemIntakeForm." ] } } }