cURL
curl --request PATCH \ --url https://commerce.driv.ly/api/locations/{id} \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "updatedAt": "<string>", "createdAt": "<string>", "name": "<string>", "address": "<string>", "city": "<string>", "state": "<string>", "zip": "<string>", "country": "<string>", "listings": [ 123 ], "tenant": 123, "createdBy": 123 } '
{ "doc": { "updatedAt": "<string>", "createdAt": "<string>", "name": "<string>", "address": "<string>", "city": "<string>", "state": "<string>", "zip": "<string>", "country": "<string>", "listings": [ 123 ], "tenant": 123, "createdBy": 123 }, "message": "<string>" }
Updates a Location
Usage with the Drivly SDK
import { SDK } from '@drivly/commerce' import type { locations } from '@drivly/commerce' const sdk = new SDK(...) const locations = await sdk.locations.update(locationsId: string, data: locations): Promise<locations>
id of the Location
number of levels to automatically populate relationships and uploads
retrieves document(s) in a specific locale
specifies a fallback locale if no locale value exists
ok
Show child attributes