Customers
GET /customers
Get a list of customers
Response
OK
{
"success": true,
"data": []model.Customer
}
Error
- error.InternalServerError
GET /customers/:customer_id
Get a customer by ID
Response
OK
{
"success": true,
"data": model.Customer
}
Error
- error.InternalServerError
POST /customers
Description
This request creates a new customer
Request
{
"type": "RETAIL",
"joint_name": "",
"company_name": "",
"first_name": "Jack",
"foreign_id": "customer_1_id",
"label": "1234 - Customer",
"last_name": "Smith",
"margin": "DEFAULT",
"booking_schema": "ADVANCED",
"ignore_balance_check": false,
"ignore_margin": true,
"notification_recipients": ["test_mail_1@trever.io", "test_mail_2@trever.io"],
"investment_entity_ids": ["d2e510cc-6fd0-4da9-ad5d-296d9f5740b4"]
}
Attributes
label
: Display label in the Trever front-endmargin
: Markup category of a customertype
: Customer type. enum.CustomerTypebooking_schema
: defines which booking schema is used for a customer. enum.BookingSchemaignore_balance_check
: Determines whether or not the balance check should be suspended for this customer.ignore_margin
: Determines whether no margin should be charged for this customercompany_name
: Company name of the customer. Only required if the type is INSTITUTION.first_name
: First name of the customer. Only required if the type is RETAIL.last_name
: Last name of the customer. Only required if the type is RETAIL.joint_name
: Joint name of the customer.Only required if the type is JOINT.
Optional
foreign_id
: ID string in the foreign systeminvestment_entity_ids
: ID string of the investment entitynotification_recipients
: Email address used for event notifications
Response
OK
{
"success": true,
"data": model.Customer
}
Error
- error.BadRequestError
- error.InternalServerError
PUT /customers
Description
This request creates a new customer
Request
{
"id": "790ec1c4-b1b1-46f6-b453-aaa9e3f245b4",
"type": "RETAIL",
"joint_name": "",
"company_name": "",
"first_name": "Jack",
"foreign_id": "customer_1_id",
"label": "1234 - Customer",
"last_name": "Smith",
"margin": "DEFAULT",
"booking_schema": "ADVANCED",
"ignore_balance_check": false,
"ignore_margin": true,
"notification_recipients": ["test_mail_1@trever.io", "test_mail_2@trever.io"],
"investment_entity_ids": ["d2e510cc-6fd0-4da9-ad5d-296d9f5740b4"]
}
Attributes
id
: Id of the customerlabel
: Display label in the Trever front-endmargin
: Markup category of a customertype
: Customer type. enum.CustomerTypebooking_schema
: defines which booking schema is used for a customer. enum.BookingSchemaignore_balance_check
: Determines whether or not the balance check should be suspended for this customer.ignore_margin
: Determines whether no margin should be charged for this customercompany_name
: Company name of the customer. Only required if the type is INSTITUTION.first_name
: First name of the customer. Only required if the type is RETAIL.last_name
: Last name of the customer. Only required if the type is RETAIL.joint_name
: Joint name of the customer.Only required if the type is JOINT.
Optional
foreign_id
: ID string in the foreign systeminvestment_entity_ids
: ID string of the investment entitynotification_recipients
: Email address used for event notifications
Response
OK
{
"success": true,
"data": model.Customer
}
Error
- error.BadRequestError
- error.InternalServerError
DELETE /customers/:customer_id
Description
This request deletes a specific customer
Response
OK
{
"success": true,
"data": {
"id": "774f1ad4-94af-452f-bd73-4b00bf30eb92"
}
}