Syncing a source fetches raw transaction records from the blockchain provider and normalizes them into a structured, categorized format ready for tax calculation. You start a sync by callingDocumentation Index
Fetch the complete documentation index at: https://docs.taxmaxi.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/sources/:sourceId/sync, which immediately returns a job object. Because syncs run asynchronously, you then poll GET /v1/sources/:sourceId/jobs/:jobId every few seconds until the status reaches completed or failed. If you want to reprocess existing cached records without re-fetching from the provider — for example, after an update to the normalization logic — use POST /v1/sources/:sourceId/replay instead.
Required header for all sync endpoints: Authorization: Bearer <token>
Sync lifecycle
A sync job moves through the following states:| Status | Meaning |
|---|---|
queued | The job has been accepted and is waiting to run. |
running | The job is actively fetching and normalizing records. |
completed | All records were imported and normalized successfully. |
failed | The job encountered an error. Check message for details. |
POST /v1/sources/:sourceId/sync, the API returns the active job rather than starting a duplicate.
Start a sync
Starts a new sync job for the specified source. If an active job already exists, returns that job.Path parameters
The ID of the source to sync.
Response fields
ID of the source being synced.
Unique identifier for the sync job. Use this to poll status.
Current job status:
queued, running, completed, or failed.Optional status message. Contains error details when
status is failed.Errors
| Status | Code | Description |
|---|---|---|
400 | SourceBadRequestError | The request is malformed or the source ID is invalid. |
500 | InternalServerError | An unexpected server error occurred. |
Replay normalization
Resets derived data for a source and rebuilds it from cached raw records without re-fetching from the blockchain provider. Use replay when you want to apply updated normalization logic to already-imported data.Path parameters
The ID of the source to replay.
Response fields
Same as start a sync:sourceId, jobId, status, message.
Errors
| Status | Code | Description |
|---|---|---|
400 | SourceBadRequestError | The request is malformed or the source ID is invalid. |
500 | InternalServerError | An unexpected server error occurred. |
Poll job status
Returns the current status of a sync or replay job, including record counters once the job has made progress.Path parameters
The ID of the source.
The ID of the job returned when you started the sync or replay.
Response fields
ID of the source being synced.
ID of the job.
Current job status:
queued, running, completed, or failed.Total raw records fetched from the provider.
null while the job is queued.Number of records successfully normalized.
null while the job is queued.Number of records that could not be normalized.
null while the job is queued.Optional status message. Contains error details when
status is failed.Polling pattern
Poll the status endpoint every 2–5 seconds untilstatus is completed or failed. Once completed, you can proceed to calculate tax.
status is failed, read message for the reason and retry with a fresh sync if appropriate.
Errors
| Status | Code | Description |
|---|---|---|
400 | SourceBadRequestError | The request is malformed or a path parameter is invalid. |
404 | SourceNotFoundError | No job was found for the given source ID and job ID. |
500 | InternalServerError | An unexpected server error occurred. |
Full example: start, poll, and confirm
The following example walks through a complete sync: start the job, poll until done, then verify the record counts.Start sync response
Poll response (running)
Poll response (completed)