< Return to Summary | File Generated: Wed Mar 27 2024 14:53:59 GMT+0000 (Coordinated Universal Time)

customer-requested-cancellation >> orderitem-not-within-order-error (OpenBookingApprovalFlow >> ScheduledSession)

Booking Flow: OpenBookingApprovalFlow

Opportunity Type: ScheduledSession

Feature: Cancellation / Customer Requested Cancellation (Implemented)

Test: Expect a OrderItemNotWithinOrderError for an Order that does not exist

Runs Order Cancellation for a non-existent Order (with a fictional UUID), but real OrderItem, expecting an OrderItemNotWithinOrderError error to be returned

Running only this test

npm start -- --runInBand test/features/cancellation/customer-requested-cancellation/implemented/orderitem-not-within-order-error-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.


⚠️ 20 passed with 0 failures, 132 warnings and 54 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 25.424735ms.

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

Opportunity Feed extract for OrderItem 0 Request

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


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

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
  "modified": "1711551256558",
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
    "startDate": "2024-03-28T14:54:15+00:00",
    "endDate": "2024-03-28T15:54:15+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2252",
      "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",
        "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"
          }
        ],
        "telephone": "01865 000002",
        "url": "https://en.wikipedia.org/wiki/Premier_Inn"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
          "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,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 10
  }
}

Specs

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

Specs

Validations

✅ C1

C1 Request

PUT https://localhost:5001/api/openbooking/order-quote-templates/2a770932-d72c-4798-a694-f780c0a47157

{
  "@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/2252#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/2a770932-d72c-4798-a694-f780c0a47157",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-27T14:59:15+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/2252#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
        "startDate": "2024-03-28T14:54:15+00:00",
        "endDate": "2024-03-28T15:54:15+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252",
          "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",
            "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"
              }
            ],
            "telephone": "01865 000002",
            "url": "https://en.wikipedia.org/wiki/Premier_Inn"
          },
          "url": "https://example.com/events/2252"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "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": 14.99,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 2.998,
      "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%2F2252%2Fevents%2F20252?useCacheIfAvailable=true&expectedCapacity=9


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

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
  "modified": "1711551257640",
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
    "startDate": "2024-03-28T14:54:15+00:00",
    "endDate": "2024-03-28T15:54:15+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2252",
      "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",
        "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"
          }
        ],
        "telephone": "01865 000002",
        "url": "https://en.wikipedia.org/wiki/Premier_Inn"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
          "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,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Specs

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

Specs

Validations

✅ C2

C2 Request

PUT https://localhost:5001/api/openbooking/order-quotes/2a770932-d72c-4798-a694-f780c0a47157

{
  "@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]",
    "telephone": "1-451-850-8123",
    "familyName": "Thelma",
    "identifier": "23ed4c80-bf9b-412b-8d88-a4efdb265d24"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/2a770932-d72c-4798-a694-f780c0a47157",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-27T14:59:16+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": "23ed4c80-bf9b-412b-8d88-a4efdb265d24",
    "email": "[email protected]",
    "familyName": "Thelma",
    "telephone": "1-451-850-8123"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
        "startDate": "2024-03-28T14:54:15+00:00",
        "endDate": "2024-03-28T15:54:15+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252",
          "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",
            "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"
              }
            ],
            "telephone": "01865 000002",
            "url": "https://en.wikipedia.org/wiki/Premier_Inn"
          },
          "url": "https://example.com/events/2252"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "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": 14.99,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 2.998,
      "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%2F2252%2Fevents%2F20252?useCacheIfAvailable=true&expectedCapacity=9


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
    "startDate": "2024-03-28T14:54:15+00:00",
    "endDate": "2024-03-28T15:54:15+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2252",
      "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",
        "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"
          }
        ],
        "telephone": "01865 000002",
        "url": "https://en.wikipedia.org/wiki/Premier_Inn"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
          "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,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 9
  }
}

Specs

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

Specs

Validations

✅ P

P Request

PUT https://localhost:5001/api/openbooking/order-proposals/2a770932-d72c-4798-a694-f780c0a47157

{
  "@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]",
    "telephone": "1-451-850-8123",
    "familyName": "Thelma",
    "identifier": "23ed4c80-bf9b-412b-8d88-a4efdb265d24"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252"
    }
  ],
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "price": 14.99,
    "priceCurrency": "GBP"
  },
  "payment": {
    "@type": "Payment",
    "identifier": "TF2CbJuQ-4",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "@id": "https://localhost:5001/api/openbooking/order-proposals/2a770932-d72c-4798-a694-f780c0a47157",
  "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": "23ed4c80-bf9b-412b-8d88-a4efdb265d24",
    "email": "[email protected]",
    "familyName": "Thelma",
    "telephone": "1-451-850-8123"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/2a770932-d72c-4798-a694-f780c0a47157#/orderedItems/1066",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
        "startDate": "2024-03-28T14:54:15+00:00",
        "endDate": "2024-03-28T15:54:15+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252",
          "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",
            "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"
              }
            ],
            "telephone": "01865 000002",
            "url": "https://en.wikipedia.org/wiki/Premier_Inn"
          },
          "url": "https://example.com/events/2252"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/2a770932-d72c-4798-a694-f780c0a47157/versions/b556c02d-5ae2-4bc3-abde-17920ceae790",
  "payment": {
    "@type": "Payment",
    "identifier": "TF2CbJuQ-4",
    "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": 14.99,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 2.998,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ P >> validation of P

Specs

Validations

✅ Simulate Seller Approval (Test Interface Action)

Orders (order-proposals) Feed listen for '2a770932-d72c-4798-a694-f780c0a47157' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/2a770932-d72c-4798-a694-f780c0a47157


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

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MTE1NTA2NzYsImV4cCI6MTcxMTU1NDI3NiwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiMTk5ODdiNTItYWFiMy00NmQ0LWExNmUtY2RlMTVhNzk1ZGYyIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiMTk5ODdiNTItYWFiMy00NmQ0LWExNmUtY2RlMTVhNzk1ZGYyIiwianRpIjoiQ0NFNjVCQTA4MjVCMkExQThFNzhEMzAwNjFDMDMyMTciLCJpYXQiOjE3MTE1NTA2NzYsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.fiiEa6QfJPMpfcxL1MXt4O5I3gRosl6lUd4OyCTQ3wW-Sp8hOqSYnyXxLVnwtJHEiRfySeAq0EI36NRRNdVOVhBiiXDANO1v0opF1Ni8uZrE8X4VZV6mwihUlvj4tuTK-wMEU2Njy43iNxQDsmCknlpluj0uAb2tIc9ZaX-MgtxfE_LNi2CSBwsD1JDIjWy-K51HtsJHuOod1e2fTNKeItu6nUeglWTHjgPPwQNDclWZ_00WHrbsV8UfQaYg1hvllWQxxQINncv3ZBxnSqTDErtCZt2JnXDZQqEsxlElkldGf-50vu8WsVKUvI9kfRBI-EJRl_DxH4RXnfqqBivJCg"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/order-proposals-rpde?afterTimestamp=638471480260803806&afterId=25f440d1-0f2e-43a4-80ce-daee9831c2ee",
  "message": "Listening for UUID: '2a770932-d72c-4798-a694-f780c0a47157' 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/2a770932-d72c-4798-a694-f780c0a47157"
  }
}

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

Specs

✅ OrderProposal Feed Update (after Simulate Seller Approval)

Orders (order-proposals) Feed collect for '2a770932-d72c-4798-a694-f780c0a47157' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/2a770932-d72c-4798-a694-f780c0a47157


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

{
  "state": "updated",
  "kind": "Order",
  "id": "2a770932-d72c-4798-a694-f780c0a47157",
  "modified": "638471480572615781",
  "data": {
    "@context": "https://openactive.io/",
    "@type": "OrderProposal",
    "@id": "https://localhost:5001/api/openbooking/order-proposals/2a770932-d72c-4798-a694-f780c0a47157",
    "identifier": "2a770932-d72c-4798-a694-f780c0a47157",
    "orderProposalStatus": "https://openactive.io/SellerAccepted",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/2a770932-d72c-4798-a694-f780c0a47157#/orderedItems/1066",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
          "price": 14.99,
          "priceCurrency": "GBP"
        },
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252"
      }
    ],
    "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/2a770932-d72c-4798-a694-f780c0a47157/versions/b556c02d-5ae2-4bc3-abde-17920ceae790",
    "totalPaymentDue": {
      "@type": "PriceSpecification",
      "openBookingPrepayment": "https://openactive.io/Required",
      "price": 14.99,
      "priceCurrency": "GBP"
    }
  }
}

Specs

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

Specs

Validations

✅ B

Orders (order-proposals) Feed listen for '2a770932-d72c-4798-a694-f780c0a47157' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/2a770932-d72c-4798-a694-f780c0a47157


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

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MTE1NTA2NzYsImV4cCI6MTcxMTU1NDI3NiwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiMTk5ODdiNTItYWFiMy00NmQ0LWExNmUtY2RlMTVhNzk1ZGYyIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiMTk5ODdiNTItYWFiMy00NmQ0LWExNmUtY2RlMTVhNzk1ZGYyIiwianRpIjoiQ0NFNjVCQTA4MjVCMkExQThFNzhEMzAwNjFDMDMyMTciLCJpYXQiOjE3MTE1NTA2NzYsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.fiiEa6QfJPMpfcxL1MXt4O5I3gRosl6lUd4OyCTQ3wW-Sp8hOqSYnyXxLVnwtJHEiRfySeAq0EI36NRRNdVOVhBiiXDANO1v0opF1Ni8uZrE8X4VZV6mwihUlvj4tuTK-wMEU2Njy43iNxQDsmCknlpluj0uAb2tIc9ZaX-MgtxfE_LNi2CSBwsD1JDIjWy-K51HtsJHuOod1e2fTNKeItu6nUeglWTHjgPPwQNDclWZ_00WHrbsV8UfQaYg1hvllWQxxQINncv3ZBxnSqTDErtCZt2JnXDZQqEsxlElkldGf-50vu8WsVKUvI9kfRBI-EJRl_DxH4RXnfqqBivJCg"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/order-proposals-rpde?afterTimestamp=638471480572615781&afterId=2a770932-d72c-4798-a694-f780c0a47157",
  "message": "Listening for UUID: '2a770932-d72c-4798-a694-f780c0a47157' in feed: order-proposals, for Booking Partner: primary from startingFeedPage using headers"
}

B Request

PUT https://localhost:5001/api/openbooking/orders/2a770932-d72c-4798-a694-f780c0a47157

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/2a770932-d72c-4798-a694-f780c0a47157/versions/b556c02d-5ae2-4bc3-abde-17920ceae790",
  "payment": {
    "@type": "Payment",
    "identifier": "TF2CbJuQ-4",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/ns-beta"
  ],
  "@type": "Order",
  "@id": "https://localhost:5001/api/openbooking/orders/2a770932-d72c-4798-a694-f780c0a47157",
  "identifier": "2a770932-d72c-4798-a694-f780c0a47157",
  "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": "23ed4c80-bf9b-412b-8d88-a4efdb265d24",
    "email": "[email protected]",
    "familyName": "Thelma",
    "telephone": "1-451-850-8123"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/2a770932-d72c-4798-a694-f780c0a47157#/orderedItems/1066",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 14.99,
        "priceCurrency": "GBP"
      },
      "accessCode": [
        {
          "@type": "PropertyValue",
          "name": "Pin Code",
          "description": "299061"
        }
      ],
      "accessPass": [
        {
          "@type": "ImageObject",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png"
        },
        {
          "@type": "Barcode",
          "text": "3494845757",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
          "beta:codeType": "code128"
        }
      ],
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
        "startDate": "2024-03-28T14:54:15+00:00",
        "endDate": "2024-03-28T15:54:15+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252",
          "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",
            "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"
              }
            ],
            "telephone": "01865 000002",
            "url": "https://en.wikipedia.org/wiki/Premier_Inn"
          },
          "url": "https://example.com/events/2252"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "orderItemStatus": "https://openactive.io/OrderItemConfirmed",
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 2.998,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "payment": {
    "@type": "Payment",
    "identifier": "TF2CbJuQ-4",
    "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": 14.99,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 2.998,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ B >> validation of B

Specs

Validations

✅ OrderProposal Feed Deletion (after B)

Orders (order-proposals) Feed collect for '2a770932-d72c-4798-a694-f780c0a47157' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/2a770932-d72c-4798-a694-f780c0a47157


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

{
  "state": "deleted",
  "kind": "Order",
  "id": "2a770932-d72c-4798-a694-f780c0a47157",
  "modified": "638471480597088375"
}

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%2F2252%2Fevents%2F20252?useCacheIfAvailable=true&expectedCapacity=9


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2252/events/20252",
    "startDate": "2024-03-28T14:54:15+00:00",
    "endDate": "2024-03-28T15:54:15+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2252",
      "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",
        "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"
          }
        ],
        "telephone": "01865 000002",
        "url": "https://en.wikipedia.org/wiki/Premier_Inn"
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2252#/offers/0",
          "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,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age"
    },
    "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

✅ Attempt to Cancel OrderItem at Position 0 using random Order UUID

U Request

PATCH https://localhost:5001/api/openbooking/orders/90b58814-d68b-4cbb-ba2e-fdedee5db6de

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/2a770932-d72c-4798-a694-f780c0a47157#/orderedItems/1066",
      "orderItemStatus": "https://openactive.io/CustomerCancelled"
    }
  ]
}

Response status code: 500 Internal Server Error. Responded in 25.076195ms.

{
  "@context": "https://openactive.io/",
  "@type": "OrderItemNotWithinOrderError",
  "name": "The Order UUID for at least one provided 'OrderItem' does not match the Order UUID of the 'Order' being PATCHed.",
  "statusCode": 500
}

Specs

✅ Assert Opportunity Capacity (after Attempt to Cancel OrderItem at Position 0 using random Order UUID)

Specs

✅ Assert Opportunity Capacity (after Attempt to Cancel OrderItem at Position 0 using random Order UUID) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations