---
title: "Create a location with location notes"
method: POST
path: "/locations/LocationWithNotes"
tags: ["Locations"]
---

# Create a location with location notes

`POST /locations/LocationWithNotes`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/locations/LocationWithNotes`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/locations/LocationWithNotes/post.ts> (a function with typed inputs; its response is checked against the schema)

Create or update a location along with location notes.
             <br />**Note:** Method takes a dynamic list of parameters as input.
             <br />**Example request**
            
                 POST /locations/LocationWithNotes
                 {
                  "StoreId":"TestStore",
                  "Name": "CSR Flagship",
                  "MainAddress": "18 E. 16th Street",
                  "AddlAddress": "3rd Floor, Innovation Center",
                  "Latitude": 40.736601,
                  "Longitude": -73.991795,
                  "City": "New York",
                  "State": "NY",
                  "Region": "Northeast",
                  "District": "NYC/LI",
                  "Zip": "10003",
                  "Country": "US",
                  "OpenDate": "2021-07-03T00:10:00.308Z",
                  "ClosedDate": "",
                  "Email": "csrflagship@gmail.com",
                  "Phone": "212-555-1212",
                  "Contact": "",
                  "FaxNumber": "",
                  "YourLocationNoteHeader1": "Value1",
                  "YourLocationNoteHeader2": "Value2",
                  "YourLocationNoteHeaderN": "ValueN"
                 }

## Request body

- object

## Response `200`

A new location is created or an existing one is updated. The location ID is in the response.

- ServiceChannelServicesMessagingLocationAddUpdateLocationResponse: Location note object.
  - `Id` integer: Location note numeric identifier.

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 606 — The `StoreId` value cannot be empty. The maximum length is 50 characters. 608 - Location no accessible for the user. 611 — The location note header does not exist on the subscriber instance. 612 — The user does not have access to update a protected location note header. 630 — Incorrect format of the 'ParameterName'. 631 — The `City` value cannot be empty. The maximum length is 50 characters. 632 — The `Zip` value cannot be empty. The maximum length is 12 characters. 633 — Latitude value should be between '-90' and '90'. 634 — Longitude value should be between '-180' and '180'. 635 — Invalid Email. 636 — The `Name` value cannot be empty. The maximum length is 100 characters. 637 — Invalid `State` format. The maximum length is 2 characters. 638 — Invalid `AddlAddress` format. The maximum length is 500 characters. 639 — Invalid `MainAddress` format. The maximum length is 500 characters. 640 — The `Country` value cannot be empty. The maximum length is 20 characters. 641 — Invalid `Region` format. The maximum length is 50 characters. 642 — Invalid `District` format. The maximum length is 50 characters. 643 — Invalid `Phone` format. The maximum length is 22 characters. 644 — Invalid `Contact` format. The maximum length is 50 characters. 645 — Invalid `FaxNumber` format. The maximum length is 22 characters. 646 — The country doesn't exist. 647 — The state doesn't exist in the country. 648 — The city doesn't exist in the country. 650 — Invalid `Email` format. The maximum length is 200 characters. 1301 — Request is empty or null.
- `401`: The request is not authorized. <br/>Error codes: 504 — API call rejected by security permissions
- `500`: The server was unable to complete the request due to an internal error.

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
