> For the complete documentation index, see [llms.txt](https://mobile-calendar.gitbook.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobile-calendar.gitbook.io/v1/rest-api/pricing.md).

# Pricing

Get pricing information for rooms or room types.

## GET /pricing

> Get pricing information for rooms/types and rates

```json
{"openapi":"3.0.0","info":{"title":"Public REST API v1 – mobile-calendar.com","version":"1.0.0"},"tags":[{"name":"pricing","description":"Get pricing information for rooms or room types."}],"servers":[{"url":"https://api.mobile-calendar.com/v1/public","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"Pass the token in header: Authorization: Bearer <JWT>","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"PricingResponse":{"description":"Pricing response for specified date range, rooms/types, and rates","required":["data","meta"],"properties":{"data":{"description":"Pricing data for all requested rooms/types and rates","type":"array","items":{"$ref":"#/components/schemas/PricingEntry"}},"meta":{"$ref":"#/components/schemas/MetaWithRuid"}},"type":"object"},"PricingEntry":{"description":"Pricing entry for a specific room or room type with rate","properties":{"roomId":{"description":"Room ID (null for room type pricing)","type":"integer","nullable":true},"typeId":{"description":"Room type ID (null for individual room pricing)","type":"integer","nullable":true},"prices":{"description":"Daily prices for the requested date range","type":"array","items":{"$ref":"#/components/schemas/DailyPrice"}},"rate":{"$ref":"#/components/schemas/Rate"}},"type":"object"},"DailyPrice":{"description":"Price information for a specific date","required":["date","basePrice"],"properties":{"date":{"type":"string","format":"date"},"basePrice":{"description":"Base price for the leading occupancy","type":"number","format":"float"},"restrictions":{"oneOf":[{"$ref":"#/components/schemas/PriceRestrictions"}],"nullable":true,"description":"Booking restrictions for this date"},"derivedPrices":{"description":"Prices for different occupancy levels","type":"array","items":{"$ref":"#/components/schemas/OccupancyPrice"},"nullable":true}},"type":"object"},"PriceRestrictions":{"description":"Booking restrictions for a specific date","properties":{"minStay":{"description":"Minimum stay requirement in nights","type":"integer","nullable":true},"maxStay":{"description":"Maximum stay allowed in nights","type":"integer","nullable":true},"closed":{"description":"Whether this date is closed for bookings (0=open, 1=closed)","type":"integer"},"availArrival":{"description":"Whether arrival is allowed on this date (0=no, 1=yes)","type":"integer"},"availDeparture":{"description":"Whether departure is allowed on this date (0=no, 1=yes)","type":"integer"},"minAdvanceRes":{"description":"Minimum advance reservation days","type":"integer","nullable":true},"maxAdvanceRes":{"description":"Maximum advance reservation days","type":"integer","nullable":true}},"type":"object"},"OccupancyPrice":{"description":"Price for specific number of persons","required":["persons","price"],"properties":{"persons":{"description":"Number of persons","type":"integer"},"price":{"description":"Price for this occupancy level","type":"number","format":"float"}},"type":"object"},"Rate":{"description":"Rate information with cancellation policy","required":["rateId","name"],"properties":{"rateId":{"type":"integer"},"name":{"description":"Rate name","type":"string"},"parentRateId":{"description":"Parent rate ID for derived rates","type":"integer","nullable":true},"percentage":{"description":"Percentage modifier from parent rate","type":"number","format":"float","nullable":true},"cancellationPolicy":{"oneOf":[{"$ref":"#/components/schemas/CancellationPolicy"}],"nullable":true,"description":"Cancellation policy for this rate"}},"type":"object"},"CancellationPolicy":{"description":"Cancellation policy details","required":["cancellationId","type"],"properties":{"cancellationId":{"type":"integer"},"type":{"type":"string","enum":["REFUNDABLE","NONREFUNDABLE"]},"cancellationPenaltyPercentageAfterDeadline":{"description":"Penalty percentage after deadline","type":"integer","nullable":true},"deadlineDays":{"description":"Deadline in days before arrival","type":"integer","nullable":true},"deadlineHours":{"description":"Deadline in hours before arrival","type":"integer","nullable":true},"cancellationPenaltyNightsAfterDeadline":{"description":"Penalty in nights after deadline","type":"integer","nullable":true},"noShow":{"description":"No-show policy","type":"string"},"prepaymentPercentage":{"description":"Required prepayment percentage","type":"integer","nullable":true},"prepaymentFirstNight":{"description":"Whether prepayment covers first night only","type":"boolean"}},"type":"object"},"MetaWithRuid":{"description":"Metadata with request tracking.","required":["ruid"],"properties":{"ruid":{"description":"Request Unique ID","type":"string","format":"uuid"}},"type":"object"},"ApiProblem400":{"description":"Request syntax/format error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"400 Bad Request","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblemBase":{"description":"RFC 7807 Problem Details (base schema).","required":["type","title","status","detail","instance"],"properties":{"type":{"description":"RFC 7807 base — DO NOT use directly in endpoints.\nIn endpoints reference ApiProblem400/401/403/409/422/429/500.","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"},"ApiProblem401":{"description":"Missing authentication or invalid credentials.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"401 Unauthorized","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblem422":{"description":"Input data validation error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"422 Unprocessable Entity (validation)","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"description":"Map: field name → error message(s)","type":"object","additionalProperties":{"$ref":"#/components/schemas/ErrorValue"}}},"type":"object"}]},"ErrorValue":{"description":"Single error message or list of messages.","oneOf":[{"description":"Error value in error map can be:\n- single string, or\n- array of strings (multiple messages for one field).","type":"string"},{"type":"array","items":{"type":"string"}}]}}},"paths":{"/pricing":{"get":{"tags":["pricing"],"summary":"Get pricing information for rooms/types and rates","operationId":"getPricing","parameters":[{"name":"from","in":"query","description":"Start date for pricing check (inclusive) - YYYY-MM-DD","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"End date for pricing check (inclusive) - YYYY-MM-DD. Maximum 90 days from 'from' date.","required":true,"schema":{"type":"string","format":"date"}},{"name":"roomId","in":"query","description":"Array of room IDs to get pricing for. If not provided, returns pricing for all rooms.","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"typeId","in":"query","description":"Array of room type IDs to get pricing for. If not provided, returns pricing for all room types.","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"rateId","in":"query","description":"Array of rate IDs to get pricing for. If not provided, returns pricing for all rates.","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"lastEdit","in":"query","description":"Unix timestamp for cache validation. Returns 304 if data hasn't changed.","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Pricing data for requested rooms/types and rates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}}},"304":{"description":"Not Modified - data hasn't changed since lastEdit timestamp"},"400":{"description":"Bad request - invalid date range or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem400"}}}},"401":{"description":"Unauthorized - invalid or missing authentication token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem401"}}}},"422":{"description":"Validation error - date range exceeds 90 days, invalid date format, or invalid room/type/rate IDs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem422"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mobile-calendar.gitbook.io/v1/rest-api/pricing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
