< Return to Summary | File Generated: Thu Mar 28 2024 10:16:27 GMT+0000 (Coordinated Universal Time)

customer-requested-cancellation >> atomic-cancel (OpenBookingApprovalFlow >> ScheduledSession)

Booking Flow: OpenBookingApprovalFlow

Opportunity Type: ScheduledSession

Feature: Cancellation / Customer Requested Cancellation (Implemented)

Test: Successful booking and successful cancellation after atomic failed cancellation request

After a successful booking, and an unsuccessful but atomic cancellation request, successfully cancel, including checking the Orders feed. Atomic means that the cancellation request either entirely succeeds (all OrderItems items are cancelled) or entirely fails (no OrderItems are cancelled), which is generally best achieved by wrapping code in a database transaction.

Running only this test

npm start -- --runInBand test/features/cancellation/customer-requested-cancellation/implemented/atomic-cancel-test.js

Is this test failing?

The OpenActive Reference Implementation test result for this test can be used as a reference to help with debugging.


⚠️ 45 passed with 0 failures, 294 warnings and 180 suggestions


✅ Fetch Opportunities

Booking System Test Interface for OrderItem 0 Request

POST https://localhost:5001/api/openbooking/test-interface/datasets/uat-ci/opportunities

{
  "@type": "ScheduledSession",
  "superEvent": {
    "@type": "SessionSeries",
    "organizer": {
      "@type": "Organization",
      "@id": "https://localhost:5001/api/identifiers/sellers/1"
    }
  },
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "test:testOpportunityCriteria": "https://openactive.io/test-interface#TestOpportunityBookableCancellable",
  "test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingApprovalFlow"
}

Response status code: 200 OK. Responded in 26.153813ms.

{
  "@context": "https://openactive.io/",
  "@type": "ScheduledSession",
  "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039"
}

Booking System Test Interface for OrderItem 1 Request

POST https://localhost:5001/api/openbooking/test-interface/datasets/uat-ci/opportunities

{
  "@type": "ScheduledSession",
  "superEvent": {
    "@type": "SessionSeries",
    "organizer": {
      "@type": "Organization",
      "@id": "https://localhost:5001/api/identifiers/sellers/1"
    }
  },
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "test:testOpportunityCriteria": "https://openactive.io/test-interface#TestOpportunityBookableCancellable",
  "test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingApprovalFlow"
}

Response status code: 200 OK. Responded in 37.26242ms.

{
  "@context": "https://openactive.io/",
  "@type": "ScheduledSession",
  "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040"
}

Booking System Test Interface for OrderItem 2 Request

POST https://localhost:5001/api/openbooking/test-interface/datasets/uat-ci/opportunities

{
  "@type": "ScheduledSession",
  "superEvent": {
    "@type": "SessionSeries",
    "organizer": {
      "@type": "Organization",
      "@id": "https://localhost:5001/api/identifiers/sellers/1"
    }
  },
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "test:testOpportunityCriteria": "https://openactive.io/test-interface#TestOpportunityBookableNotCancellable",
  "test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingApprovalFlow"
}

Response status code: 200 OK. Responded in 35.839698ms.

{
  "@context": "https://openactive.io/",
  "@type": "ScheduledSession",
  "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041"
}

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2039%2Fevents%2F20039?useCacheIfAvailable=true


Response status code: 200 OK. Responded in 657.111921ms.

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
  "modified": "1711621020232",
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2039",
      "identifier": 2039,
      "name": "GOLDEN: [OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/2",
        "identifier": 2,
        "name": "Premier Lifters",
        "description": "Where your Fitness Goals are Always Inn-Sight. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1BB",
          "streetAddress": "Greyfriars Court, Paradise Square"
        },
        "amenityFeature": [
          {
            "@type": "ChangingFacilities",
            "name": "Changing Facilities",
            "value": false
          },
          {
            "@type": "Showers",
            "name": "Showers",
            "value": false
          },
          {
            "@type": "Lockers",
            "name": "Lockers",
            "value": false
          },
          {
            "@type": "Towels",
            "name": "Towels",
            "value": true
          },
          {
            "@type": "Creche",
            "name": "Creche",
            "value": true
          },
          {
            "@type": "Parking",
            "name": "Parking",
            "value": true
          }
        ],
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.7504933,
          "longitude": -1.2620685
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/5/53/Cambridge_Orchard_Park_Premier_Inn.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000002",
        "url": "https://en.wikipedia.org/wiki/Premier_Inn"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "07443 214332",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://abigail.net"
      },
      "url": "https://www.example.com/sessions/2039"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 10
  }
}

Opportunity Feed extract for OrderItem 1 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2040%2Fevents%2F20040?useCacheIfAvailable=true


Response status code: 200 OK. Responded in 659.027351ms.

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
  "modified": "1711621020236",
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2040",
      "identifier": 2040,
      "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/3",
        "identifier": 3,
        "name": "Stroll & Stretch",
        "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1UU",
          "streetAddress": "Norfolk Street"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.749826,
          "longitude": -1.261492
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000003",
        "url": "https://en.wikipedia.org/wiki/Shopping_center"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "02398 352107",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://mazie.org"
      },
      "url": "https://www.example.com/sessions/2040"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 10
  }
}

Opportunity Feed extract for OrderItem 2 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2041%2Fevents%2F20041?useCacheIfAvailable=true


Response status code: 200 OK. Responded in 659.374718ms.

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
  "modified": "1711621020237",
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2041",
      "identifier": 2041,
      "name": "GOLDEN: [OPEN BOOKING API TEST INTERFACE] Bookable Paid That Does Not Allow Full Refund",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/3",
        "identifier": 3,
        "name": "Stroll & Stretch",
        "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1UU",
          "streetAddress": "Norfolk Street"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.749826,
          "longitude": -1.261492
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000003",
        "url": "https://en.wikipedia.org/wiki/Shopping_center"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "06133 489973",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://griffin.biz"
      },
      "url": "https://www.example.com/sessions/2041"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 10
  }
}

Specs

✅ Fetch Opportunities >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Fetch Opportunities >> validation of Opportunity Feed extract for OrderItem 1

Specs

Validations

✅ Fetch Opportunities >> validation of Opportunity Feed extract for OrderItem 2

Specs

Validations

✅ C1

C1 Request

PUT https://localhost:5001/api/openbooking/order-quote-templates/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "brokerRole": "https://openactive.io/AgentBroker",
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com",
    "description": "A fitness app for all the community",
    "logo": {
      "@type": "ImageObject",
      "url": "http://data.myfitnessapp.org.uk/images/logo.png"
    },
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Village East",
      "addressRegion": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    }
  },
  "seller": "https://localhost:5001/api/identifiers/sellers/1",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039"
    },
    {
      "@type": "OrderItem",
      "position": 1,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040"
    },
    {
      "@type": "OrderItem",
      "position": 2,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

Response status code: 200 OK. Responded in 96.655877ms.

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-28T10:22:02+00:00"
  },
  "orderRequiresApproval": true,
  "bookingService": {
    "@type": "BookingService",
    "name": "Acme booking system",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ],
    "url": "https://example.com"
  },
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com"
  },
  "brokerRole": "https://openactive.io/AgentBroker",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/2",
            "identifier": 2,
            "name": "Premier Lifters",
            "description": "Where your Fitness Goals are Always Inn-Sight. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1BB",
              "streetAddress": "Greyfriars Court, Paradise Square"
            },
            "amenityFeature": [
              {
                "@type": "ChangingFacilities",
                "name": "Changing Facilities",
                "value": false
              },
              {
                "@type": "Showers",
                "name": "Showers",
                "value": false
              },
              {
                "@type": "Lockers",
                "name": "Lockers",
                "value": false
              },
              {
                "@type": "Towels",
                "name": "Towels",
                "value": true
              },
              {
                "@type": "Creche",
                "name": "Creche",
                "value": true
              },
              {
                "@type": "Parking",
                "name": "Parking",
                "value": true
              }
            ],
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.7504933,
              "longitude": -1.2620685
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/5/53/Cambridge_Orchard_Park_Premier_Inn.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000002",
            "url": "https://en.wikipedia.org/wiki/Premier_Inn"
          },
          "url": "https://example.com/events/2039"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    },
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/3",
            "identifier": 3,
            "name": "Stroll & Stretch",
            "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1UU",
              "streetAddress": "Norfolk Street"
            },
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.749826,
              "longitude": -1.261492
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000003",
            "url": "https://en.wikipedia.org/wiki/Shopping_center"
          },
          "url": "https://example.com/events/2040"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 1,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    },
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "price": 10,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid That Does Not Allow Full Refund",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/3",
            "identifier": 3,
            "name": "Stroll & Stretch",
            "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1UU",
              "streetAddress": "Norfolk Street"
            },
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.749826,
              "longitude": -1.261492
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000003",
            "url": "https://en.wikipedia.org/wiki/Shopping_center"
          },
          "url": "https://example.com/events/2041"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 2,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  },
  "seller": {
    "@type": "Organization",
    "@id": "https://localhost:5001/api/identifiers/sellers/1",
    "name": "Acme Fitness Ltd",
    "address": {
      "@type": "PostalAddress",
      "addressCountry": "GB",
      "addressLocality": "Another town",
      "addressRegion": "Oxfordshire",
      "postalCode": "OX1 1AA",
      "streetAddress": "1 Hidden Gem"
    },
    "isOpenBookingAllowed": true,
    "legalName": "Acme Fitness Ltd",
    "taxMode": "https://openactive.io/TaxGross",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ]
  },
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "openBookingPrepayment": "https://openactive.io/Required",
    "price": 39.98,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 7.996,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ C1 >> validation of C1

Specs

Validations

✅ Assert Opportunity Capacity (after C1)

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2039%2Fevents%2F20039?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 26.741529ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2039",
      "identifier": 2039,
      "name": "GOLDEN: [OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/2",
        "identifier": 2,
        "name": "Premier Lifters",
        "description": "Where your Fitness Goals are Always Inn-Sight. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1BB",
          "streetAddress": "Greyfriars Court, Paradise Square"
        },
        "amenityFeature": [
          {
            "@type": "ChangingFacilities",
            "name": "Changing Facilities",
            "value": false
          },
          {
            "@type": "Showers",
            "name": "Showers",
            "value": false
          },
          {
            "@type": "Lockers",
            "name": "Lockers",
            "value": false
          },
          {
            "@type": "Towels",
            "name": "Towels",
            "value": true
          },
          {
            "@type": "Creche",
            "name": "Creche",
            "value": true
          },
          {
            "@type": "Parking",
            "name": "Parking",
            "value": true
          }
        ],
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.7504933,
          "longitude": -1.2620685
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/5/53/Cambridge_Orchard_Park_Premier_Inn.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000002",
        "url": "https://en.wikipedia.org/wiki/Premier_Inn"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "07443 214332",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://abigail.net"
      },
      "url": "https://www.example.com/sessions/2039"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Opportunity Feed extract for OrderItem 1 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2040%2Fevents%2F20040?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 25.777972ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2040",
      "identifier": 2040,
      "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/3",
        "identifier": 3,
        "name": "Stroll & Stretch",
        "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1UU",
          "streetAddress": "Norfolk Street"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.749826,
          "longitude": -1.261492
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000003",
        "url": "https://en.wikipedia.org/wiki/Shopping_center"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "02398 352107",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://mazie.org"
      },
      "url": "https://www.example.com/sessions/2040"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Opportunity Feed extract for OrderItem 2 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2041%2Fevents%2F20041?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 12.882164ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2041",
      "identifier": 2041,
      "name": "GOLDEN: [OPEN BOOKING API TEST INTERFACE] Bookable Paid That Does Not Allow Full Refund",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/3",
        "identifier": 3,
        "name": "Stroll & Stretch",
        "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1UU",
          "streetAddress": "Norfolk Street"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.749826,
          "longitude": -1.261492
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000003",
        "url": "https://en.wikipedia.org/wiki/Shopping_center"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "06133 489973",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://griffin.biz"
      },
      "url": "https://www.example.com/sessions/2041"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Specs

✅ Assert Opportunity Capacity (after C1) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Assert Opportunity Capacity (after C1) >> validation of Opportunity Feed extract for OrderItem 1

Specs

Validations

✅ Assert Opportunity Capacity (after C1) >> validation of Opportunity Feed extract for OrderItem 2

Specs

Validations

✅ C2

C2 Request

PUT https://localhost:5001/api/openbooking/order-quotes/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "brokerRole": "https://openactive.io/AgentBroker",
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com",
    "description": "A fitness app for all the community",
    "logo": {
      "@type": "ImageObject",
      "url": "http://data.myfitnessapp.org.uk/images/logo.png"
    },
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Village East",
      "addressRegion": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    }
  },
  "seller": "https://localhost:5001/api/identifiers/sellers/1",
  "customer": {
    "@type": "Person",
    "email": "[email protected]",
    "familyName": "Jeanette",
    "identifier": "07169a73-821b-4474-9aca-17b0b134efb8"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039"
    },
    {
      "@type": "OrderItem",
      "position": 1,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040"
    },
    {
      "@type": "OrderItem",
      "position": 2,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

Response status code: 200 OK. Responded in 45.748316ms.

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-28T10:22:05+00:00"
  },
  "orderRequiresApproval": true,
  "bookingService": {
    "@type": "BookingService",
    "name": "Acme booking system",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ],
    "url": "https://example.com"
  },
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com"
  },
  "brokerRole": "https://openactive.io/AgentBroker",
  "customer": {
    "@type": "Person",
    "identifier": "07169a73-821b-4474-9aca-17b0b134efb8",
    "email": "[email protected]",
    "familyName": "Jeanette"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/2",
            "identifier": 2,
            "name": "Premier Lifters",
            "description": "Where your Fitness Goals are Always Inn-Sight. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1BB",
              "streetAddress": "Greyfriars Court, Paradise Square"
            },
            "amenityFeature": [
              {
                "@type": "ChangingFacilities",
                "name": "Changing Facilities",
                "value": false
              },
              {
                "@type": "Showers",
                "name": "Showers",
                "value": false
              },
              {
                "@type": "Lockers",
                "name": "Lockers",
                "value": false
              },
              {
                "@type": "Towels",
                "name": "Towels",
                "value": true
              },
              {
                "@type": "Creche",
                "name": "Creche",
                "value": true
              },
              {
                "@type": "Parking",
                "name": "Parking",
                "value": true
              }
            ],
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.7504933,
              "longitude": -1.2620685
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/5/53/Cambridge_Orchard_Park_Premier_Inn.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000002",
            "url": "https://en.wikipedia.org/wiki/Premier_Inn"
          },
          "url": "https://example.com/events/2039"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    },
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/3",
            "identifier": 3,
            "name": "Stroll & Stretch",
            "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1UU",
              "streetAddress": "Norfolk Street"
            },
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.749826,
              "longitude": -1.261492
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000003",
            "url": "https://en.wikipedia.org/wiki/Shopping_center"
          },
          "url": "https://example.com/events/2040"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 1,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    },
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "price": 10,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid That Does Not Allow Full Refund",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/3",
            "identifier": 3,
            "name": "Stroll & Stretch",
            "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1UU",
              "streetAddress": "Norfolk Street"
            },
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.749826,
              "longitude": -1.261492
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000003",
            "url": "https://en.wikipedia.org/wiki/Shopping_center"
          },
          "url": "https://example.com/events/2041"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 2,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  },
  "seller": {
    "@type": "Organization",
    "@id": "https://localhost:5001/api/identifiers/sellers/1",
    "name": "Acme Fitness Ltd",
    "address": {
      "@type": "PostalAddress",
      "addressCountry": "GB",
      "addressLocality": "Another town",
      "addressRegion": "Oxfordshire",
      "postalCode": "OX1 1AA",
      "streetAddress": "1 Hidden Gem"
    },
    "isOpenBookingAllowed": true,
    "legalName": "Acme Fitness Ltd",
    "taxMode": "https://openactive.io/TaxGross",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ]
  },
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "openBookingPrepayment": "https://openactive.io/Required",
    "price": 39.98,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 7.996,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ C2 >> validation of C2

Specs

Validations

✅ Assert Opportunity Capacity (after C2)

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2039%2Fevents%2F20039?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 25.907742ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2039",
      "identifier": 2039,
      "name": "GOLDEN: [OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/2",
        "identifier": 2,
        "name": "Premier Lifters",
        "description": "Where your Fitness Goals are Always Inn-Sight. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1BB",
          "streetAddress": "Greyfriars Court, Paradise Square"
        },
        "amenityFeature": [
          {
            "@type": "ChangingFacilities",
            "name": "Changing Facilities",
            "value": false
          },
          {
            "@type": "Showers",
            "name": "Showers",
            "value": false
          },
          {
            "@type": "Lockers",
            "name": "Lockers",
            "value": false
          },
          {
            "@type": "Towels",
            "name": "Towels",
            "value": true
          },
          {
            "@type": "Creche",
            "name": "Creche",
            "value": true
          },
          {
            "@type": "Parking",
            "name": "Parking",
            "value": true
          }
        ],
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.7504933,
          "longitude": -1.2620685
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/5/53/Cambridge_Orchard_Park_Premier_Inn.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000002",
        "url": "https://en.wikipedia.org/wiki/Premier_Inn"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "07443 214332",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://abigail.net"
      },
      "url": "https://www.example.com/sessions/2039"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Opportunity Feed extract for OrderItem 1 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2040%2Fevents%2F20040?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 24.915923ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2040",
      "identifier": 2040,
      "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/3",
        "identifier": 3,
        "name": "Stroll & Stretch",
        "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1UU",
          "streetAddress": "Norfolk Street"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.749826,
          "longitude": -1.261492
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000003",
        "url": "https://en.wikipedia.org/wiki/Shopping_center"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "02398 352107",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://mazie.org"
      },
      "url": "https://www.example.com/sessions/2040"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Opportunity Feed extract for OrderItem 2 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2041%2Fevents%2F20041?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 24.022107ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2041",
      "identifier": 2041,
      "name": "GOLDEN: [OPEN BOOKING API TEST INTERFACE] Bookable Paid That Does Not Allow Full Refund",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/3",
        "identifier": 3,
        "name": "Stroll & Stretch",
        "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1UU",
          "streetAddress": "Norfolk Street"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.749826,
          "longitude": -1.261492
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000003",
        "url": "https://en.wikipedia.org/wiki/Shopping_center"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "06133 489973",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://griffin.biz"
      },
      "url": "https://www.example.com/sessions/2041"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Specs

✅ Assert Opportunity Capacity (after C2) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Assert Opportunity Capacity (after C2) >> validation of Opportunity Feed extract for OrderItem 1

Specs

Validations

✅ Assert Opportunity Capacity (after C2) >> validation of Opportunity Feed extract for OrderItem 2

Specs

Validations

✅ P

P Request

PUT https://localhost:5001/api/openbooking/order-proposals/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "brokerRole": "https://openactive.io/AgentBroker",
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com",
    "description": "A fitness app for all the community",
    "logo": {
      "@type": "ImageObject",
      "url": "http://data.myfitnessapp.org.uk/images/logo.png"
    },
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Village East",
      "addressRegion": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    }
  },
  "seller": "https://localhost:5001/api/identifiers/sellers/1",
  "customer": {
    "@type": "Person",
    "email": "[email protected]",
    "familyName": "Jeanette",
    "identifier": "07169a73-821b-4474-9aca-17b0b134efb8"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039"
    },
    {
      "@type": "OrderItem",
      "position": 1,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040"
    },
    {
      "@type": "OrderItem",
      "position": 2,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041"
    }
  ],
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "price": 39.98,
    "priceCurrency": "GBP"
  },
  "payment": {
    "@type": "Payment",
    "identifier": "I0PLz8mBC9",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

Response status code: 201 Created. Responded in 75.537674ms.

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "@id": "https://localhost:5001/api/openbooking/order-proposals/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
  "orderProposalStatus": "https://openactive.io/AwaitingSellerConfirmation",
  "bookingService": {
    "@type": "BookingService",
    "name": "Acme booking system",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ],
    "url": "https://example.com"
  },
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com"
  },
  "brokerRole": "https://openactive.io/AgentBroker",
  "customer": {
    "@type": "Person",
    "identifier": "07169a73-821b-4474-9aca-17b0b134efb8",
    "email": "[email protected]",
    "familyName": "Jeanette"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/239",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/2",
            "identifier": 2,
            "name": "Premier Lifters",
            "description": "Where your Fitness Goals are Always Inn-Sight. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1BB",
              "streetAddress": "Greyfriars Court, Paradise Square"
            },
            "amenityFeature": [
              {
                "@type": "ChangingFacilities",
                "name": "Changing Facilities",
                "value": false
              },
              {
                "@type": "Showers",
                "name": "Showers",
                "value": false
              },
              {
                "@type": "Lockers",
                "name": "Lockers",
                "value": false
              },
              {
                "@type": "Towels",
                "name": "Towels",
                "value": true
              },
              {
                "@type": "Creche",
                "name": "Creche",
                "value": true
              },
              {
                "@type": "Parking",
                "name": "Parking",
                "value": true
              }
            ],
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.7504933,
              "longitude": -1.2620685
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/5/53/Cambridge_Orchard_Park_Premier_Inn.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000002",
            "url": "https://en.wikipedia.org/wiki/Premier_Inn"
          },
          "url": "https://example.com/events/2039"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    },
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/240",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/3",
            "identifier": 3,
            "name": "Stroll & Stretch",
            "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1UU",
              "streetAddress": "Norfolk Street"
            },
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.749826,
              "longitude": -1.261492
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000003",
            "url": "https://en.wikipedia.org/wiki/Shopping_center"
          },
          "url": "https://example.com/events/2040"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 1,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    },
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/241",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "price": 10,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid That Does Not Allow Full Refund",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/3",
            "identifier": 3,
            "name": "Stroll & Stretch",
            "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1UU",
              "streetAddress": "Norfolk Street"
            },
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.749826,
              "longitude": -1.261492
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000003",
            "url": "https://en.wikipedia.org/wiki/Shopping_center"
          },
          "url": "https://example.com/events/2041"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 2,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86/versions/07d2a6e1-a42d-4f14-a122-b8e420093172",
  "payment": {
    "@type": "Payment",
    "identifier": "I0PLz8mBC9",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  },
  "seller": {
    "@type": "Organization",
    "@id": "https://localhost:5001/api/identifiers/sellers/1",
    "name": "Acme Fitness Ltd",
    "address": {
      "@type": "PostalAddress",
      "addressCountry": "GB",
      "addressLocality": "Another town",
      "addressRegion": "Oxfordshire",
      "postalCode": "OX1 1AA",
      "streetAddress": "1 Hidden Gem"
    },
    "isOpenBookingAllowed": true,
    "legalName": "Acme Fitness Ltd",
    "taxMode": "https://openactive.io/TaxGross",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ]
  },
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "openBookingPrepayment": "https://openactive.io/Required",
    "price": 39.98,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 7.996,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ P >> validation of P

Specs

Validations

✅ Simulate Seller Approval (Test Interface Action)

Orders (order-proposals) Feed listen for '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86


Response status code: 200 OK. Responded in 6.119176ms.

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MTE2MjA1ODQsImV4cCI6MTcxMTYyNDE4NCwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiMDMwN2YxZGUtMjRmNS00YjkyLTgyMmEtY2M1M2Q1ZGM4N2Q2IiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiMDMwN2YxZGUtMjRmNS00YjkyLTgyMmEtY2M1M2Q1ZGM4N2Q2IiwianRpIjoiMkQ2OTk5RDRFNDVFMzE1QjAyQTg2RjE0OUM4MDEwQTIiLCJpYXQiOjE3MTE2MjA1ODQsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.Hj9xpJScSm0brni0lQre_1Sa_aSja1JB9F7Ta7-wAk_afrtu-V46vPgFmMc8KH0RN5ocDvyqxC5aXrH0rTvNOvtk2647P2QxIokqfAlDLYPQfQohB2dWxGPFg2e8M9xFEYY5d7dKhRgjS0GtJtkF_j2cU3kBtlSXFAMZNtEDz1cULXOwbcidZ5xBWB5_CzZJNloe6lHnpQ0dnZBaY5RvzPwvq-8VBa0wEaPV5KllSrCsFPxeo6CqIZ_1LPbBA3qBVjj_n_rdfQ7-6yO6AT7Jfz_61M71iDwXuZ15N3lpGa3AZZRVlLSaq7gNfHy8M6T2uEqYf1ll13Bt9Y66TZlfNA"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/order-proposals-rpde?afterTimestamp=638472178256002002&afterId=be051d8a-ad36-446a-8080-3f3dd46bf6bf",
  "message": "Listening for UUID: '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' in feed: order-proposals, for Booking Partner: primary from startingFeedPage using headers"
}

Call TestInterface Action of type: test:SellerAcceptOrderProposalSimulateAction Request

POST https://localhost:5001/api/openbooking/test-interface/actions

{
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "@type": "test:SellerAcceptOrderProposalSimulateAction",
  "object": {
    "@type": "OrderProposal",
    "@id": "https://localhost:5001/api/openbooking/order-proposals/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86"
  }
}

Response status code: 204 No Content. Responded in 24.411924ms.

Specs

✅ OrderProposal Feed Update (after Simulate Seller Approval)

Orders (order-proposals) Feed collect for '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86


Response status code: 200 OK. Responded in 2392.378242ms.

{
  "state": "updated",
  "kind": "Order",
  "id": "50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
  "modified": "638472178298108586",
  "data": {
    "@context": "https://openactive.io/",
    "@type": "OrderProposal",
    "@id": "https://localhost:5001/api/openbooking/order-proposals/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
    "identifier": "50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
    "orderProposalStatus": "https://openactive.io/SellerAccepted",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/239",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039"
      },
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/240",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040"
      },
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/241",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "price": 10,
          "priceCurrency": "GBP"
        },
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041"
      }
    ],
    "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86/versions/07d2a6e1-a42d-4f14-a122-b8e420093172",
    "totalPaymentDue": {
      "@type": "PriceSpecification",
      "openBookingPrepayment": "https://openactive.io/Required",
      "price": 39.98,
      "priceCurrency": "GBP"
    }
  }
}

Specs

✅ OrderProposal Feed Update (after Simulate Seller Approval) >> validation of OrderFeed

Specs

Validations

✅ B

Orders (order-proposals) Feed listen for '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86


Response status code: 200 OK. Responded in 3.091152ms.

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MTE2MjA1ODQsImV4cCI6MTcxMTYyNDE4NCwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiMDMwN2YxZGUtMjRmNS00YjkyLTgyMmEtY2M1M2Q1ZGM4N2Q2IiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiMDMwN2YxZGUtMjRmNS00YjkyLTgyMmEtY2M1M2Q1ZGM4N2Q2IiwianRpIjoiMkQ2OTk5RDRFNDVFMzE1QjAyQTg2RjE0OUM4MDEwQTIiLCJpYXQiOjE3MTE2MjA1ODQsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.Hj9xpJScSm0brni0lQre_1Sa_aSja1JB9F7Ta7-wAk_afrtu-V46vPgFmMc8KH0RN5ocDvyqxC5aXrH0rTvNOvtk2647P2QxIokqfAlDLYPQfQohB2dWxGPFg2e8M9xFEYY5d7dKhRgjS0GtJtkF_j2cU3kBtlSXFAMZNtEDz1cULXOwbcidZ5xBWB5_CzZJNloe6lHnpQ0dnZBaY5RvzPwvq-8VBa0wEaPV5KllSrCsFPxeo6CqIZ_1LPbBA3qBVjj_n_rdfQ7-6yO6AT7Jfz_61M71iDwXuZ15N3lpGa3AZZRVlLSaq7gNfHy8M6T2uEqYf1ll13Bt9Y66TZlfNA"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/order-proposals-rpde?afterTimestamp=638472178300540474&afterId=fc3b728b-984f-4732-8039-4da82994518b",
  "message": "Listening for UUID: '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' in feed: order-proposals, for Booking Partner: primary from startingFeedPage using headers"
}

B Request

PUT https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86/versions/07d2a6e1-a42d-4f14-a122-b8e420093172",
  "payment": {
    "@type": "Payment",
    "identifier": "I0PLz8mBC9",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

Response status code: 201 Created. Responded in 78.525585ms.

{
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/ns-beta"
  ],
  "@type": "Order",
  "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
  "identifier": "50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
  "bookingService": {
    "@type": "BookingService",
    "name": "Acme booking system",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ],
    "url": "https://example.com"
  },
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com/"
  },
  "brokerRole": "https://openactive.io/AgentBroker",
  "customer": {
    "@type": "Person",
    "identifier": "07169a73-821b-4474-9aca-17b0b134efb8",
    "email": "[email protected]",
    "familyName": "Jeanette"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/239",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "accessCode": [
        {
          "@type": "PropertyValue",
          "name": "Pin Code",
          "description": "874743"
        }
      ],
      "accessPass": [
        {
          "@type": "ImageObject",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png"
        },
        {
          "@type": "Barcode",
          "text": "5146264137",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
          "beta:codeType": "code128"
        }
      ],
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/2",
            "identifier": 2,
            "name": "Premier Lifters",
            "description": "Where your Fitness Goals are Always Inn-Sight. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1BB",
              "streetAddress": "Greyfriars Court, Paradise Square"
            },
            "amenityFeature": [
              {
                "@type": "ChangingFacilities",
                "name": "Changing Facilities",
                "value": false
              },
              {
                "@type": "Showers",
                "name": "Showers",
                "value": false
              },
              {
                "@type": "Lockers",
                "name": "Lockers",
                "value": false
              },
              {
                "@type": "Towels",
                "name": "Towels",
                "value": true
              },
              {
                "@type": "Creche",
                "name": "Creche",
                "value": true
              },
              {
                "@type": "Parking",
                "name": "Parking",
                "value": true
              }
            ],
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.7504933,
              "longitude": -1.2620685
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/5/53/Cambridge_Orchard_Park_Premier_Inn.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000002",
            "url": "https://en.wikipedia.org/wiki/Premier_Inn"
          },
          "url": "https://example.com/events/2039"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "orderItemStatus": "https://openactive.io/OrderItemConfirmed",
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    },
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/240",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "accessCode": [
        {
          "@type": "PropertyValue",
          "name": "Pin Code",
          "description": "424431"
        }
      ],
      "accessPass": [
        {
          "@type": "ImageObject",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png"
        },
        {
          "@type": "Barcode",
          "text": "9920111811",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
          "beta:codeType": "code128"
        }
      ],
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/3",
            "identifier": 3,
            "name": "Stroll & Stretch",
            "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1UU",
              "streetAddress": "Norfolk Street"
            },
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.749826,
              "longitude": -1.261492
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000003",
            "url": "https://en.wikipedia.org/wiki/Shopping_center"
          },
          "url": "https://example.com/events/2040"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "orderItemStatus": "https://openactive.io/OrderItemConfirmed",
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    },
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/241",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "price": 10,
        "priceCurrency": "GBP"
      },
      "accessCode": [
        {
          "@type": "PropertyValue",
          "name": "Pin Code",
          "description": "200976"
        }
      ],
      "accessPass": [
        {
          "@type": "ImageObject",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png"
        },
        {
          "@type": "Barcode",
          "text": "5541086807",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
          "beta:codeType": "code128"
        }
      ],
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
        "startDate": "2024-03-29T10:16:58+00:00",
        "endDate": "2024-03-29T11:16:58+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid That Does Not Allow Full Refund",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "@id": "https://example.com/place/3",
            "identifier": 3,
            "name": "Stroll & Stretch",
            "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1UU",
              "streetAddress": "Norfolk Street"
            },
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.749826,
              "longitude": -1.261492
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
              }
            ],
            "openingHoursSpecification": [
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Sunday"
                ],
                "opens": "09:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Monday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Tuesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Wednesday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Thursday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "21:30",
                "dayOfWeek": [
                  "https://schema.org/Friday"
                ],
                "opens": "06:30"
              },
              {
                "@type": "OpeningHoursSpecification",
                "closes": "17:30",
                "dayOfWeek": [
                  "https://schema.org/Saturday"
                ],
                "opens": "09:00"
              }
            ],
            "telephone": "01865 000003",
            "url": "https://en.wikipedia.org/wiki/Shopping_center"
          },
          "url": "https://example.com/events/2041"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "orderItemStatus": "https://openactive.io/OrderItemConfirmed",
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "payment": {
    "@type": "Payment",
    "identifier": "I0PLz8mBC9",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  },
  "seller": {
    "@type": "Organization",
    "@id": "https://localhost:5001/api/identifiers/sellers/1",
    "name": "Acme Fitness Ltd",
    "address": {
      "@type": "PostalAddress",
      "addressCountry": "GB",
      "addressLocality": "Another town",
      "addressRegion": "Oxfordshire",
      "postalCode": "OX1 1AA",
      "streetAddress": "1 Hidden Gem"
    },
    "isOpenBookingAllowed": true,
    "legalName": "Acme Fitness Ltd",
    "taxMode": "https://openactive.io/TaxGross",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ]
  },
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "openBookingPrepayment": "https://openactive.io/Required",
    "price": 39.98,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 7.996,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ B >> validation of B

Specs

Validations

✅ OrderProposal Feed Deletion (after B)

Orders (order-proposals) Feed collect for '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86


Response status code: 200 OK. Responded in 109.321793ms.

{
  "state": "deleted",
  "kind": "Order",
  "id": "50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
  "modified": "638472178322626553"
}

Specs

✅ OrderProposal Feed Deletion (after B) >> validation of OrderFeed

Specs

Validations

✅ Assert Opportunity Capacity (after OrderProposal Feed Deletion (after B))

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2039%2Fevents%2F20039?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 16.326214ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2039",
      "identifier": 2039,
      "name": "GOLDEN: [OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/2",
        "identifier": 2,
        "name": "Premier Lifters",
        "description": "Where your Fitness Goals are Always Inn-Sight. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1BB",
          "streetAddress": "Greyfriars Court, Paradise Square"
        },
        "amenityFeature": [
          {
            "@type": "ChangingFacilities",
            "name": "Changing Facilities",
            "value": false
          },
          {
            "@type": "Showers",
            "name": "Showers",
            "value": false
          },
          {
            "@type": "Lockers",
            "name": "Lockers",
            "value": false
          },
          {
            "@type": "Towels",
            "name": "Towels",
            "value": true
          },
          {
            "@type": "Creche",
            "name": "Creche",
            "value": true
          },
          {
            "@type": "Parking",
            "name": "Parking",
            "value": true
          }
        ],
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.7504933,
          "longitude": -1.2620685
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/5/53/Cambridge_Orchard_Park_Premier_Inn.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000002",
        "url": "https://en.wikipedia.org/wiki/Premier_Inn"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "07443 214332",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://abigail.net"
      },
      "url": "https://www.example.com/sessions/2039"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Opportunity Feed extract for OrderItem 1 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2040%2Fevents%2F20040?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 16.540514ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2040",
      "identifier": 2040,
      "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Paid Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/3",
        "identifier": 3,
        "name": "Stroll & Stretch",
        "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1UU",
          "streetAddress": "Norfolk Street"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.749826,
          "longitude": -1.261492
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000003",
        "url": "https://en.wikipedia.org/wiki/Shopping_center"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 14.99,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "02398 352107",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://mazie.org"
      },
      "url": "https://www.example.com/sessions/2040"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Opportunity Feed extract for OrderItem 2 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F2041%2Fevents%2F20041?useCacheIfAvailable=true&expectedCapacity=9


Response status code: 200 OK. Responded in 15.72894ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
    "startDate": "2024-03-29T10:16:58+00:00",
    "endDate": "2024-03-29T11:16:58+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2041",
      "identifier": 2041,
      "name": "GOLDEN: [OPEN BOOKING API TEST INTERFACE] Bookable Paid That Does Not Allow Full Refund",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "@id": "https://example.com/place/3",
        "identifier": 3,
        "name": "Stroll & Stretch",
        "description": "Casual Calisthenics in the Heart of Commerce. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1UU",
          "streetAddress": "Norfolk Street"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.749826,
          "longitude": -1.261492
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/2/28/Westfield_Garden_State_Plaza_-_panoramio.jpg"
          }
        ],
        "openingHoursSpecification": [
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Sunday"
            ],
            "opens": "09:00"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Monday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Tuesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Wednesday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Thursday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "21:30",
            "dayOfWeek": [
              "https://schema.org/Friday"
            ],
            "opens": "06:30"
          },
          {
            "@type": "OpeningHoursSpecification",
            "closes": "17:30",
            "dayOfWeek": [
              "https://schema.org/Saturday"
            ],
            "opens": "09:00"
          }
        ],
        "telephone": "01865 000003",
        "url": "https://en.wikipedia.org/wiki/Shopping_center"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 10,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "06133 489973",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://griffin.biz"
      },
      "url": "https://www.example.com/sessions/2041"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Specs

✅ Assert Opportunity Capacity (after OrderProposal Feed Deletion (after B)) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Assert Opportunity Capacity (after OrderProposal Feed Deletion (after B)) >> validation of Opportunity Feed extract for OrderItem 1

Specs

Validations

✅ Assert Opportunity Capacity (after OrderProposal Feed Deletion (after B)) >> validation of Opportunity Feed extract for OrderItem 2

Specs

Validations

✅ Cancel Order for non-cancellable items

U Request

PATCH https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/240",
      "orderItemStatus": "https://openactive.io/CustomerCancelled"
    },
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/241",
      "orderItemStatus": "https://openactive.io/CustomerCancelled"
    }
  ]
}

Response status code: 400 Bad Request. Responded in 28.223122ms.

{
  "@context": "https://openactive.io/",
  "@type": "CancellationNotPermittedError",
  "name": "Cancellation is not permitted due to internal rules of the Booking System not otherwise exposed to the Broker.",
  "statusCode": 400,
  "description": "Customer cancellation not permitted on this session"
}

Specs

✅ Assert Opportunity Capacity (after Cancel Order for non-cancellable items)

Specs

✅ Assert Opportunity Capacity (after Cancel Order for non-cancellable items) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Assert Opportunity Capacity (after Cancel Order for non-cancellable items) >> validation of Opportunity Feed extract for OrderItem 1

Specs

Validations

✅ Assert Opportunity Capacity (after Cancel Order for non-cancellable items) >> validation of Opportunity Feed extract for OrderItem 2

Specs

Validations

✅ Cancel Order for cancellable item

Orders (orders) Feed listen for '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' change (auth: primary) Request

POST http://localhost:3000/order-listeners/orders/primary/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86


Response status code: 200 OK. Responded in 10.891843ms.

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MTE2MjA1ODQsImV4cCI6MTcxMTYyNDE4NCwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiMDMwN2YxZGUtMjRmNS00YjkyLTgyMmEtY2M1M2Q1ZGM4N2Q2IiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiMDMwN2YxZGUtMjRmNS00YjkyLTgyMmEtY2M1M2Q1ZGM4N2Q2IiwianRpIjoiMkQ2OTk5RDRFNDVFMzE1QjAyQTg2RjE0OUM4MDEwQTIiLCJpYXQiOjE3MTE2MjA1ODQsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.Hj9xpJScSm0brni0lQre_1Sa_aSja1JB9F7Ta7-wAk_afrtu-V46vPgFmMc8KH0RN5ocDvyqxC5aXrH0rTvNOvtk2647P2QxIokqfAlDLYPQfQohB2dWxGPFg2e8M9xFEYY5d7dKhRgjS0GtJtkF_j2cU3kBtlSXFAMZNtEDz1cULXOwbcidZ5xBWB5_CzZJNloe6lHnpQ0dnZBaY5RvzPwvq-8VBa0wEaPV5KllSrCsFPxeo6CqIZ_1LPbBA3qBVjj_n_rdfQ7-6yO6AT7Jfz_61M71iDwXuZ15N3lpGa3AZZRVlLSaq7gNfHy8M6T2uEqYf1ll13Bt9Y66TZlfNA"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/orders-rpde?afterTimestamp=638472178142743917&afterId=f386990c-b563-4f5c-9ca6-2c0184f4b0d3",
  "message": "Listening for UUID: '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' in feed: orders, for Booking Partner: primary from startingFeedPage using headers"
}

U Request

PATCH https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/239",
      "orderItemStatus": "https://openactive.io/CustomerCancelled"
    }
  ]
}

Response status code: 204 No Content. Responded in 65.54509ms.

Specs

✅ Orders Feed (after Cancel Order for cancellable item)

Orders (orders) Feed collect for '50a67e67-6d7d-43b0-9d5f-6c0b18b12b86' change (auth: primary) Request

GET http://localhost:3000/order-listeners/orders/primary/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86


Response status code: 200 OK. Responded in 2367.9814969999998ms.

{
  "state": "updated",
  "kind": "Order",
  "id": "50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
  "modified": "638472178426006904",
  "data": {
    "@context": [
      "https://openactive.io/",
      "https://openactive.io/ns-beta"
    ],
    "@type": "Order",
    "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
    "identifier": "50a67e67-6d7d-43b0-9d5f-6c0b18b12b86",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/239",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2039#/offers/0",
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        "accessCode": [
          {
            "@type": "PropertyValue",
            "name": "Pin Code",
            "description": "874743"
          }
        ],
        "accessPass": [
          {
            "@type": "Barcode",
            "text": "5146264137",
            "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
            "beta:codeType": "code128"
          }
        ],
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2039/events/20039",
        "orderItemStatus": "https://openactive.io/CustomerCancelled"
      },
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/240",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2040#/offers/0",
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        "accessCode": [
          {
            "@type": "PropertyValue",
            "name": "Pin Code",
            "description": "424431"
          }
        ],
        "accessPass": [
          {
            "@type": "Barcode",
            "text": "9920111811",
            "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
            "beta:codeType": "code128"
          }
        ],
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2040/events/20040",
        "orderItemStatus": "https://openactive.io/OrderItemConfirmed"
      },
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/50a67e67-6d7d-43b0-9d5f-6c0b18b12b86#/orderedItems/241",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2041#/offers/0",
          "price": 10,
          "priceCurrency": "GBP"
        },
        "accessCode": [
          {
            "@type": "PropertyValue",
            "name": "Pin Code",
            "description": "200976"
          }
        ],
        "accessPass": [
          {
            "@type": "Barcode",
            "text": "5541086807",
            "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
            "beta:codeType": "code128"
          }
        ],
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2041/events/20041",
        "orderItemStatus": "https://openactive.io/OrderItemConfirmed"
      }
    ],
    "totalPaymentDue": {
      "@type": "PriceSpecification",
      "openBookingPrepayment": "https://openactive.io/Required",
      "price": 24.99,
      "priceCurrency": "GBP"
    }
  }
}

Specs

✅ Orders Feed (after Cancel Order for cancellable item) >> validation of OrderFeed

Specs

Validations

✅ Assert Opportunity Capacity (after Cancel Order for cancellable item)

Specs

✅ Assert Opportunity Capacity (after Cancel Order for cancellable item) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Assert Opportunity Capacity (after Cancel Order for cancellable item) >> validation of Opportunity Feed extract for OrderItem 1

Specs

Validations

✅ Assert Opportunity Capacity (after Cancel Order for cancellable item) >> validation of Opportunity Feed extract for OrderItem 2

Specs

Validations