Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET Requests for Existing AvailbilityRules Return 404 When Their Ids Contain "/" #115

Open
PickertJoe opened this issue Jul 31, 2024 · 0 comments

Comments

@PickertJoe
Copy link

Hey Cronofy team!

I'm seeing some strange behavior when attempting to read already-created availability rules from the API.

In this case, I've created a few availability rules for an application calendar and verified their existence by calling the .get_availability_rules on the instance of the client associated with my calendar's access token

[{"availability_rule_id"=>"kajabi-products/Site/1/User/2",
  "tzid"=>"America/Chicago",
  "weekly_periods"=>
   [{"day"=>"monday", "start_time"=>"09:00", "end_time"=>"17:15"},
    {"day"=>"tuesday", "start_time"=>"09:00", "end_time"=>"17:00"},
    {"day"=>"wednesday", "start_time"=>"09:00", "end_time"=>"17:00"},
    {"day"=>"thursday", "start_time"=>"09:00", "end_time"=>"17:00"},
    {"day"=>"friday", "start_time"=>"09:00", "end_time"=>"17:00"}]},
 {"availability_rule_id"=>"kajabi-products::dev::joe.pickert/Site/1/User/2/application_calendar",
  "tzid"=>"America/Chicago",
  "weekly_periods"=>
   [{"day"=>"monday", "start_time"=>"11:30", "end_time"=>"17:00"},
    {"day"=>"wednesday", "start_time"=>"09:00", "end_time"=>"17:00"},
    {"day"=>"friday", "start_time"=>"09:00", "end_time"=>"17:00"}]},
 {"availability_rule_id"=>"kajabi-products::development/Site/1/User/2/application_calendar",
  "tzid"=>"America/Chicago",
  "weekly_periods"=>
   [{"day"=>"monday", "start_time"=>"11:15", "end_time"=>"17:00"},
    {"day"=>"wednesday", "start_time"=>"09:00", "end_time"=>"17:00"},
    {"day"=>"thursday", "start_time"=>"08:00", "end_time"=>"12:00"},
    {"day"=>"friday", "start_time"=>"09:00", "end_time"=>"17:00"}]}]

When attempting to GET or DELETE these rules like so

client.get_availability_rule("kajabi-products::dev::joe.pickert/Site/1/User/2/application_calendar")

I'm getting 404 not found errors even though the record exists Cronofy::NotFoundError: 404 Not Found

I attempted to reproduce this using an id that did not include any forward slashes and found that the API returned and deleted my availability rule as expected. Could there be an issue with parsing forward slashes in this ID field?

Thank you!

@PickertJoe PickertJoe changed the title GET Requests for Existing AvailbilityRules Return 404 When Their Id's Contain "/" GET Requests for Existing AvailbilityRules Return 404 When Their Ids Contain "/" Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant