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

order-deletion >> order-delete-idempotent (OpenBookingApprovalFlow >> ScheduledSession)

Booking Flow: OpenBookingApprovalFlow

Opportunity Type: ScheduledSession

Feature: Core / Order Deletion Endpoint (Implemented)

Test: Order successfully deleted, second delete does not change the state of the first delete

Order Delete is idempotent - run C1, C2, and B then Order Delete twice - the Order Delete must return 204 in both cases

Running only this test

npm start -- --runInBand test/features/core/order-deletion/implemented/order-delete-idempotent-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.


⚠️ 21 passed with 0 failures, 93 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.930867ms.

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

Opportunity Feed extract for OrderItem 0 Request

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


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
    "startDate": "2024-04-02T21:11:33+00:00",
    "endDate": "2024-04-03T02:34:33+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1407",
      "identifier": 1407,
      "name": "GOLDEN: Fresh Walking",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#95092977-5a20-4d6e-b312-8fddabe71544",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Walking"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/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,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        }
      ],
      "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": "04133 018984",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://deion.org"
      },
      "url": "https://www.example.com/sessions/1407"
    },
    "duration": "PT5H23M",
    "maximumAttendeeCapacity": 2,
    "remainingAttendeeCapacity": 2
  }
}

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/ccf9583f-15ae-41a1-a863-28e505a03ea6

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

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/ccf9583f-15ae-41a1-a863-28e505a03ea6",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-28T12:30:37+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/1407#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "latestCancellationBeforeStartDate": "P1DT16H",
        "openBookingPrepayment": "https://openactive.io/Unavailable",
        "price": 0,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P13DT6H57M"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
        "startDate": "2024-04-02T21:11:33+00:00",
        "endDate": "2024-04-03T02:34:33+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407",
          "name": "Fresh Walking",
          "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/1407"
        },
        "maximumAttendeeCapacity": 2,
        "remainingAttendeeCapacity": 2
      },
      "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%2F1407%2Fevents%2F14064?useCacheIfAvailable=true&expectedCapacity=1


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

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
  "modified": "1711628739335",
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
    "startDate": "2024-04-02T21:11:33+00:00",
    "endDate": "2024-04-03T02:34:33+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1407",
      "identifier": 1407,
      "name": "GOLDEN: Fresh Walking",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#95092977-5a20-4d6e-b312-8fddabe71544",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Walking"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/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,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        }
      ],
      "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": "04133 018984",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://deion.org"
      },
      "url": "https://www.example.com/sessions/1407"
    },
    "duration": "PT5H23M",
    "maximumAttendeeCapacity": 2,
    "remainingAttendeeCapacity": 1
  }
}

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/ccf9583f-15ae-41a1-a863-28e505a03ea6

{
  "@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]",
    "givenName": "Weissnat"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/ccf9583f-15ae-41a1-a863-28e505a03ea6",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-28T12:30:39+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",
    "email": "[email protected]",
    "givenName": "Weissnat"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "latestCancellationBeforeStartDate": "P1DT16H",
        "openBookingPrepayment": "https://openactive.io/Unavailable",
        "price": 0,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P13DT6H57M"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
        "startDate": "2024-04-02T21:11:33+00:00",
        "endDate": "2024-04-03T02:34:33+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407",
          "name": "Fresh Walking",
          "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/1407"
        },
        "maximumAttendeeCapacity": 2,
        "remainingAttendeeCapacity": 2
      },
      "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%2F1407%2Fevents%2F14064?useCacheIfAvailable=true&expectedCapacity=1


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
    "startDate": "2024-04-02T21:11:33+00:00",
    "endDate": "2024-04-03T02:34:33+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1407",
      "identifier": 1407,
      "name": "GOLDEN: Fresh Walking",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#95092977-5a20-4d6e-b312-8fddabe71544",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Walking"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/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,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        }
      ],
      "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": "04133 018984",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://deion.org"
      },
      "url": "https://www.example.com/sessions/1407"
    },
    "duration": "PT5H23M",
    "maximumAttendeeCapacity": 2,
    "remainingAttendeeCapacity": 1
  }
}

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/ccf9583f-15ae-41a1-a863-28e505a03ea6

{
  "@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]",
    "givenName": "Weissnat"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064"
    }
  ],
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "price": 0,
    "priceCurrency": "GBP"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "@id": "https://localhost:5001/api/openbooking/order-proposals/ccf9583f-15ae-41a1-a863-28e505a03ea6",
  "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",
    "email": "[email protected]",
    "givenName": "Weissnat"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6#/orderedItems/2044",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "latestCancellationBeforeStartDate": "P1DT16H",
        "openBookingPrepayment": "https://openactive.io/Unavailable",
        "price": 0,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P13DT6H57M"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
        "startDate": "2024-04-02T21:11:33+00:00",
        "endDate": "2024-04-03T02:34:33+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407",
          "name": "Fresh Walking",
          "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/1407"
        },
        "maximumAttendeeCapacity": 2,
        "remainingAttendeeCapacity": 2
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 0,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/ccf9583f-15ae-41a1-a863-28e505a03ea6/versions/1f1e44bd-da84-4f5f-b09d-2160bf19ef35",
  "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 'ccf9583f-15ae-41a1-a863-28e505a03ea6' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/ccf9583f-15ae-41a1-a863-28e505a03ea6


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

{
  "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=638472255390759971&afterId=5dbf93c7-f41a-4806-ae48-342961d4d45c",
  "message": "Listening for UUID: 'ccf9583f-15ae-41a1-a863-28e505a03ea6' 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/ccf9583f-15ae-41a1-a863-28e505a03ea6"
  }
}

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

Specs

✅ OrderProposal Feed Update (after Simulate Seller Approval)

Orders (order-proposals) Feed collect for 'ccf9583f-15ae-41a1-a863-28e505a03ea6' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/ccf9583f-15ae-41a1-a863-28e505a03ea6


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

{
  "state": "updated",
  "kind": "Order",
  "id": "ccf9583f-15ae-41a1-a863-28e505a03ea6",
  "modified": "638472255416669485",
  "data": {
    "@context": "https://openactive.io/",
    "@type": "OrderProposal",
    "@id": "https://localhost:5001/api/openbooking/order-proposals/ccf9583f-15ae-41a1-a863-28e505a03ea6",
    "identifier": "ccf9583f-15ae-41a1-a863-28e505a03ea6",
    "orderProposalStatus": "https://openactive.io/SellerAccepted",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6#/orderedItems/2044",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "price": 0,
          "priceCurrency": "GBP"
        },
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064"
      }
    ],
    "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/ccf9583f-15ae-41a1-a863-28e505a03ea6/versions/1f1e44bd-da84-4f5f-b09d-2160bf19ef35",
    "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 'ccf9583f-15ae-41a1-a863-28e505a03ea6' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/ccf9583f-15ae-41a1-a863-28e505a03ea6


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

{
  "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=638472255416669485&afterId=ccf9583f-15ae-41a1-a863-28e505a03ea6",
  "message": "Listening for UUID: 'ccf9583f-15ae-41a1-a863-28e505a03ea6' in feed: order-proposals, for Booking Partner: primary from startingFeedPage using headers"
}

B Request

PUT https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/ccf9583f-15ae-41a1-a863-28e505a03ea6/versions/1f1e44bd-da84-4f5f-b09d-2160bf19ef35"
}

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

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "@id": "https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6",
  "identifier": "ccf9583f-15ae-41a1-a863-28e505a03ea6",
  "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",
    "email": "[email protected]",
    "givenName": "Weissnat"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6#/orderedItems/2044",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
        "allowCustomerCancellationFullRefund": false,
        "latestCancellationBeforeStartDate": "P1DT16H",
        "openBookingPrepayment": "https://openactive.io/Unavailable",
        "price": 0,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P13DT6H57M"
      },
      "accessChannel": {
        "@type": "VirtualLocation",
        "name": "Zoom Video Chat",
        "description": "Please log into Zoom a few minutes before the event",
        "accessCode": "2563265221",
        "accessId": "9931301254"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
        "startDate": "2024-04-02T21:11:33+00:00",
        "endDate": "2024-04-03T02:34:33+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407",
          "name": "Fresh Walking",
          "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/1407"
        },
        "maximumAttendeeCapacity": 2,
        "remainingAttendeeCapacity": 2
      },
      "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 'ccf9583f-15ae-41a1-a863-28e505a03ea6' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/ccf9583f-15ae-41a1-a863-28e505a03ea6


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

{
  "state": "deleted",
  "kind": "Order",
  "id": "ccf9583f-15ae-41a1-a863-28e505a03ea6",
  "modified": "638472255437890000"
}

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%2F1407%2Fevents%2F14064?useCacheIfAvailable=true&expectedCapacity=1


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1407/events/14064",
    "startDate": "2024-04-02T21:11:33+00:00",
    "endDate": "2024-04-03T02:34:33+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1407",
      "identifier": 1407,
      "name": "GOLDEN: Fresh Walking",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#95092977-5a20-4d6e-b312-8fddabe71544",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Walking"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/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,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1407#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": false,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval",
            "https://openactive.io/OpenBookingNegotiation"
          ],
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P13DT6H57M"
        }
      ],
      "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": "04133 018984",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "https://deion.org"
      },
      "url": "https://www.example.com/sessions/1407"
    },
    "duration": "PT5H23M",
    "maximumAttendeeCapacity": 2,
    "remainingAttendeeCapacity": 1
  }
}

Specs

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

Specs

Validations

✅ Order Deletion

delete-order Request

DELETE https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6


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

delete-order Request

DELETE https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6


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

Specs

✅ Order Deletion

delete-order Request

DELETE https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6


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

delete-order Request

DELETE https://localhost:5001/api/openbooking/orders/ccf9583f-15ae-41a1-a863-28e505a03ea6


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

Specs