Skip to content

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

Description

@PickertJoe

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions