Model the API

Requests & Responses — Backend Fundamentals

Requests are the public API endpoints Avora generates. A request should describe what the caller sends, what the backend does, and what response comes back.

Task

Design each endpoint around one clear operation.

Request partControlsExample
MethodThe kind of operationGET, POST, PATCH, DELETE
PathThe route users call/orders/{id}
Path variablesRequired values inside the routeid
Query paramsOptional filters, search, pagination, or sortingstatus, page
Body inputsData used by create, update, or action endpointsorder_data
OutputsSuccess and error response shapescreated, notFound

Swagger Shapes

Swagger reflects the request contract generated from Avora.

Modeling choiceSwagger input
Association 1:1 to an existing recordprofile_id: 1
Association *:*tag_ids: [1, 2]
Composition 1:1nested profile: {...}
Composition 1:*nested items: [{...}]
Auth profile created after signupno profile ID in signup

Steps

  1. Pick the method that matches the action.
  2. Keep paths resource-oriented and readable.
  3. Use path variables for required resource IDs.
  4. Use query params for optional filtering.
  5. Keep body inputs focused on data the caller is allowed to send.
  6. Define separate outputs for success and caller-visible errors.

Next

Use Request Builder for request setup and Preview and Swagger when you are ready to test the generated endpoint.