openactive-test-suite

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

reseller-broker » customer-included-resellerbroker-mode (OpenBookingApprovalFlow » ScheduledSession)

Booking Flow: OpenBookingApprovalFlow

Opportunity Type: ScheduledSession

Feature: Broker Role / ResellerBroker mode (Implemented)

Test: Customer included in Order in ResellerBroker mode

Request should succeed if broker and customer are included in Order in ResellerBroke mode for B request.

Running only this test

npm start -- --runInBand test/features/broker-role/reseller-broker/implemented/customer-included-resellerbroker-mode-test.js

⚠️ 9 passed with 0 failures, 95 warnings and 32 suggestions


Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » Fetch Opportunities

Booking System Test Interface for OrderItem 0 Request

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

{
  "@type": "ScheduledSession",
  "superEvent": {
    "@type": "SessionSeries",
    "organizer": {
      "@type": "Organization",
      "@id": "https://localhost:5001/api/identifiers/sellers/1"
    }
  },
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "test:testOpportunityCriteria": "https://openactive.io/test-interface#TestOpportunityBookable",
  "test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingApprovalFlow",
  "test:testOpportunityDataShapeExpression": [
    {
      "@type": "test:TripleConstraint",
      "predicate": "https://schema.org/remainingAttendeeCapacity",
      "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 154.841256ms.

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

Opportunity Feed extract for OrderItem 0 Request

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


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

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456",
  "modified": 1633076165355,
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456",
    "startDate": "2021-10-02T08:16:02+00:00",
    "endDate": "2021-10-02T09:16:02+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/2456",
      "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Event",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
      "location": {
        "@type": "Place",
        "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
        }
      },
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2456#/offers/0",
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "price": 0,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age"
    },
    "duration": "PT1H",
    "maximumAttendeeCapacity": 10,
    "remainingAttendeeCapacity": 10
  }
}

Specs

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » Fetch Opportunities » validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » C1

C1 Request

PUT https://localhost:5001/api/openbooking/order-quote-templates/7b53c229-be99-4cd6-9eac-aa18b676ff5f

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "brokerRole": "https://openactive.io/ResellerBroker",
  "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/2456#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/7b53c229-be99-4cd6-9eac-aa18b676ff5f",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2021-10-01T08:21:04+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/ResellerBroker",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2456#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 0,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456",
        "startDate": "2021-10-02T08:16:02+00:00",
        "endDate": "2021-10-02T09:16:02+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2456",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "name": "Fake fitness studio",
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.6201,
              "longitude": 0.302396
            }
          },
          "url": "https://example.com/events/2456"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "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

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » C1 » validation of C1

Specs

Validations

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » C2

C2 Request

PUT https://localhost:5001/api/openbooking/order-quotes/7b53c229-be99-4cd6-9eac-aa18b676ff5f

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "brokerRole": "https://openactive.io/ResellerBroker",
  "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": "(470) 632-3602 x145",
    "givenName": "McKenzie",
    "familyName": "Karl",
    "identifier": "33a83d83-575c-4729-bc8d-5d9dadb5f451"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2456#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/7b53c229-be99-4cd6-9eac-aa18b676ff5f",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2021-10-01T08:21:05+00:00"
  },
  "orderRequiresApproval": true,
  "bookingService": {
    "@type": "BookingService",
    "name": "Acme booking system",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ],
    "url": "https://example.com"
  },
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com"
  },
  "brokerRole": "https://openactive.io/ResellerBroker",
  "customer": {
    "@type": "Person",
    "identifier": "33a83d83-575c-4729-bc8d-5d9dadb5f451",
    "email": "[email protected]",
    "familyName": "Karl",
    "givenName": "McKenzie",
    "telephone": "(470) 632-3602 x145"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2456#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 0,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456",
        "startDate": "2021-10-02T08:16:02+00:00",
        "endDate": "2021-10-02T09:16:02+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2456",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "name": "Fake fitness studio",
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.6201,
              "longitude": 0.302396
            }
          },
          "url": "https://example.com/events/2456"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "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

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » C2 » validation of C2

Specs

Validations

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » P

P Request

PUT https://localhost:5001/api/openbooking/order-proposals/7b53c229-be99-4cd6-9eac-aa18b676ff5f

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "brokerRole": "https://openactive.io/ResellerBroker",
  "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": "(470) 632-3602 x145",
    "givenName": "McKenzie",
    "familyName": "Karl",
    "identifier": "33a83d83-575c-4729-bc8d-5d9dadb5f451"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/2456#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456"
    }
  ],
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "price": 0,
    "priceCurrency": "GBP"
  }
}

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

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "@id": "https://localhost:5001/api/openbooking/order-proposals/7b53c229-be99-4cd6-9eac-aa18b676ff5f",
  "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/ResellerBroker",
  "customer": {
    "@type": "Person",
    "identifier": "33a83d83-575c-4729-bc8d-5d9dadb5f451",
    "email": "[email protected]",
    "familyName": "Karl",
    "givenName": "McKenzie",
    "telephone": "(470) 632-3602 x145"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/7b53c229-be99-4cd6-9eac-aa18b676ff5f#/orderedItems/2391",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2456#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 0,
        "priceCurrency": "GBP"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456",
        "startDate": "2021-10-02T08:16:02+00:00",
        "endDate": "2021-10-02T09:16:02+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2456",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "name": "Fake fitness studio",
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.6201,
              "longitude": 0.302396
            }
          },
          "url": "https://example.com/events/2456"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 0,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/7b53c229-be99-4cd6-9eac-aa18b676ff5f/versions/21056143-fe6c-43ef-8d32-a1eaf01b25af",
  "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

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » P » validation of P

Specs

Validations

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » Simulate Seller Approval (Test Interface Action)

Orders (order-proposals) Feed listen for '7b53c229-be99-4cd6-9eac-aa18b676ff5f' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/7b53c229-be99-4cd6-9eac-aa18b676ff5f


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

{
  "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=637686729514794542&afterId=0758d196-5b87-4075-bf4e-7db4fdd6a943",
  "message": "Listening for UUID: '7b53c229-be99-4cd6-9eac-aa18b676ff5f' 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/7b53c229-be99-4cd6-9eac-aa18b676ff5f"
  }
}

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

Specs

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » OrderProposal Feed Update (after Simulate Seller Approval)

Orders (order-proposals) Feed collect for '7b53c229-be99-4cd6-9eac-aa18b676ff5f' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/7b53c229-be99-4cd6-9eac-aa18b676ff5f


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

{
  "state": "updated",
  "kind": "Order",
  "id": "7b53c229-be99-4cd6-9eac-aa18b676ff5f",
  "modified": 637686729673641200,
  "data": {
    "@context": "https://openactive.io/",
    "@type": "OrderProposal",
    "@id": "https://localhost:5001/api/openbooking/order-proposals/7b53c229-be99-4cd6-9eac-aa18b676ff5f",
    "identifier": "7b53c229-be99-4cd6-9eac-aa18b676ff5f",
    "orderProposalStatus": "https://openactive.io/SellerAccepted",
    "orderedItem": [
      {
        "@type": "OrderItem",
        "@id": "https://localhost:5001/api/openbooking/orders/7b53c229-be99-4cd6-9eac-aa18b676ff5f#/orderedItems/2391",
        "acceptedOffer": {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/2456#/offers/0",
          "price": 0,
          "priceCurrency": "GBP"
        },
        "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456"
      }
    ],
    "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/7b53c229-be99-4cd6-9eac-aa18b676ff5f/versions/21056143-fe6c-43ef-8d32-a1eaf01b25af",
    "totalPaymentDue": {
      "@type": "PriceSpecification",
      "openBookingPrepayment": "https://openactive.io/Unavailable",
      "price": 0,
      "priceCurrency": "GBP"
    }
  }
}

Specs

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » OrderProposal Feed Update (after Simulate Seller Approval) » validation of OrderFeed

Specs

Validations

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » B

Orders (order-proposals) Feed listen for '7b53c229-be99-4cd6-9eac-aa18b676ff5f' change (auth: primary) Request

POST http://localhost:3000/order-listeners/order-proposals/primary/7b53c229-be99-4cd6-9eac-aa18b676ff5f


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

{
  "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=637686729673641201&afterId=7b53c229-be99-4cd6-9eac-aa18b676ff5f",
  "message": "Listening for UUID: '7b53c229-be99-4cd6-9eac-aa18b676ff5f' in feed: order-proposals, for Booking Partner: primary from startingFeedPage using headers"
}

B Request

PUT https://localhost:5001/api/openbooking/orders/7b53c229-be99-4cd6-9eac-aa18b676ff5f

{
  "@context": "https://openactive.io/",
  "@type": "Order",
  "orderProposalVersion": "https://localhost:5001/api/openbooking/order-proposals/7b53c229-be99-4cd6-9eac-aa18b676ff5f/versions/21056143-fe6c-43ef-8d32-a1eaf01b25af"
}

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

{
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/ns-beta"
  ],
  "@type": "Order",
  "@id": "https://localhost:5001/api/openbooking/orders/7b53c229-be99-4cd6-9eac-aa18b676ff5f",
  "identifier": "7b53c229-be99-4cd6-9eac-aa18b676ff5f",
  "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/ResellerBroker",
  "customer": {
    "@type": "Person",
    "identifier": "33a83d83-575c-4729-bc8d-5d9dadb5f451",
    "email": "[email protected]",
    "familyName": "Karl",
    "givenName": "McKenzie",
    "telephone": "(470) 632-3602 x145"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "@id": "https://localhost:5001/api/openbooking/orders/7b53c229-be99-4cd6-9eac-aa18b676ff5f#/orderedItems/2391",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/2456#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "price": 0,
        "priceCurrency": "GBP"
      },
      "accessCode": [
        {
          "@type": "PropertyValue",
          "name": "Pin Code",
          "description": "348073",
          "value": "defaultValue"
        }
      ],
      "accessPass": [
        {
          "@type": "ImageObject",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png"
        },
        {
          "@type": "Barcode",
          "text": "6693404887",
          "url": "https://via.placeholder.com/25x25/cccccc/9c9c9c.png",
          "beta:codeType": "code128"
        }
      ],
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/2456/events/20456",
        "startDate": "2021-10-02T08:16:02+00:00",
        "endDate": "2021-10-02T09:16:02+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/2456",
          "name": "[OPEN BOOKING API TEST INTERFACE] Bookable Event",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "name": "Fake fitness studio",
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.6201,
              "longitude": 0.302396
            }
          },
          "url": "https://example.com/events/2456"
        },
        "maximumAttendeeCapacity": 10,
        "remainingAttendeeCapacity": 10
      },
      "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

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » B » validation of B

Specs

Validations

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » OrderProposal Feed Deletion (after B)

Orders (order-proposals) Feed collect for '7b53c229-be99-4cd6-9eac-aa18b676ff5f' change (auth: primary) Request

GET http://localhost:3000/order-listeners/order-proposals/primary/7b53c229-be99-4cd6-9eac-aa18b676ff5f


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

{
  "state": "deleted",
  "kind": "Order",
  "id": "7b53c229-be99-4cd6-9eac-aa18b676ff5f",
  "modified": 637686729705649400
}

Specs

Booking should succeed if Broker and Customer are included in Order, because we are in ResellerBroker mode » OrderProposal Feed Deletion (after B) » validation of OrderFeed

Specs

Validations