---
title: Conventions
summary: The envelope, paging, filters, dates, numbers and ids, the same everywhere unless an endpoint page says otherwise.
group: Get started
order: 30
---

## Requests

- HTTPS to `https://marketplace-api.sequifi.com`, JSON in and out. Send `Content-Type: application/json` on every request with a body.
- Paths are versioned (`/v1/...`). Field names are `snake_case`.
- Query parameter names are case-sensitive. List endpoints reject a parameter they don't know with `400` and list the ones they accept in `data.allowed_params`, so a typo fails loudly instead of being ignored.
- If you repeat a query parameter, only the last value counts. Filters take one value each.
- Where supported, `include` requests optional related fields; each endpoint lists its accepted values, and these fields are omitted by default.

## The response envelope

Everything the API itself returns has three keys:

```json
{ "status": 200, "message": "success", "data": { } }
```

- `status` repeats the HTTP status code.
- `message` is for people; don't branch on its wording. Branch on the HTTP status and, where an endpoint documents one, on `data.code`.
- `data` holds the result, or error detail (`{}` when there is none).

A few responses come from the gateway in front of the API instead and are just `{ "message": "..." }`: `401` (token), `403 Missing Authentication Token` (that path or method does not exist), `429` (too many requests) and `504` (took longer than about 29 seconds). See [Errors and retries](https://apidocs.sequifi.com/guides/errors.md).

`data.requestedBy` (or `requested_by` on some endpoints) is the name of the API credential set your token belongs to. It is not your company's name.

## Paging

List endpoints use page numbers:

| Parameter | Meaning |
| --- | --- |
| `page` | 1-based page number |
| `per_page` | rows per page; the default and the maximum differ per endpoint and are on each endpoint page |

Responses carry `current_page`, `per_page`, `total` and `last_page` next to the rows. To read everything, loop until `current_page` reaches `last_page`. A page past the end returns `200` with an empty list.

Rows can shift between pages if records are created while you page, so de-duplicate by `id`. Where an endpoint offers an `updated_after` or `updated_since` filter, use it to pull only what changed since your last sync instead of re-reading everything.

## Dates and times

- **Send** dates as `YYYY-MM-DD`. Send a real calendar date: some endpoints don't reject an impossible date like `2026-02-30`; they roll it into the next month.
- **Timestamps come back** as ISO 8601 in UTC, for example `2026-03-01T14:05:09.000Z`.
- **Calendar dates can come back as midnight UTC**, for example `2026-03-01T00:00:00.000Z` for March 1. Take the first 10 characters. Don't convert it to local time: in any US time zone that turns it into February 28.
- Unless an endpoint specifies your company's time zone, "today" (a dismissal date, a default `effective_date`) means today in UTC, which is tomorrow in the US after late afternoon.

## Numbers and money

- Amounts are in dollars with cents (`1250.75`), not in cents.
- Some endpoints return decimals as strings (`"1250.7500"`). Parse amounts with a decimal type rather than relying on the JSON type, and round to cents for display.
- Percentages are plain numbers (`3.5` means 3.5%) unless the endpoint says otherwise.

## Ids

- Sequifi ids (`id`, `user_id`, `position_id`, ...) are integers and belong to your company: the same number means nothing to another company.
- `pid` is **your** id for a sale: a string you choose, unique within your company. It is how you create and update sales.
- `null` means "no value"; a missing key usually means the same.

## Rate and pace

Keep to about **10 requests a second** overall, and for `POST /v1/sales` to **30 requests a minute**, one at a time, with up to 200 records each. Scheduled batches fit easily inside that. If you get `429`, wait and retry with exponential backoff.

`POST /v1/sales/{pid}/recalculate` has its own limits per company: **one at a time**, at most **20 a minute and 300 an hour**, and each sale **once every 10 minutes**. Send sales one after another, wait for each answer, and honor `Retry-After` on a `429`.
