ti-ext-api icon indicating copy to clipboard operation
ti-ext-api copied to clipboard

reservations endpoint missing fields when creating a record and more

Open noromamai opened this issue 4 years ago • 1 comments

Expected behavior: being able to set all fields when creating a reservation through api. default values to be applied if non-required fields are left empty. reservation should have same status as reservations that are entered through website (or are you supposed to create the reservation and then update it with a status_id?)

Actual behavior: when creating a reservation the reservation duration can't be entered. after a reservation is created it will have the "incomplete" status because no duration is set. table_id must be entered even though documentation states only firs, last name and email are required. if left empty it should automatically be filled with 0 (just like when an reservation is placed on the website without table selection). using php and curl, when creating a reservation user_agent field is not filled when creating a record in the database and an error is thrown. newly created reservation does not have any status.

temp fixed by altering db structure and set a default value for the duration, default value '0' for table_id, set a default for status_id and allow NULL for user_agent.

Reproduce steps: (Describe the steps to reproduce the problem here)

Version: TI 3.0.4 beta28 API Extension 1.0.0

Additional Information: (Additional information, if any)

noromamai avatar Jun 23 '21 14:06 noromamai

Yes please open a PR with the change to the documentation on table_id

You should be able to pass "duration" as a field? Again the docs just need updated if you have the time.

ryanmitchell avatar Jun 23 '21 16:06 ryanmitchell