POST

Create Location


Creates a location.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Locations
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/locations/v1/locations

Body Params
locationLocationRequired

Location to create.

Response Object
locationLocation

Created location.

Create Location
Request
cURL
curl -X POST \ 'https://www.wixapis.com/locations/v1/locations' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "location": { "name":"South Figueroa Street", "default":false, "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 } } } }'
Response
JSON
{ "location": { "id": "ea50573e-35fa-47ca-bba7-3e45a935d9bc", "name": "South Figueroa Street", "default": false, "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": "1", "archived": false } }
Errors
400Invalid Argument

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?