Register or Import Issuer
Use this page when the issuer already exists outside the main POST /issuer/create flow. For the standard create-and-deploy path, use Create an Issuer.
Which route do I need?
| Situation | Route | What it does |
|---|---|---|
| You have nothing yet and want TAP to deploy the cap table | POST /issuer/create (see Create an Issuer) | Deploys a cap table through the factory and saves the issuer in MongoDB. |
| The cap table was already deployed (frontend wallet, separate script, another system) | POST /issuer/register | Saves a TAP record that points at the existing onchain cap table. |
| You have an OCF manifest zip and want TAP to import it end-to-end | POST /mint-cap-table | Validates the manifest, deploys a cap table, seeds stakeholders/classes/positions, and returns the issuer. |
Before you use these routes
If the factory is not yet registered in your local stack, use the CLI (preferred — reads implementation onchain automatically):
pnpm factory:register --factory 0xYourFactoryAddressOr send POST /factory/register directly (requires you to supply both addresses):
{
"factory_address": "<YOUR_FACTORY_ADDRESS>",
"implementation_address": "<YOUR_IMPLEMENTATION_ADDRESS>"
}The response returns { "factory": ... }. Prefer the CLI — it reads the live implementation from the factory onchain and never hardcodes a stale address.
Register an issuer that was already deployed
Use POST /issuer/register when a wallet or another system already deployed the cap table and you only need the TAP record.
Send the same issuer fields used in Create an Issuer, plus id, deployed_to, and tx_hash. A complete body looks like:
{
"id": "b6ca9d9c1daa4b30830b444561ef7806",
"legal_name": "Transfer Agent Protocol",
"formation_date": "2022-08-23",
"country_of_formation": "US",
"country_subdivision_of_formation": "DE",
"initial_shares_authorized": "10000000",
"deployed_to": "<CAP_TABLE_ADDRESS>",
"tx_hash": "<DEPLOY_TX_HASH>",
"comments": []
}id must be the 32-hex-character UUID-without-dashes that the cap table contract was initialized with (for example b6ca9d9c1daa4b30830b444561ef7806). If you omit id, TAP generates a new UUID and the TAP record will not match the onchain ID, which breaks event polling.
The response returns { "issuer": ... }. Keep that issuer object — you’ll use _id for every later API call.
Import an existing OCF cap table
Use POST /mint-cap-table when you already have an OCF manifest and want TAP to import the cap table, deploy it, and save the resulting deployed_to address on the issuer.
This route expects a multipart/form-data upload with a zip file that contains one or more ocf.json files.
curl -X POST http://localhost:8293/mint-cap-table \
-F "file=@/path/to/your-ocf-manifest.zip"After the import finishes, use the returned issuer record for later API calls, then check View History to confirm what was created.
Read issuer records
GET /issuer/id/:idreturns a small issuer lookup, not the full issuer detail object.GET /issuer/total-numberreturns the issuer count.
For most workflows, the response from POST /issuer/create or POST /issuer/register is still the main issuer record you keep.
Verify
- Confirm the response contains
_id,deployed_to, andtx_hash. GET /issuer/id/:idwith the returned_idshould succeed.- After ~20 seconds,
GET /historical-transactions/issuer-id/<YOUR_ISSUER_ID>should include any seeded transactions (manifest imports only).