openactive-test-suite

< Return to Summary File Generated: Fri Oct 01 2021 08:10:05 GMT+0000 (Coordinated Universal Time)

opportunity-attendance-updates » opportunity-attendance-update-customer-attended (OpenBookingApprovalFlow » FacilityUseSlot)

Booking Flow: OpenBookingApprovalFlow

Opportunity Type: FacilityUseSlot

Feature: Notifications / Opportunity attendance updates (Implemented)

Test: Changes to an opportunity’s attendance (via AttendeeAttendedSimulateAction) should update the Order Feed.

After B, invoke an AttendeeAttendedSimulateAction. This should create an update in the Order Feed with the OrderItem’s orderItemStatus changed to https://openactive.io/CustomerAttended

Running only this test

npm start -- --runInBand test/features/notifications/opportunity-attendance-updates/implemented/opportunity-attendance-update-customer-attended-test.js

⚠️ 12 passed with 0 failures, 96 warnings and 10 suggestions


Fetch Opportunities

Booking System Test Interface for OrderItem 0 Request

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

{
  "@type": "Slot",
  "facilityUse": {
    "@type": "FacilityUse",
    "provider": {
      "@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",
  "test:testOpportunityDataShapeExpression": [
    {
      "@type": "test:TripleConstraint",
      "predicate": "https://openactive.io/remainingUses",
      "valueExpr": {
        "@type": "NumericNodeConstraint",
        "mininclusive": 2
      }
    },
    {
      "@type": "test:TripleConstraint",
      "predicate": "https://openactive.io/isOpenBookingAllowed",
      "valueExpr": {
        "@type": "test:BooleanNodeConstraint",
        "value": true
      }
    },
    {
      "@type": "test:TripleConstraint",
      "predicate": "https://schema.org/startDate",
      "valueExpr": {
        "@type": "test:DateRangeNodeConstraint",
        "minDate": "2021-10-01T09:55:12.486+00:00"
      }
    },
    {
      "@type": "test:TripleConstraint",
      "predicate": "https://schema.org/eventStatus",
      "valueExpr": {
        "@type": "test:OptionNodeConstraint",
        "datatype": "schema:EventStatusType",
        "blocklist": [
          "https://schema.org/EventCancelled",
          "https://schema.org/EventPostponed"
        ]
      }
    }
  ],
  "test:testOfferDataShapeExpression": [
    {
      "@type": "test:TripleConstraint",
      "predicate": "https://openactive.io/openBookingFlowRequirement",
      "valueExpr": {
        "@type": "test:ArrayConstraint",
        "datatype": "oa:OpenBookingFlowRequirement",
        "includesAll": [
          "https://openactive.io/OpenBookingApproval"
        ],
        "excludesAll": [
          "https://openactive.io/OpenBookingAttendeeDetails",
          "https://openactive.io/OpenBookingIntakeForm"
        ]
      }
    },
    {
      "@type": "test:TripleConstraint",
      "predicate": "https://openactive.io/validFromBeforeStartDate",
      "valueExpr": {
        "@type": "test:DateRangeNodeConstraint",
        "maxDate": "2021-10-01T07:55:12.486+00:00",
        "allowNull": true
      }
    },
    {
      "@type": "test:TripleConstraint",
      "predicate": "https://openactive.io/openBookingInAdvance",
      "valueExpr": {
        "@type": "test:OptionNodeConstraint",
        "datatype": "oa:RequiredStatusType",
        "blocklist": [
          "https://openactive.io/Unavailable"
        ]
      }
    }
  ]
}

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

{
  "@context": "https://openactive.io/",
  "@type": "Slot",
  "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354"
}

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Ffacility-uses%2F2354%2Ffacility-use-slots%2F20354?useCacheIfAvailable=true


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

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354",
  "modified": 1633075861203,
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "Slot",
    "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354",
    "identifier": 20354,
    "duration": "PT1H",
    "facilityUse": {
      "@type": "FacilityUse",
      "@id": "https://localhost:5001/api/identifiers/facility-uses/2354",
      "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Facility",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "location": {
        "@type": "Place",
        "name": "Fake Pond",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Another town",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1AA",
          "streetAddress": "1 Fake Park"
        },
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 0.1,
          "longitude": 0.1
        }
      },
      "provider": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age"
    },
    "maximumUses": 10,
    "offers": [
      {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "openBookingFlowRequirement": [
          "https://openactive.io/OpenBookingApproval"
        ],
        "price": 0,
        "priceCurrency": "GBP"
      }
    ],
    "remainingUses": 10,
    "startDate": "2021-10-02T08:10:57+00:00",
    "endDate": "2021-10-02T09:10:57+00:00"
  }
}

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/fe80e29c-525b-4e54-907e-ac63a297ba6c

{
  "@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/facility-uses/2354/facility-use-slots/20354#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/fe80e29c-525b-4e54-907e-ac63a297ba6c",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2021-10-01T08:16:00+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/facility-uses/2354/facility-use-slots/20354#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 0,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "Slot",
        "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354",
        "facilityUse": {
          "@type": "FacilityUse",
          "@id": "https://localhost:5001/api/identifiers/facility-uses/2354",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Facility",
          "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",
            "name": "Fake fitness studio",
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 0.1,
              "longitude": 0.1
            }
          },
          "url": "https://example.com/events/2354"
        },
        "maximumUses": 10,
        "remainingUses": 10,
        "startDate": "2021-10-02T08:10:57+00:00",
        "endDate": "2021-10-02T09:10:57+00:00"
      },
      "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

C2

C2 Request

PUT https://localhost:5001/api/openbooking/order-quotes/fe80e29c-525b-4e54-907e-ac63a297ba6c

{
  "@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-817-815-7210 x527",
    "givenName": "Toy",
    "familyName": "Catherine",
    "identifier": "c4321c4b-d2f4-4b9f-80dc-bbfdbfc60388"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/fe80e29c-525b-4e54-907e-ac63a297ba6c",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2021-10-01T08:16:00+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": "c4321c4b-d2f4-4b9f-80dc-bbfdbfc60388",
    "email": "[email protected]",
    "familyName": "Catherine",
    "givenName": "Toy",
    "telephone": "1-817-815-7210 x527"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 0,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "Slot",
        "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354",
        "facilityUse": {
          "@type": "FacilityUse",
          "@id": "https://localhost:5001/api/identifiers/facility-uses/2354",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Facility",
          "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",
            "name": "Fake fitness studio",
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 0.1,
              "longitude": 0.1
            }
          },
          "url": "https://example.com/events/2354"
        },
        "maximumUses": 10,
        "remainingUses": 10,
        "startDate": "2021-10-02T08:10:57+00:00",
        "endDate": "2021-10-02T09:10:57+00:00"
      },
      "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

P

P Request

PUT https://localhost:5001/api/openbooking/order-proposals/fe80e29c-525b-4e54-907e-ac63a297ba6c

{
  "@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-817-815-7210 x527",
    "givenName": "Toy",
    "familyName": "Catherine",
    "identifier": "c4321c4b-d2f4-4b9f-80dc-bbfdbfc60388"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354"
    }
  ],
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "price": 0,
    "priceCurrency": "GBP"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "@id": "https://localhost:5001/api/openbooking/order-proposals/fe80e29c-525b-4e54-907e-ac63a297ba6c",
  "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": "c4321c4b-d2f4-4b9f-80dc-bbfdbfc60388",
    "email": "[email protected]",
    "familyName": "Catherine",
    "givenName": "Toy",
    "telephone": "1-817-815-7210 x527"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/fe80e29c-525b-4e54-907e-ac63a297ba6c#/orderedItems/1806",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 0,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "Slot",
        "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354",
        "facilityUse": {
          "@type": "FacilityUse",
          "@id": "https://localhost:5001/api/identifiers/facility-uses/2354",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Facility",
          "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",
            "name": "Fake fitness studio",
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 0.1,
              "longitude": 0.1
            }
          },
          "url": "https://example.com/events/2354"
        },
        "maximumUses": 10,
        "remainingUses": 10,
        "startDate": "2021-10-02T08:10:57+00:00",
        "endDate": "2021-10-02T09:10:57+00:00"
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 0,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/fe80e29c-525b-4e54-907e-ac63a297ba6c/versions/04cf2b08-e4cb-4c44-9431-088f0b42bc18",
  "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 'fe80e29c-525b-4e54-907e-ac63a297ba6c' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/fe80e29c-525b-4e54-907e-ac63a297ba6c


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

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2MzMwNzQ5MTUsImV4cCI6MTYzMzA3ODUxNSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiNWQ0ZGYyZjgtOThkOC00ODg4LWEzNGMtY2FjN2E3YTljNDkxIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiNWQ0ZGYyZjgtOThkOC00ODg4LWEzNGMtY2FjN2E3YTljNDkxIiwianRpIjoiNjM2RjA1OUI5QzQ3RUUxQThCNzRFNzA2NUMyMTcyRTciLCJpYXQiOjE2MzMwNzQ5MTUsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.FJM6kZdzrEr3NolFnNEjSps40rjuG4DyrsneYWqxM4nCxzBNygpItBSzPN5PQ6KdF86tHVWjMpf7fYucSHK5Vgc54fMTQ0aWzyclj1iKIxHsqPlegqwrj8HaoU0fS5x6gRNs3DqpvvXNoP_dHY40dUxa99BpbzDu7c1mPLn7Y3ZOrDqTi_SovM8zj9gjyzO4Q9krQFOi5lUq_djDB1lRWBnsqhp6WkBnMmflAE7D0-F08v3qU2PRI5WaWCdCDZGU6KhOwSHvKzf1S0d3F6cU1IWWPvEa6Fg-Ojrugham1bdjVzPllJUWip_jO72L8qbkOGU042x3ZQuIJndB0f9tFg"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/order-proposals-rpde?afterTimestamp=637686726566251022&afterId=c9f39cca-ad7a-4892-b628-ee2f002cd38b",
  "message": "Listening for UUID: 'fe80e29c-525b-4e54-907e-ac63a297ba6c' 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/fe80e29c-525b-4e54-907e-ac63a297ba6c"
  }
}

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

Specs

OrderProposal Feed Update (after Simulate Seller Approval)

Orders (order-proposals) Feed collect for 'fe80e29c-525b-4e54-907e-ac63a297ba6c' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/fe80e29c-525b-4e54-907e-ac63a297ba6c


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

{
  "state": "updated",
  "kind": "Order",
  "id": "fe80e29c-525b-4e54-907e-ac63a297ba6c",
  "modified": 637686726621222800,
  "data": {
    "@context": "https://openactive.io/",
    "@type": "OrderProposal",
    "@id": "https://localhost:5001/api/openbooking/order-proposals/fe80e29c-525b-4e54-907e-ac63a297ba6c",
    "identifier": "fe80e29c-525b-4e54-907e-ac63a297ba6c",
    "orderProposalStatus": "https://openactive.io/SellerAccepted",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/fe80e29c-525b-4e54-907e-ac63a297ba6c#/orderedItems/1806",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354#/offers/0",
          "price": 0,
          "priceCurrency": "GBP"
        },
        "orderedItem": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354"
      }
    ],
    "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/fe80e29c-525b-4e54-907e-ac63a297ba6c/versions/04cf2b08-e4cb-4c44-9431-088f0b42bc18",
    "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 'fe80e29c-525b-4e54-907e-ac63a297ba6c' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/fe80e29c-525b-4e54-907e-ac63a297ba6c


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

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2MzMwNzQ5MTUsImV4cCI6MTYzMzA3ODUxNSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiNWQ0ZGYyZjgtOThkOC00ODg4LWEzNGMtY2FjN2E3YTljNDkxIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiNWQ0ZGYyZjgtOThkOC00ODg4LWEzNGMtY2FjN2E3YTljNDkxIiwianRpIjoiNjM2RjA1OUI5QzQ3RUUxQThCNzRFNzA2NUMyMTcyRTciLCJpYXQiOjE2MzMwNzQ5MTUsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.FJM6kZdzrEr3NolFnNEjSps40rjuG4DyrsneYWqxM4nCxzBNygpItBSzPN5PQ6KdF86tHVWjMpf7fYucSHK5Vgc54fMTQ0aWzyclj1iKIxHsqPlegqwrj8HaoU0fS5x6gRNs3DqpvvXNoP_dHY40dUxa99BpbzDu7c1mPLn7Y3ZOrDqTi_SovM8zj9gjyzO4Q9krQFOi5lUq_djDB1lRWBnsqhp6WkBnMmflAE7D0-F08v3qU2PRI5WaWCdCDZGU6KhOwSHvKzf1S0d3F6cU1IWWPvEa6Fg-Ojrugham1bdjVzPllJUWip_jO72L8qbkOGU042x3ZQuIJndB0f9tFg"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/order-proposals-rpde?afterTimestamp=637686726566251022&afterId=c9f39cca-ad7a-4892-b628-ee2f002cd38b",
  "message": "Listening for UUID: 'fe80e29c-525b-4e54-907e-ac63a297ba6c' in feed: order-proposals, for Booking Partner: primary from startingFeedPage using headers"
}

B Request

PUT https://localhost:5001/api/openbooking/orders/fe80e29c-525b-4e54-907e-ac63a297ba6c

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/fe80e29c-525b-4e54-907e-ac63a297ba6c/versions/04cf2b08-e4cb-4c44-9431-088f0b42bc18"
}

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

{
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/ns-beta"
  ],
  "@type": "Order",
  "@id": "https://localhost:5001/api/openbooking/orders/fe80e29c-525b-4e54-907e-ac63a297ba6c",
  "identifier": "fe80e29c-525b-4e54-907e-ac63a297ba6c",
  "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": "c4321c4b-d2f4-4b9f-80dc-bbfdbfc60388",
    "email": "[email protected]",
    "familyName": "Catherine",
    "givenName": "Toy",
    "telephone": "1-817-815-7210 x527"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/fe80e29c-525b-4e54-907e-ac63a297ba6c#/orderedItems/1806",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 0,
        "priceCurrency": "GBP"
      },
      "accessCode": [
        {
          "@type": "PropertyValue",
          "name": "Pin Code",
          "description": "523317",
          "value": "defaultValue"
        }
      ],
      "accessPass": [
        {
          "@type": "ImageObject",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png"
        },
        {
          "@type": "Barcode",
          "text": "2437796981",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
          "beta:codeType": "code128"
        }
      ],
      "orderedItem": {
        "@type": "Slot",
        "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354",
        "facilityUse": {
          "@type": "FacilityUse",
          "@id": "https://localhost:5001/api/identifiers/facility-uses/2354",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Facility",
          "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",
            "name": "Fake fitness studio",
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 0.1,
              "longitude": 0.1
            }
          },
          "url": "https://example.com/events/2354"
        },
        "maximumUses": 10,
        "remainingUses": 10,
        "startDate": "2021-10-02T08:10:57+00:00",
        "endDate": "2021-10-02T09:10:57+00:00"
      },
      "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 'fe80e29c-525b-4e54-907e-ac63a297ba6c' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/fe80e29c-525b-4e54-907e-ac63a297ba6c


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

{
  "state": "deleted",
  "kind": "Order",
  "id": "fe80e29c-525b-4e54-907e-ac63a297ba6c",
  "modified": 637686726644415400
}

Specs

OrderProposal Feed Deletion (after B) » validation of OrderFeed

Specs

Validations

Test Interface Action (test:AttendeeAttendedSimulateAction)

Orders (orders) Feed listen for 'fe80e29c-525b-4e54-907e-ac63a297ba6c' change (auth: primary) Request

POST http://localhost:3000/order-listeners/orders/primary/fe80e29c-525b-4e54-907e-ac63a297ba6c


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

{
  "headers": {
    "Accept": "application/json, application/vnd.openactive.booking+json; version=1",
    "Cache-Control": "max-age=0",
    "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2MzMwNzQ5MTUsImV4cCI6MTYzMzA3ODUxNSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiNWQ0ZGYyZjgtOThkOC00ODg4LWEzNGMtY2FjN2E3YTljNDkxIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiNWQ0ZGYyZjgtOThkOC00ODg4LWEzNGMtY2FjN2E3YTljNDkxIiwianRpIjoiNjM2RjA1OUI5QzQ3RUUxQThCNzRFNzA2NUMyMTcyRTciLCJpYXQiOjE2MzMwNzQ5MTUsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.FJM6kZdzrEr3NolFnNEjSps40rjuG4DyrsneYWqxM4nCxzBNygpItBSzPN5PQ6KdF86tHVWjMpf7fYucSHK5Vgc54fMTQ0aWzyclj1iKIxHsqPlegqwrj8HaoU0fS5x6gRNs3DqpvvXNoP_dHY40dUxa99BpbzDu7c1mPLn7Y3ZOrDqTi_SovM8zj9gjyzO4Q9krQFOi5lUq_djDB1lRWBnsqhp6WkBnMmflAE7D0-F08v3qU2PRI5WaWCdCDZGU6KhOwSHvKzf1S0d3F6cU1IWWPvEa6Fg-Ojrugham1bdjVzPllJUWip_jO72L8qbkOGU042x3ZQuIJndB0f9tFg"
  },
  "startingFeedPage": "https://localhost:5001/api/openbooking/orders-rpde?afterTimestamp=637686726596363156&afterId=c9f39cca-ad7a-4892-b628-ee2f002cd38b",
  "message": "Listening for UUID: 'fe80e29c-525b-4e54-907e-ac63a297ba6c' in feed: orders, for Booking Partner: primary from startingFeedPage using headers"
}

Call TestInterface Action of type: test:AttendeeAttendedSimulateAction Request

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

{
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "@type": "test:AttendeeAttendedSimulateAction",
  "object": {
    "@type": "Order",
    "@id": "https://localhost:5001/api/openbooking/orders/fe80e29c-525b-4e54-907e-ac63a297ba6c"
  }
}

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

Specs

Orders Feed (after test:AttendeeAttendedSimulateAction)

Orders (orders) Feed collect for 'fe80e29c-525b-4e54-907e-ac63a297ba6c' change (auth: primary) Request

GET http://localhost:3000/order-listeners/orders/primary/fe80e29c-525b-4e54-907e-ac63a297ba6c


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

{
  "state": "updated",
  "kind": "Order",
  "id": "fe80e29c-525b-4e54-907e-ac63a297ba6c",
  "modified": 637686726674888800,
  "data": {
    "@context": [
      "https://openactive.io/",
      "https://openactive.io/ns-beta"
    ],
    "@type": "Order",
    "@id": "https://localhost:5001/api/openbooking/orders/fe80e29c-525b-4e54-907e-ac63a297ba6c",
    "identifier": "fe80e29c-525b-4e54-907e-ac63a297ba6c",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/fe80e29c-525b-4e54-907e-ac63a297ba6c#/orderedItems/1806",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354#/offers/0",
          "price": 0,
          "priceCurrency": "GBP"
        },
        "accessCode": [
          {
            "@type": "PropertyValue",
            "name": "Pin Code",
            "description": "523317",
            "value": "defaultValue"
          }
        ],
        "accessPass": [
          {
            "@type": "Barcode",
            "text": "2437796981",
            "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
            "beta:codeType": "code128"
          }
        ],
        "orderedItem": "https://localhost:5001/api/identifiers/facility-uses/2354/facility-use-slots/20354",
        "orderItemStatus": "https://openactive.io/AttendeeAttended"
      }
    ],
    "totalPaymentDue": {
      "@type": "PriceSpecification",
      "openBookingPrepayment": "https://openactive.io/Unavailable",
      "price": 0,
      "priceCurrency": "GBP"
    }
  }
}

Specs

Orders Feed (after test:AttendeeAttendedSimulateAction) » validation of OrderFeed

Specs

Validations