openactive / open-booking-api

Repository for the Open Booking API specification
Other
2 stars 3 forks source link

Add `FileUploadFormFieldSpecification` #210

Open nickevansuk opened 3 years ago

nickevansuk commented 3 years ago

To facilitate scenarios where the Broker submits the URL of a file, an additional type should be added, e.g. FileUploadFormSpecification.

The Booking System should download the contents of this URL, and store it, and the Broker must ensure that the file at the URL is available until at least 7 days after the endDate of the orderedItem.

So at C1 and C2, the response includes:

{
  "@type": "OrderItem",
  ...
  "orderItemIntakeForm": [
    {
      "@type": "FileUploadFormFieldSpecification",
      "@id": "https://id.school-space.org/pli",
      "name": "PLI Certificate",
      "description": "Please upload your PLI certificate",
      "valueRequired": true
    }
  ]
}

And at C2, the request includes:

{
  "@type": "OrderItem",
  ...
  "orderItemIntakeFormResponse": [
    {
      "@type": "PropertyValue",
      "propertyID": "https://id.school-space.org/pli",
      "value": "https://example.file.com/abcd/efgh"
    }
  ]
}
nathansalter commented 3 years ago

I like this! We've implemented a similar system for some of our integrations, so doing this instead makes a lot of sense