< Return to Summary | File Generated: Thu Mar 28 2024 12:23:57 GMT+0000 (Coordinated Universal Time)

customer-notice-notifications >> customer-notice-notification (OpenBookingApprovalFlow >> ScheduledSession)

Booking Flow: OpenBookingApprovalFlow

Opportunity Type: ScheduledSession

Feature: Notifications / Customer notice notifications (Implemented)

Test: Changes to an OrderItem's customerNotice (via CustomerNoticeSimulateAction) should update the Order Feed.

After B, invoke a CustomerNoticeSimulateAction. This should create an update in the Order Feed with the OrderItem's customerNotice changed.

Running only this test

npm start -- --runInBand test/features/notifications/customer-notice-notifications/implemented/customer-notice-notification-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, 98 warnings and 48 suggestions


✅ Fetch Opportunities

Local Microservice Test Interface for OrderItem 0 Request

POST http://localhost:3000/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#TestOpportunityBookable",
  "test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingApprovalFlow"
}

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

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

Opportunity Feed extract for OrderItem 0 Request

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


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
    "startDate": "2024-04-01T13:08:33+00:00",
    "endDate": "2024-04-01T16:49:33+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1605",
      "identifier": 1605,
      "name": "Steel Yoga",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#bf1a5e00-cdcf-465d-8c5a-6f57040b7f7e",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Yoga"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605#/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",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT19H8M"
        }
      ],
      "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": "08106 517594",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://luella.com"
      },
      "url": "https://www.example.com/sessions/1605"
    },
    "duration": "PT3H41M",
    "maximumAttendeeCapacity": 3,
    "remainingAttendeeCapacity": 3
  }
}

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/ce22f721-9306-4cce-b024-9294000f16cf

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

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/ce22f721-9306-4cce-b024-9294000f16cf",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-28T12:29:34+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/1605#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "price": 0,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P13DT19H8M"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
        "startDate": "2024-04-01T13:08:33+00:00",
        "endDate": "2024-04-01T16:49:33+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605",
          "name": "Steel Yoga",
          "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/1605"
        },
        "maximumAttendeeCapacity": 3,
        "remainingAttendeeCapacity": 3
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 0,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "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/Unavailable",
    "price": 0,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 0,
      "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%2F1605%2Fevents%2F16047?useCacheIfAvailable=true&expectedCapacity=2


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

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
  "modified": "1711628675622",
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
    "startDate": "2024-04-01T13:08:33+00:00",
    "endDate": "2024-04-01T16:49:33+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1605",
      "identifier": 1605,
      "name": "Steel Yoga",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#bf1a5e00-cdcf-465d-8c5a-6f57040b7f7e",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Yoga"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605#/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",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT19H8M"
        }
      ],
      "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": "08106 517594",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://luella.com"
      },
      "url": "https://www.example.com/sessions/1605"
    },
    "duration": "PT3H41M",
    "maximumAttendeeCapacity": 3,
    "remainingAttendeeCapacity": 2
  }
}

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/ce22f721-9306-4cce-b024-9294000f16cf

{
  "@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-765-845-8271",
    "identifier": "1c36f945-b383-40ef-90f8-005ef327da23"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/1605#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/ce22f721-9306-4cce-b024-9294000f16cf",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-28T12:29:35+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": "1c36f945-b383-40ef-90f8-005ef327da23",
    "email": "[email protected]",
    "telephone": "1-765-845-8271"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/1605#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "price": 0,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P13DT19H8M"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
        "startDate": "2024-04-01T13:08:33+00:00",
        "endDate": "2024-04-01T16:49:33+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605",
          "name": "Steel Yoga",
          "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/1605"
        },
        "maximumAttendeeCapacity": 3,
        "remainingAttendeeCapacity": 3
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 0,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "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/Unavailable",
    "price": 0,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 0,
      "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%2F1605%2Fevents%2F16047?useCacheIfAvailable=true&expectedCapacity=2


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
    "startDate": "2024-04-01T13:08:33+00:00",
    "endDate": "2024-04-01T16:49:33+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1605",
      "identifier": 1605,
      "name": "Steel Yoga",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#bf1a5e00-cdcf-465d-8c5a-6f57040b7f7e",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Yoga"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605#/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",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT19H8M"
        }
      ],
      "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": "08106 517594",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://luella.com"
      },
      "url": "https://www.example.com/sessions/1605"
    },
    "duration": "PT3H41M",
    "maximumAttendeeCapacity": 3,
    "remainingAttendeeCapacity": 2
  }
}

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/ce22f721-9306-4cce-b024-9294000f16cf

{
  "@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-765-845-8271",
    "identifier": "1c36f945-b383-40ef-90f8-005ef327da23"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/1605#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047"
    }
  ],
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "price": 0,
    "priceCurrency": "GBP"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "@id": "https://localhost:5001/api/openbooking/order-proposals/ce22f721-9306-4cce-b024-9294000f16cf",
  "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": "1c36f945-b383-40ef-90f8-005ef327da23",
    "email": "[email protected]",
    "telephone": "1-765-845-8271"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/ce22f721-9306-4cce-b024-9294000f16cf#/orderedItems/1924",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/1605#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "price": 0,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P13DT19H8M"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
        "startDate": "2024-04-01T13:08:33+00:00",
        "endDate": "2024-04-01T16:49:33+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605",
          "name": "Steel Yoga",
          "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/1605"
        },
        "maximumAttendeeCapacity": 3,
        "remainingAttendeeCapacity": 3
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 0,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/ce22f721-9306-4cce-b024-9294000f16cf/versions/c06df10f-2c56-4815-8ade-b395812b3b64",
  "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/Unavailable",
    "price": 0,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 0,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ P >> validation of P

Specs

Validations

✅ Simulate Seller Approval (Test Interface Action)

Orders (order-proposals) Feed listen for 'ce22f721-9306-4cce-b024-9294000f16cf' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/ce22f721-9306-4cce-b024-9294000f16cf


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

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MTE2Mjc0NzUsImV4cCI6MTcxMTYzMTA3NSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiZTllZmQyNDMtMTc3My00YTBlLWFkNzItYzQ1MGRmZWRmMjEzIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiZTllZmQyNDMtMTc3My00YTBlLWFkNzItYzQ1MGRmZWRmMjEzIiwianRpIjoiNTJGNjcwMjBFQzQ1Nzc5OEUwOUQ0NTNBODQxQzNBREIiLCJpYXQiOjE3MTE2Mjc0NzUsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.xhatQEnJjyFG0xr-jZ9U8IoV-cJf7YmqhO9SCKJ6NyjlhCfPoxUfSjCYTqE1KeHAAxHM9Tw9gppxJP2PVIJdGIZRvjxvv_IFLk21Z4RvM-Z5vaG_fTJqB_39H4U1IKmN-GzAzvj-D_U_qtJP2eXKoyilA0xbHNItAwqVjPgXRb-Vhh6uxmFz9XdVFwB_hgL3NMENfMfWJqHl1ST5d9YQWqrQpD3wVfwQItXUWSlhZmLeZ9SpJxuJ4Hhlb0CN82ce0urKYqBjSC52rUy7_Ky6wUIR9iUeVtYT1EFxmDnsC6h6V1th1CjgOfO05Q6vlQygP_UnNR44uuYdsU73HWHjpg"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/order-proposals-rpde?afterTimestamp=638472254646016429&afterId=2a2bf43b-4744-455a-8bd9-fd4dc28d5a21",
  "message": "Listening for UUID: 'ce22f721-9306-4cce-b024-9294000f16cf' 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/ce22f721-9306-4cce-b024-9294000f16cf"
  }
}

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

Specs

✅ OrderProposal Feed Update (after Simulate Seller Approval)

Orders (order-proposals) Feed collect for 'ce22f721-9306-4cce-b024-9294000f16cf' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/ce22f721-9306-4cce-b024-9294000f16cf


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

{
  "state": "updated",
  "kind": "Order",
  "id": "ce22f721-9306-4cce-b024-9294000f16cf",
  "modified": "638472254755109636",
  "data": {
    "@context": "https://openactive.io/",
    "@type": "OrderProposal",
    "@id": "https://localhost:5001/api/openbooking/order-proposals/ce22f721-9306-4cce-b024-9294000f16cf",
    "identifier": "ce22f721-9306-4cce-b024-9294000f16cf",
    "orderProposalStatus": "https://openactive.io/SellerAccepted",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/ce22f721-9306-4cce-b024-9294000f16cf#/orderedItems/1924",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605#/offers/0",
          "price": 0,
          "priceCurrency": "GBP"
        },
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047"
      }
    ],
    "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/ce22f721-9306-4cce-b024-9294000f16cf/versions/c06df10f-2c56-4815-8ade-b395812b3b64",
    "totalPaymentDue": {
      "@type": "PriceSpecification",
      "openBookingPrepayment": "https://openactive.io/Unavailable",
      "price": 0,
      "priceCurrency": "GBP"
    }
  }
}

Specs

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

Specs

Validations

✅ B

Orders (order-proposals) Feed listen for 'ce22f721-9306-4cce-b024-9294000f16cf' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/ce22f721-9306-4cce-b024-9294000f16cf


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

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MTE2Mjc0NzUsImV4cCI6MTcxMTYzMTA3NSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiZTllZmQyNDMtMTc3My00YTBlLWFkNzItYzQ1MGRmZWRmMjEzIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiZTllZmQyNDMtMTc3My00YTBlLWFkNzItYzQ1MGRmZWRmMjEzIiwianRpIjoiNTJGNjcwMjBFQzQ1Nzc5OEUwOUQ0NTNBODQxQzNBREIiLCJpYXQiOjE3MTE2Mjc0NzUsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.xhatQEnJjyFG0xr-jZ9U8IoV-cJf7YmqhO9SCKJ6NyjlhCfPoxUfSjCYTqE1KeHAAxHM9Tw9gppxJP2PVIJdGIZRvjxvv_IFLk21Z4RvM-Z5vaG_fTJqB_39H4U1IKmN-GzAzvj-D_U_qtJP2eXKoyilA0xbHNItAwqVjPgXRb-Vhh6uxmFz9XdVFwB_hgL3NMENfMfWJqHl1ST5d9YQWqrQpD3wVfwQItXUWSlhZmLeZ9SpJxuJ4Hhlb0CN82ce0urKYqBjSC52rUy7_Ky6wUIR9iUeVtYT1EFxmDnsC6h6V1th1CjgOfO05Q6vlQygP_UnNR44uuYdsU73HWHjpg"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/order-proposals-rpde?afterTimestamp=638472254755109636&afterId=ce22f721-9306-4cce-b024-9294000f16cf",
  "message": "Listening for UUID: 'ce22f721-9306-4cce-b024-9294000f16cf' in feed: order-proposals, for Booking Partner: primary from startingFeedPage using headers"
}

B Request

PUT https://localhost:5001/api/openbooking/orders/ce22f721-9306-4cce-b024-9294000f16cf

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/ce22f721-9306-4cce-b024-9294000f16cf/versions/c06df10f-2c56-4815-8ade-b395812b3b64"
}

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

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "@id": "https://localhost:5001/api/openbooking/orders/ce22f721-9306-4cce-b024-9294000f16cf",
  "identifier": "ce22f721-9306-4cce-b024-9294000f16cf",
  "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": "1c36f945-b383-40ef-90f8-005ef327da23",
    "email": "[email protected]",
    "telephone": "1-765-845-8271"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/ce22f721-9306-4cce-b024-9294000f16cf#/orderedItems/1924",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/1605#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "price": 0,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P13DT19H8M"
      },
      "accessChannel": {
        "@type": "VirtualLocation",
        "name": "Zoom Video Chat",
        "description": "Please log into Zoom a few minutes before the event",
        "accessCode": "0144374100",
        "accessId": "2538143194"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
        "startDate": "2024-04-01T13:08:33+00:00",
        "endDate": "2024-04-01T16:49:33+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605",
          "name": "Steel Yoga",
          "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/1605"
        },
        "maximumAttendeeCapacity": 3,
        "remainingAttendeeCapacity": 3
      },
      "orderItemStatus": "https://openactive.io/OrderItemConfirmed",
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 0,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "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/Unavailable",
    "price": 0,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 0,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ B >> validation of B

Specs

Validations

✅ OrderProposal Feed Deletion (after B)

Orders (order-proposals) Feed collect for 'ce22f721-9306-4cce-b024-9294000f16cf' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/ce22f721-9306-4cce-b024-9294000f16cf


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

{
  "state": "deleted",
  "kind": "Order",
  "id": "ce22f721-9306-4cce-b024-9294000f16cf",
  "modified": "638472254780719157"
}

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%2F1605%2Fevents%2F16047?useCacheIfAvailable=true&expectedCapacity=2


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
    "startDate": "2024-04-01T13:08:33+00:00",
    "endDate": "2024-04-01T16:49:33+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1605",
      "identifier": 1605,
      "name": "Steel Yoga",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#bf1a5e00-cdcf-465d-8c5a-6f57040b7f7e",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Yoga"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605#/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",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT19H8M"
        }
      ],
      "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": "08106 517594",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://luella.com"
      },
      "url": "https://www.example.com/sessions/1605"
    },
    "duration": "PT3H41M",
    "maximumAttendeeCapacity": 3,
    "remainingAttendeeCapacity": 2
  }
}

Specs

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

Specs

Validations

✅ Test Interface Action (test:CustomerNoticeSimulateAction)

Orders (orders) Feed listen for 'ce22f721-9306-4cce-b024-9294000f16cf' change (auth: primary) Request

POST http://localhost:3000/order-listeners/orders/primary/ce22f721-9306-4cce-b024-9294000f16cf


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

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MTE2Mjc0NzUsImV4cCI6MTcxMTYzMTA3NSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiZTllZmQyNDMtMTc3My00YTBlLWFkNzItYzQ1MGRmZWRmMjEzIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiZTllZmQyNDMtMTc3My00YTBlLWFkNzItYzQ1MGRmZWRmMjEzIiwianRpIjoiNTJGNjcwMjBFQzQ1Nzc5OEUwOUQ0NTNBODQxQzNBREIiLCJpYXQiOjE3MTE2Mjc0NzUsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.xhatQEnJjyFG0xr-jZ9U8IoV-cJf7YmqhO9SCKJ6NyjlhCfPoxUfSjCYTqE1KeHAAxHM9Tw9gppxJP2PVIJdGIZRvjxvv_IFLk21Z4RvM-Z5vaG_fTJqB_39H4U1IKmN-GzAzvj-D_U_qtJP2eXKoyilA0xbHNItAwqVjPgXRb-Vhh6uxmFz9XdVFwB_hgL3NMENfMfWJqHl1ST5d9YQWqrQpD3wVfwQItXUWSlhZmLeZ9SpJxuJ4Hhlb0CN82ce0urKYqBjSC52rUy7_Ky6wUIR9iUeVtYT1EFxmDnsC6h6V1th1CjgOfO05Q6vlQygP_UnNR44uuYdsU73HWHjpg"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/orders-rpde?afterTimestamp=638472254740448564&afterId=2a2bf43b-4744-455a-8bd9-fd4dc28d5a21",
  "message": "Listening for UUID: 'ce22f721-9306-4cce-b024-9294000f16cf' in feed: orders, for Booking Partner: primary from startingFeedPage using headers"
}

Call TestInterface Action of type: test:CustomerNoticeSimulateAction Request

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

{
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "@type": "test:CustomerNoticeSimulateAction",
  "object": {
    "@type": "Order",
    "@id": "https://localhost:5001/api/openbooking/orders/ce22f721-9306-4cce-b024-9294000f16cf"
  }
}

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

Specs

✅ Orders Feed (after test:CustomerNoticeSimulateAction)

Orders (orders) Feed collect for 'ce22f721-9306-4cce-b024-9294000f16cf' change (auth: primary) Request

GET http://localhost:3000/order-listeners/orders/primary/ce22f721-9306-4cce-b024-9294000f16cf


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

{
  "state": "updated",
  "kind": "Order",
  "id": "ce22f721-9306-4cce-b024-9294000f16cf",
  "modified": "638472254808436550",
  "data": {
    "@context": "https://openactive.io/",
    "@type": "Order",
    "@id": "https://localhost:5001/api/openbooking/orders/ce22f721-9306-4cce-b024-9294000f16cf",
    "identifier": "ce22f721-9306-4cce-b024-9294000f16cf",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/ce22f721-9306-4cce-b024-9294000f16cf#/orderedItems/1924",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1605#/offers/0",
          "price": 0,
          "priceCurrency": "GBP"
        },
        "accessChannel": {
          "@type": "VirtualLocation",
          "name": "Zoom Video Chat",
          "description": "Please log into Zoom a few minutes before the event",
          "accessCode": "0144374100",
          "accessId": "2538143194",
          "url": "http://stephanie.net/"
        },
        "customerNotice": "customer notice message: bcplutrapj",
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1605/events/16047",
        "orderItemStatus": "https://openactive.io/OrderItemConfirmed"
      }
    ],
    "totalPaymentDue": {
      "@type": "PriceSpecification",
      "openBookingPrepayment": "https://openactive.io/Unavailable",
      "price": 0,
      "priceCurrency": "GBP"
    }
  }
}

Specs

✅ Orders Feed (after test:CustomerNoticeSimulateAction) >> validation of OrderFeed

Specs

Validations