---
title: "Create a Location Attachment"
method: POST
path: "/locations/{storeId}/attachments"
tags: ["Locations"]
---

# Create a Location Attachment

`POST /locations/{storeId}/attachments`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/locations/{storeId}/attachments`
- 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/:storeId/attachments/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `storeId` string, required

## Query parameters

- `subscriberId` integer
- `fileDescription` string
- `isEvacuationPlan` boolean

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: File to attach to the location.

## Response `201`

Created indicates that the attachment created before the response was sent.

- ServiceChannelServicesMessagingLocationLocationAttachment: Attachment object.
  - `Id` integer: Numeric identifier of the location attachment.
  - `LocationId` integer: Unique ID of the location to which the attachment is added.
  - `StoreId` string: StoreId
  - `FileName` string: Filename of the evacuation plan map attachment.
  - `FilePath` string: File’s position in the subscriber’s location.
  - `Description` string: Description of the evacuation plan map attachment added by the user.
  - `UploadDate` string, date-time: Date and time when the attachment was added.
  - `UserId` integer: ID of the user who added the attachment to the location.
  - `UserName` string: Username of the user who added the attachment.
  - `AttachmentType` 'EvacuationPlan': Numeric identifier of the attachment added. Possible values: `1` - EvacuationPlan.
  - `GetFileLink` string

## Other responses

- `400`: Bad Request - the request could not be understood or was missing required parameters.
- `401`: Indicates that the requested resource requires authentication. <br/>Error codes: <br/> 504 - API call rejected by security permissions;
- `403`: User is not assigned to Location <br/>Error codes: 804 — User is not assigned to Location.
- `404`: Invalid StoreID <br/>Error codes: 606 — Invalid StoreID 401 — Invalid Subscriber Id 502 — Location Not Found by Passed Store Id and Subscriber Id.
- `500`: Indicates that a generic error has occurred on the server.

---

[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)
