Create Dealer
Onboards a new dealer (enterprise) and its first rooftops. The reseller is resolved from your token, so reseller_id is never sent in the request.
POST
AuthBearer token
Body parameters
- business_name (string, required) — Dealer or business name.
- user_name (string, optional): the owner's name.
- user_email (string, optional): the owner's email. This person becomes the dealer admin and gets a welcome email with their login. If you leave it out, no owner user is created, and your partner account's owners manage the dealer.
- type (string, required) — GROUP_DEALER or INDIVIDUAL_DEALER.
- rooftops (array, required) — One or more rooftops to create (see Rooftop object).
- address (object, optional): the dealer's address. Any of
address_line,city,state,country,pin_code, all strings.
Rooftop object
- teamName (string, required) — Rooftop name.
- productLines (array, required): the products to turn on for this rooftop, as a list of product names from the table below, for example
["Image", "360 Spin", "Sales Inbound"]. Names are not case-sensitive. - address (object, optional): the rooftop's address. Any of
address_line,city,state,country,pin_code, all strings. - email (string, optional) — Makes this email the rooftop admin (invited if new).
Product names
| Product name | Turns on |
|---|---|
Image | Studio images |
360 Spin | 360° spins |
Video | Videos |
Sales Inbound | Sales inbound agent |
Sales Outbound | Sales outbound agent |
Service Inbound | Service inbound agent |
Service Outbound | Service outbound agent |
Sample request
curl --request POST \
--url 'https://api.spyne.ai/api/pv1/enterprise/create-enterprise' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"business_name": "Acme Motors",
"user_name": "Jane Owner",
"user_email": "[email protected]",
"type": "INDIVIDUAL_DEALER",
"address": { "city": "Austin", "state": "TX", "country": "US" },
"rooftops": [
{
"teamName": "Main Rooftop",
"productLines": ["Image", "360 Spin", "Video", "Sales Inbound"],
"address": { "address_line": "1200 Main St", "city": "Austin", "state": "TX", "pin_code": "78701" }
}
]
}'Sample response
{
"message": "Dealership onboarded",
"data": {
"enterpriseId": "<enterprise_id>",
"type": "INDIVIDUAL_DEALER",
"teams": [
{ "teamId": "<team_id>", "teamName": "Main Rooftop", "productLines": [] }
]
}
}Response parameters
| Parameter | Type | Description |
|---|---|---|
| message | string | Confirmation message. |
| data.enterpriseId | string | The new dealer's id. |
| data.type | string | GROUP_DEALER or INDIVIDUAL_DEALER. |
| data.teams | array | Created rooftops, each with teamId, teamName and productLines. |
Errors
| Status code | Description |
|---|---|
| 400 | Invalid or missing parameters, or no reseller is mapped to your enterprise. |
| 401 | Missing or invalid token. |
| 403 | The token's user lacks permission on the target reseller. |
| 500 | Unexpected server error. |
Updated 7 days ago
Did this page help you?
