@openactive/data-models
Version:
Data models used to drive that OpenActive validator, developer documentation, and model libraries
295 lines • 11 kB
JSON
{
"type": "Offer",
"derivedFrom": "https://schema.org/Offer",
"hasId": true,
"sampleId": "https://api.example.com/session-series/12345#/offers/2",
"validationMode": {
"RPDEFeed": "opendata",
"BookableRPDEFeed": "bookableopendata",
"C1Request": "request",
"C1Response": "response",
"C1ResponseOrderItemError": "response",
"C2Request": "request",
"C2Response": "response",
"C2ResponseOrderItemError": "response",
"PRequest": "request",
"PResponse": "response",
"PResponseOrderItemError": "response",
"BRequest": "request",
"BResponse": "response",
"BResponseOrderItemError": "response",
"OrderProposalPatch": "request",
"OrderPatch": "request",
"OrdersFeed": "response",
"OrderProposalsFeed": "response",
"OrderStatus": "response"
},
"imperativeConfiguration": {
"opendata": {
"requiredFields": [
"type",
"price"
],
"recommendedFields": [
"name",
"ageRestriction"
]
},
"bookableopendata": {
"requiredFields": [
"id",
"type",
"price"
],
"recommendedFields": [
"name",
"ageRestriction",
"allowCustomerCancellationFullRefund"
],
"shallNotInclude": [
"ageRange"
]
},
"request": {
"requiredFields": [
"id",
"type"
],
"shallNotInclude": [
"price",
"priceCurrency",
"name",
"ageRange",
"ageRestriction",
"openBookingInAdvance",
"openBookingPrepayment",
"acceptedPaymentMethod",
"validFromBeforeStartDate",
"validThroughBeforeStartDate",
"latestCancellationBeforeStartDate",
"allowCustomerCancellationFullRefund",
"openBookingFlowRequirement",
"identifier",
"description",
"url"
]
},
"response": {
"requiredFields": [
"id",
"type",
"price"
],
"recommendedFields": [
"name",
"ageRestriction",
"allowCustomerCancellationFullRefund"
],
"shallNotInclude": [
"ageRange"
]
}
},
"inSpec": [
"id",
"type",
"price",
"priceCurrency",
"name",
"ageRange",
"ageRestriction",
"openBookingInAdvance",
"openBookingPrepayment",
"acceptedPaymentMethod",
"validFromBeforeStartDate",
"validThroughBeforeStartDate",
"latestCancellationBeforeStartDate",
"allowCustomerCancellationFullRefund",
"openBookingFlowRequirement",
"identifier",
"description",
"url",
"eligibleEntitlementType"
],
"fields": {
"type": {
"fieldName": "type",
"requiredType": "https://schema.org/Text",
"requiredContent": "Offer"
},
"price": {
"fieldName": "price",
"sameAs": "https://schema.org/price",
"requiredType": "https://schema.org/Number",
"example": 33,
"maxDecimalPlaces": 2,
"description": [
"The offer price of the activity.",
"This price should be specified without currency symbols and as a floating point number with two decimal places.",
"The currency of the price should be expressed in the priceCurrency field.",
"Includes or excludes tax depending on the taxMode of the seller."
]
},
"priceCurrency": {
"fieldName": "priceCurrency",
"sameAs": "https://schema.org/priceCurrency",
"requiredType": "https://schema.org/Text",
"description": [
"The currency of the price. Specified as a 3-letter ISO 4217 value. If an Offer has a zero price, then this property is not required. Otherwise the priceCurrency must be specified."
],
"example": "GBP"
},
"name": {
"fieldName": "name",
"sameAs": "https://schema.org/name",
"requiredType": "https://schema.org/Text",
"description": [
"The name of the Offer suitable for communication to participants."
],
"example": "Speedball winger position"
},
"identifier": {
"fieldName": "identifier",
"sameAs": "https://schema.org/identifier",
"alternativeModels": [
"#PropertyValue",
"ArrayOf#PropertyValue"
],
"requiredType": "https://schema.org/Text",
"alternativeTypes": [
"https://schema.org/Integer"
],
"example": "SB1234",
"description": [
"A local non-URI identifier for the resource"
]
},
"ageRange": {
"fieldName": "ageRange",
"sameAs": "https://openactive.io/ageRange",
"model": "#QuantitativeValue",
"description": [
"Indicates that an Offer is only applicable to a specific age range."
],
"deprecationGuidance": "Use `ageRestriction` instead of `ageRange` within the `Offer` for cases where the `Offer` is age restricted."
},
"ageRestriction": {
"fieldName": "ageRestriction",
"sameAs": "https://openactive.io/ageRestriction",
"model": "#QuantitativeValue",
"description": [
"Indicates that an Offer can only be purchased by participants within a specific age range. Specified as a QuantitativeValue with minValue and maxValue properties. This must be displayed prominently to the user when selecting an `Offer` or before booking."
],
"example": {
"@type": "QuantitativeValue",
"minValue": 15,
"maxValue": 60
}
},
"acceptedPaymentMethod": {
"fieldName": "acceptedPaymentMethod",
"sameAs": "https://schema.org/acceptedPaymentMethod",
"requiredType": "ArrayOf#http://purl.org/goodrelations/v1#PaymentMethod",
"description": [
"Indicates the offline payment methods accepted by this provider."
],
"example": [
"http://purl.org/goodrelations/v1#Cash",
"http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
]
},
"openBookingInAdvance": {
"fieldName": "openBookingInAdvance",
"requiredType": "https://openactive.io/RequiredStatusType",
"description": [
"Indicates whether to accept this offer, a participant must book in advance, whether they must pay on attending, or have option to do either. Values must be one of https://openactive.io/Required, https://openactive.io/Optional or https://openactive.io/Unavailable."
],
"example": "https://openactive.io/Required",
"sameAs": "https://openactive.io/openBookingInAdvance"
},
"description": {
"fieldName": "description",
"sameAs": "https://schema.org/description",
"requiredType": "https://schema.org/Text",
"example": "Concession requirements are available at https://www.fusion-lifestyle.com/. Proof of entitlement to concession membership must be provided when you visit the centre.",
"description": [
"A plain text description of the Offer, which must not include HTML or other markup."
]
},
"openBookingPrepayment": {
"fieldName": "openBookingPrepayment",
"sameAs": "https://openactive.io/openBookingPrepayment",
"requiredType": "https://openactive.io/RequiredStatusType",
"description": [
"Indicates whether to accept this offer, a participant must pay in advance, pay when attending, or have the option to do either. Values must be one of https://openactive.io/Required, https://openactive.io/Optional or https://openactive.io/Unavailable."
],
"example": "https://openactive.io/Required"
},
"validFromBeforeStartDate": {
"fieldName": "validFromBeforeStartDate",
"sameAs": "https://openactive.io/validFromBeforeStartDate",
"requiredType": "https://schema.org/Duration",
"description": [
"The duration before the `startDate` for which this `Offer` is valid, given in ISO 8601 format. This is a relatively-defined equivalent of `schema:validFrom`, to allow for `Offer` inheritance."
]
},
"validThroughBeforeStartDate": {
"fieldName": "validThroughBeforeStartDate",
"sameAs": "https://openactive.io/validThroughBeforeStartDate",
"requiredType": "https://schema.org/Duration",
"description": [
"The duration before the `startDate` after which the `Offer` is no longer valid, given in ISO 8601 format. This is a relatively-defined equivalent of `schema:validThrough`, to allow for `Offer` inheritance."
]
},
"latestCancellationBeforeStartDate": {
"fieldName": "latestCancellationBeforeStartDate",
"sameAs": "https://openactive.io/latestCancellationBeforeStartDate",
"requiredType": "https://schema.org/Duration",
"description": [
"The duration before the startDate during which this Offer may not be cancelled, given in ISO 8601 format."
]
},
"allowCustomerCancellationFullRefund": {
"fieldName": "allowCustomerCancellationFullRefund",
"sameAs": "https://openactive.io/allowCustomerCancellationFullRefund",
"requiredType": "https://schema.org/Boolean",
"description": [
"Whether the opportunity can be cancelled with a full refund at any time before the `startDate`, or before the `latestCancellationBeforeStartDate` if provided."
]
},
"openBookingFlowRequirement": {
"fieldName": "openBookingFlowRequirement",
"requiredType": "ArrayOf#https://openactive.io/OpenBookingFlowRequirement",
"description": [
"Can include https://openactive.io/OpenBookingIntakeForm, https://openactive.io/OpenBookingAttendeeDetails, https://openactive.io/OpenBookingApproval, https://openactive.io/OpenBookingNegotiation, https://openactive.io/OpenBookingMessageExchange"
],
"sameAs": "https://openactive.io/openBookingFlowRequirement"
},
"url": {
"fieldName": "url",
"sameAs": "https://schema.org/url",
"requiredType": "https://schema.org/URL",
"example": "http://www.rphs.org.uk/",
"description": [
"URL describing the offer"
]
},
"eligibleEntitlementType": {
"fieldName": "eligibleEntitlementType",
"sameAs": "https://openactive.io/eligibleEntitlementType",
"model": "ArrayOf#Concept",
"description": [
"Offers in open data can be marked as requiring an entitlement type via `eligibleEntitlementType`. The same Offer may be applicable to multiple entitlement types, and the Customer must have at least one matching entitlement type to qualify for the Offer.",
"Note that this property is in EARLY RELEASE AND IS SUBJECT TO CHANGE, as the [Customer Accounts proposal](https://github.com/openactive/customer-accounts) evolves."
],
"example": [
{
"@type": "Concept",
"@id": "https://data.mcractive.com/openactive/entitlement-list#5e78bcbe-36db-425a-9064-bf96d09cc351",
"prefLabel": "MCRactive Adult Resident",
"inScheme": "https://data.mcractive.com/openactive/entitlement-list"
}
]
}
}
}