Sets a new default location.
Notes:
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the location to set as the default location.
New default location.
curl -X POST \
'https://www.wixapis.com/locations/v1/locations/ea50573e-35fa-47ca-bba7-3e45a935d9bc/set-default' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
--data-binary '{}'
{
"location": {
"id": "ea50573e-35fa-47ca-bba7-3e45a935d9bc",
"name": "New Location Name",
"default": true,
"status": "ACTIVE",
"locationType": "UNKNOWN",
"timeZone": "America/Los_Angeles",
"address": {
"country": "US",
"subdivision": "CA",
"city": "Los Angeles",
"postalCode": "90015",
"streetAddress": {
"number": "1111",
"name": "South Figueroa Street",
"apt": ""
},
"formattedAddress": "STAPLES Center, South Figueroa Street, Los Angeles, CA, USA",
"geocode": {
"latitude": 34.0430175,
"longitude": -118.2672541
}
},
"revision": "6",
"archived": false
}
}
There are 2 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.
Triggered when a location is set as default.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.locations.v1.location
.
Event name. Expected set_default_location
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.locations.v1.location_set_default_location",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}