Understand API conventions
Resolve the base URL, content types, identifiers, and unspecified error responses.
Use these contract-level rules when constructing requests and interpreting responses.
Base URL
The OpenAPI document declares the relative server URL /api/v3. Resolved against the host that serves the contract, the examples use:
https://petstore3.swagger.io/api/v3Paths on endpoint pages are relative to this base URL.
Content types
JSON is the common representation in this documentation. The contract also declares:
- XML responses and request bodies for several pet, order, and user operations.
application/x-www-form-urlencodedrequest bodies for creating or updating pets, placing orders, and creating or updating users.application/octet-streamfor pet image uploads.
Send a Content-Type header that matches the request body and an Accept header for the representation you want to receive.
Identifiers and enums
Pet and order identifiers use 64-bit integer schemas. Category, tag, and user identifiers also use 64-bit integers. Supported enum values are:
- Pet
status:available,pending, orsold. - Order
status:placed,approved, ordelivered.
Default errors
Every operation defines a default response described as Unexpected error, but the contract assigns no fixed status code, content type, or body schema to that response. Endpoint pages document only numeric statuses and payload shapes established by the contract.
X-Rate-Limit and X-Expires-After headers.Next, review the data models or browse the pet endpoint reference.