> ## Documentation Index
> Fetch the complete documentation index at: https://docs.symmetry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Request and response structure

> The CBS API envelope: content plus _links, and the model, fields, and calculation response shapes.

All CBS API traffic is JSON over HTTPS, and requests and responses share a consistent envelope.

## The response envelope

Every response wraps its payload in a `content` object and a `_links` object (HATEOAS):

```json theme={null}
{
  "content": { },
  "_links": {
    "self": { "href": "https://calculators.symmetry.com/api/calculators/salary" }
  }
}
```

`content` holds the requested data; `_links` gives the URL of the current resource plus related actions (such as a `calculate` link).

## GET a calculator: model vs. fields

A `GET` on a calculator resource returns its definition. The `format` query parameter controls the shape:

| `format`          | Returns                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------- |
| `model` (default) | The calculator's model object, the input fields and their defaults.                         |
| `fields`          | An array of field descriptors: name, label, default value, validation regex, and help text. |

```bash theme={null}
curl "https://calculators.symmetry.com/api/calculators/salary?format=fields" \
  -H "pcc-api-key: yourKey"
```

Use `model` to see the object you'll POST; use `fields` to build a form dynamically.

## POST to calculate

A `POST` to the calculator resource runs a calculation. The request body is the calculator's model (see [Object model and default properties](/cbs/api/object-model)); the response `content` holds the results:

```json theme={null}
{
  "content": {
    "grossPay": 1000.00,
    "federal": 102.86,
    "fica": 49.60,
    "medicare": 11.60,
    "state": 21.06,
    "netPay": 494.88,
    "voluntaryDeductions": []
  },
  "_links": { "self": { "href": "https://calculators.symmetry.com/api/calculators/salary" } }
}
```

`fica` is Social Security. Optional query params extend the response: `itd=true` adds a detailed tax breakdown, `report` returns a PDF report, and `showcalc` echoes the submitted inputs.

See the [API quickstart](/cbs/getting-started/call-api) for an end-to-end example and the [endpoint reference](/cbs/api-reference/salary-calculator/calculate-salary-paycheck) for full request and response schemas.
