# Sequifi Marketplace API > REST API for a Sequifi company's people, sales and pay data: users and onboarding, sales and their milestones, payroll, timesheets, commissions, earnings and reserve balances. JSON over HTTPS, one base URL, a Bearer token per company. - Base URL: `https://marketplace-api.sequifi.com` (fixed for every company and every call) - Auth: `Authorization: Bearer `. One token is scoped to one Sequifi company (tenant). - Format: JSON request and response bodies; responses use the envelope `{ status, message, data }`. - Start with the Quickstart and Conventions guides, then the endpoint pages. Every page below is Markdown. ## Get started - [Quickstart](https://apidocs.sequifi.com/guides/quickstart.md): From no token to a confirmed sale in four calls. - [Authentication](https://apidocs.sequifi.com/guides/authentication.md): How tokens are created, what they can do, how long they last, and how to refresh or rotate them. - [Conventions](https://apidocs.sequifi.com/guides/conventions.md): The envelope, paging, filters, dates, numbers and ids, the same everywhere unless an endpoint page says otherwise. - [Errors and retries](https://apidocs.sequifi.com/guides/errors.md): What each status means, what to do about it, and which writes are safe to send twice. - [Build with AI](https://apidocs.sequifi.com/guides/build-with-ai.md): Point Claude, Cursor or any agent at these docs, and the rules agents most often get wrong. ## Guides - [Posting Sales](https://apidocs.sequifi.com/guides/posting-sales.md): How to send sales to Sequifi in bulk with `POST /v1/sales` so every record lands, and how to confirm that it did. - [Vertical Labels](https://apidocs.sequifi.com/guides/vertical-labels.md): What each sales field is called in your company's Sequifi screens, by vertical, and which fields each vertical requires when you post a sale. ## API reference ### Authentication Keep an integration's access alive without an admin: exchange the refresh token for a new pair before the access token expires. - [Refresh an access token](https://apidocs.sequifi.com/reference/refresh-access-token.md): `POST /v1/auth/refreshToken`. Exchanges a refresh token for a new access token and a new refresh token, so an integration can keep working past the access token's 60 days without an admin. ### Users Read and update the people in your company: reps, managers and admins, with their position, office and status. - [List users](https://apidocs.sequifi.com/reference/list-users.md): `GET /v1/users`. Returns your company's employees (reps, managers and admins), newest first, with their office, position, manager, recruiter, onboarding state and home address. - [Update a user's profile](https://apidocs.sequifi.com/reference/update-user-profile.md): `POST /v1/users`. Updates an existing, active employee's personal details: name, sex, date of birth, email, mobile number, home address, emergency contact, your company's custom personal fields and admin-only fields. - [Get a user](https://apidocs.sequifi.com/reference/get-user.md): `GET /v1/users/{id}`. Returns one user by id, whatever their status, with the same fields as `GET /v1/users`. - [Dismiss a worker or undo a dismissal](https://apidocs.sequifi.com/reference/toggle-user-dismissal.md): `POST /v1/users/termination`. Dismisses a worker, or undoes the dismissal if they already have one on file. - [Dismiss a worker with an effective date](https://apidocs.sequifi.com/reference/terminate-user.md): `POST /v1/users/{id}/terminate`. Records an effective-dated dismissal for a worker, using the last working day you supply, which may be in the past. - [Transfer a user to an office](https://apidocs.sequifi.com/reference/transfer-user.md): `POST /v1/users/{id}/transfer`. Moves a user to another office from `effective_date`, either permanently or for a set window (for example a two-week blitz) after which they move back on their own. - [Change a user's position](https://apidocs.sequifi.com/reference/change-user-position.md): `POST /v1/users/{id}/position`. Changes a user's position from `effective_date`. ### Onboarding People being hired: create a record from your ATS, send the offer letter, then hire them into Users. - [List onboarding records](https://apidocs.sequifi.com/reference/list-onboarding-employees.md): `GET /v1/onboarding`. Lists people who are being onboarded and are not hired yet, newest first, 20 per page by default. - [Create or replace an onboarding record](https://apidocs.sequifi.com/reference/create-onboarding-employee.md): `POST /v1/onboarding`. Creates an onboarding record in Draft for a person you plan to hire, and copies the position's default pay onto it. - [Get an onboarding record](https://apidocs.sequifi.com/reference/get-onboarding-employee.md): `GET /v1/onboarding/{id}`. Returns one onboarding record that is not hired yet, as a single object in `data.onboarding_employee`. - [Create a user from onboarding](https://apidocs.sequifi.com/reference/hire-onboarding-employee.md): `PUT /v1/onboarding/hire`. Creates an active user (a rep) from an onboarding record and marks the record as hired. - [Send an offer letter](https://apidocs.sequifi.com/reference/send-offer-letter.md): `POST /v1/onboarding/{id}/send-offer`. Emails the candidate their offer letter for a Draft onboarding record, the same way Send offer letter works in the Sequifi app. ### Candidates The hiring pipeline before onboarding (the Candidates page in the app): the people you are recruiting and the stage each one is at. - [List candidate pipeline stages](https://apidocs.sequifi.com/reference/list-candidate-stages.md): `GET /v1/candidates/stages`. Returns your company's candidate pipeline stages (the columns of the hiring pipeline in Sequifi) in display order. - [List candidates](https://apidocs.sequifi.com/reference/list-candidates.md): `GET /v1/candidates`. Lists candidates: people in your recruiting pipeline who are not yet onboarding records. - [Get a candidate](https://apidocs.sequifi.com/reference/get-candidate.md): `GET /v1/candidates/{id}`. Returns one candidate by id. ### Teams Team rosters, as on the in-app Teams page: a Team Manager and Team Members. - [List teams](https://apidocs.sequifi.com/reference/list-teams.md): `GET /v1/teams`. Lists teams, as on the Teams page in Sequifi, each with its Team Manager and Team Members. - [Create a team](https://apidocs.sequifi.com/reference/create-team.md): `POST /v1/teams`. Creates one dated team with a Team Manager and members, as on the Teams page in Sequifi. - [Get a team](https://apidocs.sequifi.com/reference/get-team.md): `GET /v1/teams/{id}`. Returns one team by id with its Team Manager and every membership it has had, each with its own `start_date` and `end_date`. ### Positions The job positions your company pays by (for example Closer, Setter, Manager), each with its pay setup. - [List positions](https://apidocs.sequifi.com/reference/list-positions.md): `GET /v1/positions`. Returns your company's active positions in id order (oldest first), with each position's department, permission group, pay frequency and child positions. - [Get a position](https://apidocs.sequifi.com/reference/get-position.md): `GET /v1/positions/{id}`. Returns one active position by id, with the same fields as `GET /v1/positions`. ### Locations Your company's offices and the states they cover. - [List locations](https://apidocs.sequifi.com/reference/list-locations.md): `GET /v1/locations`. Returns your company's offices, newest first, so you can map office names to the `office_id` that users, onboarding records and transfers use. - [Get a location](https://apidocs.sequifi.com/reference/get-location.md): `GET /v1/locations/{id}`. Returns one office by id, active or inactive, as a single object at `data.location`. ### Documents Files stored on your people: uploaded onboarding documents (driver's licenses, W-9s and so on), signed agreements and profile photos. - [List documents](https://apidocs.sequifi.com/reference/list-documents.md): `GET /v1/documents`. Lists file details for people in your company: uploaded onboarding documents, signed e-sign documents and profile photos. - [Get a document download link](https://apidocs.sequifi.com/reference/get-document-download-url.md): `GET /v1/documents/{id}/download`. Exchanges a document `id` from `GET /v1/documents` for a signed download link that works for 10 minutes. ### Sales Create, update and read sales (loans, for mortgage companies). - [List sales](https://apidocs.sequifi.com/reference/list-sales.md): `GET /v1/sales`. Lists your company's processed sales (loans, for mortgage companies) with people, product, milestone dates, commission totals and custom field values. - [Create or update sales](https://apidocs.sequifi.com/reference/upsert-sales.md): `POST /v1/sales`. Creates or updates sales (loans, for mortgage companies) in bulk, keyed by your own `pid`. - [Get a sale](https://apidocs.sequifi.com/reference/get-sale.md): `GET /v1/sales/{pid}`. Returns one processed sale by its `pid`, with the same fields as an item of `GET /v1/sales`. - [Recalculate a sale](https://apidocs.sequifi.com/reference/recalculate-sale.md): `POST /v1/sales/{pid}/recalculate`. Recalculates one sale's commissions, milestones and overrides from its current data and the current pay plans. ### Milestones The milestone schedules your company pays commissions on (for example M1 at install, M2 at activation). - [List milestone schemas](https://apidocs.sequifi.com/reference/list-milestone-schemas.md): `GET /v1/milestones`. Lists your company's milestone schemas (payment plans), each with its milestones in order and the products linked to it. - [Get a milestone schema](https://apidocs.sequifi.com/reference/get-milestone-schema.md): `GET /v1/milestones/{id}`. Returns one milestone schema by its schema `id`, with its milestones in order and its linked products. ### Products Your product catalog. - [List products](https://apidocs.sequifi.com/reference/list-products.md): `GET /v1/products`. Lists your company's active products so you can map each product or package in your system to a Sequifi product. - [Get a product](https://apidocs.sequifi.com/reference/get-product.md): `GET /v1/products/{id}`. Returns one product by its integer `id`, whether active or inactive (deleted products return `404`). ### Custom Fields The extra fields your company has added to sales, payroll and onboarding records, with their types and options, so you can send and read their values. - [List custom fields](https://apidocs.sequifi.com/reference/list-custom-fields.md): `GET /v1/custom-fields`. Lists your company's custom field definitions for one `type`: `sales`, `payroll`, `employee`, `employee_admin` or `onboarding`. ### Integrations Raw records from a connected CRM or lender system, stored as received so Sequifi can map them into sales. - [Store raw integration records](https://apidocs.sequifi.com/reference/ingest-integration-raw-data.md): `POST /v1/integration-raw-data`. Stores raw records from a connected source system (a CRM or lender system) with change detection, and returns the records that are new or changed so you can map them into sales. ### Payroll Pay runs and pay stubs: what each rep is about to be paid (open payroll) and what they were paid (payroll history), down to the line items on a stub. - [Get a paid pay stub](https://apidocs.sequifi.com/reference/get-paid-payroll.md): `GET /v1/payroll-history/{id}`. Returns one paid or marked-paid pay stub, looked up by its payroll id. - [List a paid stub's line items](https://apidocs.sequifi.com/reference/list-paid-payroll-line-items.md): `GET /v1/payroll-history/{id}/line-items`. Returns the rows that a paid pay stub's section totals were built from (which deal, which milestone, how much), so you can reconcile a paycheck line by line. - [Get an open pay stub](https://apidocs.sequifi.com/reference/get-payroll.md): `GET /v1/payroll/{id}`. Returns one pay stub that has not been paid yet, by its id. - [List an open stub's line items](https://apidocs.sequifi.com/reference/list-payroll-line-items.md): `GET /v1/payroll/{id}/line-items`. Returns the rows that an open pay stub's section totals are built from (which deal, which milestone, how much). - [List open pay stubs](https://apidocs.sequifi.com/reference/list-payroll.md): `GET /v1/payroll`. Lists pay stubs that have not been paid yet, one row per user per pay run, newest first. - [Set payroll amounts](https://apidocs.sequifi.com/reference/upsert-payroll.md): `POST /v1/payroll`. Writes commission, override and salary amounts onto each user's open pay stub for one pay period, creating the stub if the user does not have one yet. - [List paid pay stubs](https://apidocs.sequifi.com/reference/list-paid-payroll.md): `GET /v1/payroll-history`. Lists paid and marked-paid pay stubs, mainly so an accounting sync can post them to the books. - [Save QuickBooks journal entry IDs](https://apidocs.sequifi.com/reference/update-paid-payroll-journal-ids.md): `PATCH /v1/payroll-history`. Saves a QuickBooks journal entry id on paid pay stubs, so they drop out of GET /v1/payroll-history?quickbooks_synced=false. - [List paid one-time payments](https://apidocs.sequifi.com/reference/list-one-time-payments.md): `GET /v1/one-time-payments`. Lists paid one-time payments, each with the same totals as its pay stub, so an accounting sync can post them the same way it posts GET /v1/payroll-history. - [Save journal entry IDs for one-time payments](https://apidocs.sequifi.com/reference/update-one-time-payment-journal-ids.md): `PATCH /v1/one-time-payments`. Saves a journal entry id on paid one-time payments, so they drop out of GET /v1/one-time-payments?quickbooks_synced=false. - [Get a paid one-time payment](https://apidocs.sequifi.com/reference/get-one-time-payment.md): `GET /v1/one-time-payments/{id}`. Returns one paid one-time payment by `one_time_payment_id`, in the same shape as GET /v1/one-time-payments. - [List a one-time payment's line items](https://apidocs.sequifi.com/reference/list-one-time-payment-line-items.md): `GET /v1/one-time-payments/{id}/line-items`. Returns the rows a paid one-time payment was built from (which deal, which milestone, how much), in the same shape as GET /v1/payroll-history/{id}/line-items. ### Requests Bonuses, fines and fees, and reimbursements, as on the Requests & Approvals page. - [Create a bonus, fine/fee or reimbursement request](https://apidocs.sequifi.com/reference/create-request.md): `POST /v1/requests`. Creates one bonus, fine/fee or reimbursement request for a worker. ### Pay Frequency The pay schedules your company uses (weekly, every two weeks, twice a month, monthly) and their ids. - [List pay frequencies](https://apidocs.sequifi.com/reference/list-pay-frequencies.md): `GET /v1/pay-frequency`. Lists the pay frequencies your company has turned on, so you can map a pay frequency id to its name. - [Get a pay frequency](https://apidocs.sequifi.com/reference/get-pay-frequency.md): `GET /v1/pay-frequency/{id}`. Returns one active pay frequency by id. ### Timesheet Hours: clock-in and clock-out entries for hourly reps, read by pay period or added from a field tool. - [Get a user's current timesheet](https://apidocs.sequifi.com/reference/get-user-timesheet.md): `GET /v1/timesheet/{id}`. Returns the current pay period's day-by-day time records for one user. - [Get a user's timesheet](https://apidocs.sequifi.com/reference/list-timesheet-by-pay-period.md): `GET /v1/timesheet`. Returns one user's day-by-day time records for their current or previous pay period. - [Record a time entry](https://apidocs.sequifi.com/reference/add-timesheet-entry.md): `POST /v1/timesheet`. Records time for a user: a whole finished entry (a `checkin` with `end_time` and pay), or a single clock event. ### Commissions A rep's commission setup (the Commission tab on their profile): rates per product and role (closer, setter, self-gen), in one normalized unit across every vertical. - [List a user's commission rates](https://apidocs.sequifi.com/reference/list-user-commissions.md): `GET /v1/users/{id}/commissions`. Returns a user's commission rate card, the same settings as the Commission tab on their profile in Sequifi, grouped by product and split by role (closer, setter, self-gen). ### Earnings What a rep has earned (the Earnings page in the app): pending, paid, projected and clawed back, for commissions and overrides, with the line items behind the totals. - [Get a user's earnings](https://apidocs.sequifi.com/reference/get-user-earnings.md): `GET /v1/users/{id}/earnings`. Returns what a user has earned in commissions and overrides, split into pending, paid, projected and clawbacks, plus a per-pay-period breakdown. - [List a user's earning lines](https://apidocs.sequifi.com/reference/list-user-earning-items.md): `GET /v1/users/{id}/earnings/items`. Returns the lines behind GET /v1/users/{id}/earnings, one per commission milestone, override, projection or clawback, each with a `pay_status` that says where the money is now. ### Reserve A rep's reserve balance (for companies with Reserve Balances): the part of their earnings held back from payroll and paid out later, with the ledger behind it. - [Get a user's reserve balance](https://apidocs.sequifi.com/reference/get-user-reserve.md): `GET /v1/users/{id}/reserve`. Returns a user's Reserve Balances position: the current `balance`, lifetime `totals`, and the ledger of every movement, newest first. ## Machine-readable - [OpenAPI 3.0 spec, YAML](https://apidocs.sequifi.com/swagger.yaml): the source of truth for every path, field and example - [OpenAPI 3.0 spec, JSON](https://apidocs.sequifi.com/openapi.json): the same spec as JSON - [Everything in one file](https://apidocs.sequifi.com/llms-full.txt): every guide and endpoint page concatenated ## Optional - [Bulk sales posting script](https://apidocs.sequifi.com/examples/post_sales_bulk.py): reference Python implementation of the Posting Sales rules