Open ameet-yb opened 2 days ago
The short answer is that a 'key' is assigned to an entity once it is created. You don't need to worry about it in this case, because making a booking doesn't rely on the key.
The longer answer:
The Portal API can be a bit confusing because sometimes it will reuse the same data structure for different purposes.
Here, the same data structure is used for proposed appointments and booked appointments.
If it's a proposed appointment then the key is blank because it hasn't been created yet.
If it's a booked (existing) appointment the key will be populated, and that will be what you can use to, e.g. cancel a booked appointment.
We have a small issue with the following endpoint requests:
Endpoint
GetProposedAppointments
Request
get_proposed_appointments
appointment_type: 00000000e575a769
payer_type: PA
clinician: 2045131
site: 235
number_of_results: 10
security: 221d36dcd0
action=get_proposed_appointments&appointment_type=00000000e575a769&payer_type=PA&clinician=2045131&site=235&number_of_results=10&security=REDACTED
Proposed Appointments fetched
{Key: '', Type: {…}, Start: '2024-11-14T15:45:00', Finish: '2024-11-14T16:10:00', Site: {…}, …}
2
:
{Key: '', Type: {…}, Start: '2024-11-14T16:00:00', Finish: '2024-11-14T16:25:00', Site: {…}, …}
3
:
{Key: '', Type: {…}, Start: '2024-11-14T16:15:00', Finish: '2024-11-14T16:40:00', Site: {…}, …}
4
:
{Key: '', Type: {…}, Start: '2024-11-14T16:30:00', Finish: '2024-11-14T16:55:00', Site: {…}, …}
5
:
{Key: '', Type: {…}, Start: '2024-11-14T16:45:00', Finish: '2024-11-14T17:10:00', Site: {…}, …}
6
:
{Key: '', Type: {…}, Start: '2024-11-14T17:00:00', Finish: '2024-11-14T17:25:00', Site: {…}, …}
7
:
{Key: '', Type: {…}, Start: '2024-11-14T17:15:00', Finish: '2024-11-14T17:40:00', Site: {…}, …}
8
:
{Key: '', Type: {…}, Start: '2024-11-14T17:30:00', Finish: '2024-11-14T17:55:00', Site: {…}, …}
9
:
{Key: '', Type: {…}, Start: '2024-11-14T19:15:00', Finish: '2024-11-14T19:40:00', Site: {…}, …}
Issue
As you can see above, we're making the calls correctly however, all of the bookings are returning a blank string as the key. Please can you let us know if this can be resolved or if something needs to be changed in our request?