Create a new asset contribution
POST/asset-contributions
Create a new asset contribution for the authenticated user
Request
- application/json
Body
required
ID of the account making the contribution
ID of the asset being contributed
ID of the transfer method to use
Date and time of acquisition
Cost basis of the contribution
1000.00
Currency type for the cost basis
USD
Number of units being contributed
1.5
Expected number of units to be contributed
1.5
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 422
Asset contribution created successfully
- application/json
- Schema
- Example (from schema)
Schema
ID of the account making the contribution
ID of the asset being contributed
ID of the transfer method used for the contribution
Date and time when the asset was acquired
Cost basis of the contribution
1000.00
Type of currency used for the cost basis
Possible values: <= 50 characters
USD
Number of units contributed
1.5
Expected number of units to be contributed
1.5
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"assetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"assetTransferMethodId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"acquisitionOn": "2024-07-29T15:51:28.071Z",
"costBasis": "1000.00",
"currencyType": "USD",
"unitCount": "1.5",
"unitCountExpected": "1.5",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z"
}
Bad Request - Invalid input data
- application/json
- Schema
- Example (from schema)
Schema
Error message
Detailed error description
Error code
{
"message": "Invalid input data",
"description": "The request data did not pass validation",
"code": "INVALID_INPUT"
}
Unauthorized - Invalid or missing authentication token
- application/json
- Schema
- Example (from schema)
Schema
Error message
Detailed error description
Error code
{
"message": "Unauthorized",
"description": "Invalid, expired or missing bearer token",
"code": "UNAUTHORIZED"
}
Forbidden - Insufficient permissions
- application/json
- Schema
- Example (from schema)
Schema
Error message
Detailed error description
Error code
{
"message": "Forbidden",
"description": "You don't have permission to access this resource",
"code": "FORBIDDEN"
}
Not Found - Resource not found
- application/json
- Schema
- Example (from schema)
Schema
Error message
Detailed error description
Error code
{
"message": "Resource not found",
"description": "The requested resource could not be found",
"code": "NOT_FOUND"
}
Conflict - Resource already exists or state conflict
- application/json
- Schema
- Example (from schema)
Schema
Error message
Detailed error description
Error code
{
"message": "Resource conflict",
"description": "The resource already exists or is in an invalid state",
"code": "CONFLICT"
}
Unprocessable Entity - Validation error
- application/json
- Schema
- Example (from schema)
Schema
Error message
Detailed error description
Error code
{
"message": "Validation error",
"description": "The request data failed validation rules",
"code": "VALIDATION_ERROR"
}