Skip to main content
PATCH
/
companies
/
{id}
Update an existing Company
curl --request PATCH \
  --url https://commerce.driv.ly/api/companies/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "addresses": [
    "<string>"
  ],
  "phoneNumbers": [
    "<string>"
  ],
  "name": "<string>",
  "contacts": [
    "<string>"
  ]
}
'
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "addresses": [
      "<string>"
    ],
    "phoneNumbers": [
      "<string>"
    ],
    "contacts": [
      "<string>"
    ]
  },
  "success": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.driv.ly/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

id
string
required

Customer is uniquely identified by id

Query Parameters

depth
integer

The number of levels of related objects to include in the response

Body

application/json
id
string

Customer is uniquely identified by id

addresses
(string | Address · object)[]

Customer is located at Addresses

phoneNumbers
string[]

Customer has Phone Number

Pattern: ^\+?1?[- ]?\(?([0-9]{3})\)?[- ]?([0-9]{3})-?([0-9]{4})$
name
string

Company has Name

contacts
(string | Contact · object)[]

Company has Contact

Response

Company Updated

data
Company · object
Example:
{
"id": "com_9j3k2dls0j29",
"name": "Auto Sales Co.",
"address": "123 Main St, Anytown, USA",
"locations": [
{
"id": "loc_k2j3l9s9d4j0",
"companyId": "com_9j3k2dls0j29",
"address": "123 Main St, Anytown, USA",
"phone": "+1234567890"
}
]
}
success
boolean