Registration.AddCustomer
Try it in Swagger
Endpoint
- Method:
POST
- Route:
Registration/AddCustomer
- Authentication:
AllowAnonymous (optional Bearer token for administrators)
Anonymous callers are blocked when the tenant has website/anonymous registration disabled (AllowRegistrationPage). Authenticated callers with WebAccess = Administrator may register regardless of that setting. Created contacts are set to webAccess = Administrator and granted Payments API permission (APIUserPermissions PermissionId 4) for their new account. A card or ACH submitted on this request is stored as a payment method and returned by Payments/GetAll. When the tenant's Customer Web Options APIOrderPrefix is set, new customer codes from this endpoint start with that prefix. Website registration uses WebOrderPrefix instead. An empty prefix leaves the customer code as the next number only.
Request Schema
| Header |
Required |
Notes |
X-Api-Key |
Required when tenant is not resolved by subdomain |
Tenant resolution still applies unless the request is exempted by middleware. |
Authorization |
No |
Optional Bearer token. When present and the user is an Administrator, anonymous registration can be bypassed. |
JSON Body
Body type: PracticeRegistrationRequestDto
| Field |
Type |
Required |
Max Length |
Notes |
emailAddress |
string |
Yes |
|
|
firmType |
int |
No |
|
Firm type id from FirmType.GetAll. |
howDidYouHearUsOther |
string |
Yes |
|
|
address |
string |
Yes |
|
|
city |
string |
Yes |
|
|
phone |
string |
Yes |
|
|
companyName |
string |
Yes |
|
|
typesOfLawPracticed |
int[] |
Yes |
|
Law type ids from LawsPracticed.GetAll. |
state |
string |
Yes |
|
|
zip |
string |
Yes |
|
|
fax |
string |
Yes |
|
|
suite |
string |
Yes |
|
|
attorneys |
List<AttorneyRegistrationDto> |
No |
|
|
users |
List<UserRegistrationDto> |
No |
|
|
paymentType |
PaymentTypeEnum |
Yes |
|
Required. Must be Ach or CreditCard. Omitting it is rejected; it does not default to Ach. |
authorizedBy |
string |
Yes |
|
|
ach |
AchRegistrationDto? |
No |
|
|
creditCard |
CreditCardRegistrationDto? |
No |
|
|
Type / Enum Values
| Field |
Allowed Values |
Notes |
paymentType |
Ach, CreditCard |
Required on the request. Maps to PaymentTypeEnum. Missing values are rejected and do not default to Ach. |
firmType |
Integer from FirmType.GetAll |
Use the linked lookup endpoint for valid firm type ids. |
typesOfLawPracticed |
Integer ids from LawsPracticed.GetAll |
Pass one or more lookup ids. |
Request Sample
{
"emailAddress": "admin@example.com",
"firmType": 1,
"howDidYouHearUsOther": "Referral",
"address": "123 Main St",
"city": "Los Angeles",
"phone": "2135550100",
"companyName": "Acme Law",
"typesOfLawPracticed": [
1,
3
],
"state": "CA",
"zip": "90012",
"fax": "2135550102",
"suite": "Suite 100",
"attorneys": [
{
"name": "Jane Attorney",
"barNumber": "CA123456",
"emailAddress": "jane.attorney@example.com",
"phone": "2135550103",
"fax": "2135550104",
"isPrincipal": true
}
],
"users": [
{
"name": "Maria Contact",
"emailAddress": "maria.contact@example.com",
"phone": "2135550105",
"homeCourtState": "CA",
"homeCourtCounty": "Los Angeles",
"password": "Use-A-Strong-Password-123",
"isUserAdmin": true,
"isAccountingContact": false
}
],
"paymentType": "Ach",
"authorizedBy": "Jane Attorney",
"ach": {
"routingNumber": "122105278",
"accountNumber": "1234567890",
"bankName": "First National Bank",
"isCheckingAccount": true,
"nickName": "Operating Account"
},
"creditCard": null
}
Expected Response Schema
Status Codes
| Status |
Notes |
200 OK |
Registration completed (or business errors that are not the anonymous-registration block). |
400 Bad Request |
Missing body, no users, or other request validation failures. |
403 Forbidden |
Anonymous registration is disabled for the tenant and the caller is not an authenticated Administrator. |
Success Body
Response type: CustomerRegistrationResponseDto
| Field |
Type |
Max Length |
Notes |
success |
bool |
|
|
errors |
List<string> |
|
|
customerCode |
string |
|
|
attorneys |
List<AttorneyDto> |
|
|
contacts |
List<ContactDto> |
|
|
Response Sample
{
"success": false,
"errors": [
"Registration requires a valid contact email."
],
"customerCode": "ABC001",
"attorneys": [
{
"code": 123,
"name": "Jane Attorney"
}
],
"contacts": [
{
"code": 456,
"name": "Maria Contact"
}
]
}