Update Dealer

Updates a dealer's name, address or website URL. Send only the fields you want to change.

PATCHhttps://api.spyne.ai/api/pv1/enterprise/update-enterprise
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

ParameterTypeDescription
messagestringConfirmation that the dealer was updated.
dataobjectEchoes the fields that were applied.

Errors

Status codeDescription
400Missing enterprise_id, nothing to update, an invalid address, or no partner account is mapped to your token's enterprise.
401Missing or invalid token.
404No dealer under your partner account matches enterprise_id.
500Unexpected server error.

/table



Did this page help you?