Skip to content

Document required bookable.price and the 400 on POST /{version}/bookings - #126

Draft
lrcarrera wants to merge 1 commit into
mainfrom
sptech/document-required-booking-price
Draft

lrcarrera wants to merge 1 commit into
mainfrom
sptech/document-required-booking-price

Conversation

@lrcarrera

@lrcarrera lrcarrera commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

Companion to getyourguide/public-partner-api#2105.

POST /{version}/bookings without data.booking.bookable.price used to fail with a 500 (NullPointerException in the price check). It now returns a 400 (errorCode 12, Booking price is required.) before any availability or pricing lookup.

Changes:

  • BookingsCreate description (spec/paths/bookings.yaml): spell out the required bookable fields (option_id, datetime, price, categories), the 400 for a missing price, and that a present price is then checked against the option's current price (errorCode 308).

No schema or type changes: price was already listed under required for bookable, so generated clients are unaffected. Description-only, same shape as #125.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works (n/a, description-only spec change; behavior is covered by unit + Karate tests in the linked service PR)

🤖 Generated with Claude Code

Companion to getyourguide/public-partner-api: a booking request without
bookable.price used to fail with a 500 and now returns 400 (errorCode 12).
Description-only change; price was already listed as required.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant