---
updatedAt: 2026-09-14T14:13:11.000Z
agentTools:
  projectIndex: https://finp2p-docs.ownera.io/llms.txt
---

# Sync an investor's network accounts on an asset from the ledger adapter

Asks the asset's ledger adapter which network accounts it already holds for this
investor on the asset (e.g. wallets whitelisted directly on the adapter or its
external system) and makes that list the investor's onboarded accounts for
`(organizationId, assetId)`: every returned wallet is recorded, and any wallet the
router previously held for that pair that the adapter did not return is removed.
An empty result clears the pair. No wallet is created and no challenge is issued.
Async: returns `202 { cid }`; on completion the operation result carries the
recorded wallets in `accounts`. A ledger adapter without lookup support fails the
operation with 7352 (`ACCOUNT_LOOKUP_NOT_SUPPORTED`).


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Transactional API",
    "description": "This is the transactional API reference for application development over the FinP2P Router network.",
    "termsOfService": "https://ownera.io/terms/",
    "contact": {
      "email": "support@ownera.io"
    },
    "version": "0.28"
  },
  "tags": [
    {
      "name": "profiles",
      "description": "Access to Profiles"
    }
  ],
  "paths": {
    "/profiles/investor/{investorId}/account/sync": {
      "post": {
        "tags": [
          "profiles"
        ],
        "summary": "Sync an investor's network accounts on an asset from the ledger adapter",
        "description": "Asks the asset's ledger adapter which network accounts it already holds for this\ninvestor on the asset (e.g. wallets whitelisted directly on the adapter or its\nexternal system) and makes that list the investor's onboarded accounts for\n`(organizationId, assetId)`: every returned wallet is recorded, and any wallet the\nrouter previously held for that pair that the adapter did not return is removed.\nAn empty result clears the pair. No wallet is created and no challenge is issued.\nAsync: returns `202 { cid }`; on completion the operation result carries the\nrecorded wallets in `accounts`. A ledger adapter without lookup support fails the\noperation with 7352 (`ACCOUNT_LOOKUP_NOT_SUPPORTED`).\n",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/nonce"
            }
          },
          {
            "name": "investorId",
            "in": "path",
            "description": "ID of the investor profile",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ownerId"
            }
          }
        ],
        "operationId": "syncInvestorAccounts",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/syncInvestorAccountsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "accepted operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/operationBase"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 1000,
                      "message": "General error has occurred, For more information, please contact Support Team."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 3000,
                      "message": "Authentication error"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 3400,
                      "message": "Access denied"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 7340,
                      "message": "Investor not found: \"example-id-123\""
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 9999,
                      "message": "The operation could not be completed successfully. Please contact Support team"
                    }
                  ]
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 7352,
                      "message": "Account lookup is not supported by the ledger adapter for asset \"example-id-123\""
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 7343,
                      "message": "Ledger adapter failed the account operation: example_reason_value"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 2002,
                      "message": "Service unavailable"
                    }
                  ]
                }
              }
            }
          },
          "504": {
            "description": "Gateway Timeout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 2003,
                      "message": "Gateway timeout"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Ownera's custom bearer authentication\n\nThe Ownera authorization header is required to communicate with the Ownera APIs, the header should represent\na JSON object which contains the associated organization id, API key, nonce, timestamp and one time generated access token.\n\nThe one time access token is required to be generated for each request to the Ownera APIs, one time access tokens are time bounded\nby the timestamp value of the authorization object and are limited for one time use, tokens which their timestamp is outside of the\naccepted time range or that the token was already previously used will be rejected.\n\nAccess token is generated by concatenation of the API key, random nonce value and current epoch timestamp in seconds,\nthis digest signed using the associated secret of the API key (HS256, RS256) and encoded as an hexadecimal string.\n\nThe authorization object, including the generated access token, is base64 encoded an sent to the API as bearer authorization header.\n\nsample code snippet (RS256):\n\nconst nonce = crypto.randomBytes(16).toString('hex');\nconst timestamp = Math.floor(new Date().getTime() / 1000);\n\nconst rawAccessToken = `${API_KEY}${nonce}${timestamp}`;\n\nconst accessToken = crypto.createSign('SHA256').update(rawAccessToken).sign(Buffer.from($PRIVATE_KEY)).toString('hex');\n\nconst authInfo = {\n  organization: $ORGANIZATION_ID,\n  apiKey: $API_KEY,\n  nonce,\n  timestamp,\n  accessToken\n};\n\nconst authorizationHeader = Buffer.from(JSON.stringify(authInfo)).toString(\"base64\");\n"
      }
    },
    "schemas": {
      "operationBase": {
        "type": "object",
        "required": [
          "isCompleted"
        ],
        "properties": {
          "cid": {
            "type": "string",
            "description": "unique correlation id which identify the operation"
          },
          "isCompleted": {
            "type": "boolean",
            "description": "flag indicating if the operation completed, if true then error or response must be present (but not both)",
            "default": false
          }
        }
      },
      "syncInvestorAccountsRequest": {
        "type": "object",
        "description": "Request body for `POST /profiles/investor/{investorId}/account/sync`. Identifies the\n(managing org, asset) whose ledger adapter is asked for the investor's accounts.\n",
        "required": [
          "organizationId",
          "assetId"
        ],
        "properties": {
          "organizationId": {
            "$ref": "#/components/schemas/orgId"
          },
          "assetId": {
            "type": "string",
            "description": "ID of the asset"
          }
        }
      },
      "nonce": {
        "type": "string",
        "description": "32 bytes buffer (24 randomly generated bytes by the client + 8 bytes epoch timestamp seconds) encoded to hex:\n\n  const nonce = Buffer.alloc(32);\n  nonce.fill(crypto.randomBytes(24), 0, 24);\n\n  const nowEpochSeconds = Math.floor(new Date().getTime() / 1000);\n  const t = BigInt(nowEpochSeconds);\n  nonce.writeBigInt64BE(t, 24);\n",
        "x-allowEmpty": true
      },
      "APIError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code indicating the specific failure - for more information see [API Errors](./api-error-codes-reference).\n"
          },
          "message": {
            "type": "string",
            "description": "A descriptive message providing context about the error.",
            "pattern": ".*\\S.*",
            "x-autoMinLength": true
          }
        }
      },
      "APIErrors": {
        "type": "object",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/APIError"
            }
          }
        }
      },
      "ownerId": {
        "type": "string",
        "description": "The Owner resource id",
        "pattern": "^[^:](?:.+):101:(?:.+)",
        "maxLength": 150,
        "example": "bank-x:101:511c1d7f-4ed8-410d-887c-a10e3e499a01"
      },
      "orgId": {
        "type": "string",
        "description": "Organization Id",
        "maxLength": 150,
        "pattern": "^[^:]*$",
        "x-go-type": "OrgIdValidatable",
        "minLength": 1,
        "x-autoMinLength": true
      }
    }
  }
}
```