Simulation APIs
Overview
The Simulation APIs provide endpoints for simulating various business processes and state changes for testing purposes. These endpoints allow developers to trigger simulated events without affecting real business operations or external systems. All simulation endpoints return a 204 No Content response upon successful execution.
⚠️ Important Notes
- Testing Only: These endpoints are intended for testing and development purposes only
- No Real Effects: Simulations do not affect real business data, accounts, or external systems
- State Changes: Simulations may change internal business states for testing workflows
- Authentication Required: All endpoints require valid bearer token authentication
- Admin Access: These endpoints typically require elevated permissions
Onboarding Simulations
These endpoints simulate various stages of the business onboarding process.
Internal Approval
Endpoint: PUT /v1/businesses/{business_id}/simulate/internal_approve
Simulates an internal approval event for business onboarding.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/internal_approve' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Internal Rejection
Endpoint: PUT /v1/businesses/{business_id}/simulate/internal_reject
Simulates an internal rejection event for business onboarding.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/internal_reject' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Custodian Submission
Endpoint: PUT /v1/businesses/{business_id}/simulate/custodian_submission
Simulates submission of required documents to the custodian.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/custodian_submission' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Custodian Approval
Endpoint: PUT /v1/businesses/{business_id}/simulate/custodian_approve
Simulates custodian approval of the business application.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/custodian_approve' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Custodian Rejection
Endpoint: PUT /v1/businesses/{business_id}/simulate/custodian_reject
Simulates custodian rejection of the business application.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/custodian_reject' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Internal Needs Info
Endpoint: PUT /v1/businesses/{business_id}/simulate/internal_needsinfo
Simulates a request for additional information from internal review.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/internal_needsinfo' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Custodian Needs Info
Endpoint: PUT /v1/businesses/{business_id}/simulate/custodian_needsinfo
Simulates a request for additional information from the custodian.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/custodian_needsinfo' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Account Open
Endpoint: PUT /v1/businesses/{business_id}/simulate/account_open
Simulates the opening of a business account.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/account_open' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Account Close
Endpoint: PUT /v1/businesses/{business_id}/simulate/account_close
Simulates the closing of a business account.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/account_close' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Transfer Simulations
These endpoints simulate various transfer lifecycle events.
Transfer Created
Endpoint: PUT /v1/businesses/{business_id}/transfers/simulate/created
Simulates the creation of a new transfer with specified amount.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/transfers/simulate/created' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"currency": "USD",
"amount": "150000.00"
}'
Transfer Completed
Endpoint: PUT /v1/businesses/{business_id}/transfers/{transfer_id}/simulate/completed
Simulates the completion of an existing transfer.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/transfers/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/completed' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Transfer Failed
Endpoint: PUT /v1/businesses/{business_id}/transfers/{transfer_id}/simulate/failed
Simulates the failure of an existing transfer.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/transfers/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/simulate/failed' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Portfolio Simulations
These endpoints simulate portfolio management events.
Portfolio Rebalance
Endpoint: PUT /v1/businesses/{business_id}/portfolio/simulate/rebalance
Simulates a portfolio rebalance event.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/portfolio/simulate/rebalance' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Assets Sold
Endpoint: PUT /v1/businesses/{business_id}/portfolio/simulate/assets_sold
Simulates the sale of portfolio assets with specified amount.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/portfolio/simulate/assets_sold' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"currency": "USD",
"amount": "150000.00"
}'
Document Simulations
These endpoints simulate document-related events.
New Statement
Endpoint: PUT /v1/businesses/{business_id}/documents/simulate_new_statement
Simulates the creation of a new account statement document.
curl -X PUT \
'https://api.example.com/v1/businesses/urn:uuid:8da282ca-0020-4595-19e4-f28eeebef573/documents/simulate_new_statement' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Common Response Codes
All simulation endpoints return one of the following HTTP status codes:
- 204 No Content: Simulation completed successfully
- 400 Bad Request: Invalid request parameters or body
- 401 Unauthorized: Invalid or missing authentication token
- 403 Forbidden: Insufficient permissions to perform simulation
- 404 Not Found: Business, transfer, or other resource not found
Usage Guidelines
Testing Workflows
Use simulation endpoints to test complete business workflows:
- Onboarding Flow: Use account_open/close simulations to test account lifecycle
- Transfer Flow: Create → Complete/Fail to test transfer processing
- Portfolio Flow: Rebalance and asset sales to test investment operations
- Document Flow: New statements to test document processing
Integration Testing
Simulations are particularly useful for:
- CI/CD Pipelines: Automated testing without external dependencies
- Development: Testing UI/UX with various business states
- QA Testing: Validating business logic with controlled scenarios
- Demo Environments: Showcasing features with predictable outcomes
Best Practices
- Environment Isolation: Only use in testing/sandbox environments
- State Management: Track simulated state changes for test validation
- Cleanup: Reset test data between test runs
- Documentation: Document which simulations are used in test scenarios