Update Dealer
Updates a dealer's name, address or website URL. Send only the fields you want to change.
PATCH
AuthBearer token
Body parameters
- enterprise_id (string, required): the dealer to update.
- enterprise_name (string, optional): the new name.
- address (object, optional): any of
address_line,city,state,country,pin_code, all strings. Only the keys you send are changed. - website_url (string, optional): the dealer's website.
Send at least one of enterprise_name, address or website_url.
Sample request
curl --request PATCH \
--url 'https://api.spyne.ai/api/pv1/enterprise/update-enterprise' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"enterprise_id": "<enterprise_id>",
"address": {
"address_line": "1200 Main St",
"city": "Austin",
"state": "TX",
"pin_code": "78701"
},
"website_url": "https://www.acmemotors.com"
}'curl --request PATCH \
--url 'https://api.spyne.ai/api/pv1/enterprise/update-enterprise' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"enterprise_id": "<enterprise_id>",
"enterprise_name": "Acme Motors Group"
}'Sample response
{
"message": "Updated Successfully",
"data": {
"enterpriseId": "<enterprise_id>",
"enterpriseName": "Acme Motors",
"address": {
"address_line": "1200 Main St",
"city": "Austin",
"state": "TX",
"pin_code": "78701"
},
"websiteLink": "https://www.acmemotors.com"
}
}Response parameters
| Parameter | Type | Description |
|---|---|---|
| message | string | Confirmation that the dealer was updated. |
| data | object | Echoes the fields that were applied. |
Errors
| Status code | Description |
|---|---|
| 400 | Missing enterprise_id, nothing to update, an invalid address, or no partner account is mapped to your token's enterprise. |
| 401 | Missing or invalid token. |
| 404 | No dealer under your partner account matches enterprise_id. |
| 500 | Unexpected server error. |
/table
Updated 7 days ago
Did this page help you?
