---
title: "Upload a new photo"
method: POST
path: "/photos"
tags: ["Locations Photos"]
---

# Upload a new photo

`POST /photos`

## Request

- Base URL: `https://workflows.promorepublic.com/webhook/2637089f-b543-45d0-a83e-2334aada4ead/listings/sandbox/api`
- URL: `https://workflows.promorepublic.com/webhook/2637089f-b543-45d0-a83e-2334aada4ead/listings/sandbox/api/photos`
- Auth: HTTP bearer

Upload a single photo for a given location. This endpoint accepts multipart/form-data with a binary photo file.

## Request body `multipart/form-data`

- object
  - `locationId` integer, required: The PromoRepublic unique id of the location to attach the photo to
  - `photo` string, binary, required: Binary image file to upload
  - `identifier` string: Client-defined identifier. Must be unique per location
  - `type` 'MAIN' | 'DOCTOR_COM_PORTRAIT' | 'LOGO' | 'STOREFINDER_LOGO' | 'SQUARED_LOGO' | 'LANDSCAPE' | 'STOREFINDER_COVER' | 'FACEBOOK_LANDSCAPE' | 'APPLE_LANDSCAPE' | 'MENU' | 'PHOTO' | 'ROOMS' | 'TEAMS' | 'AT_WORK' | 'PRODUCT' | 'EXTERIOR' | 'INTERIOR' | 'COMMON_AREA' | 'FOOD_AND_DRINK': Photo type, if not defined defaults to PHOTO
  - `description` string: Optional caption/description
  - `order` integer: Zero-based insertion index; if omitted, photo is added to the end
  - `cropOffsetX` integer: Horizontal crop offset in pixels
  - `cropOffsetY` integer: Vertical crop offset in pixels
  - `cropHeight` integer: Crop height in pixels
  - `cropWidth` integer: Crop width in pixels

## Response `200`

The photo has been uploaded

- object
  - `status` 'SUCCESS' | 'PENDING' | 'QUOTA_LIMIT_EXCEED' | 'NOT_AUTHORIZED' | 'FORBIDDEN' | 'BAD_ACCESS_TOKEN' | 'BAD_PRIVATE_KEY' | 'BAD_PUBLIC_KEY' | 'MISSING_PARAMETER' | 'INVALID_PARAMETER' | 'WRONG_PARAMETER_TYPE' | 'CONFLICT' | 'RESOURCE_LOCKED' | 'SERVER_ERROR' | 'ERROR' | 'NOT_FOUND' | 'BAD_REQUEST' | 'USER_ERROR' | 'PARTIAL_ERROR' | 'SERVICE_TEMPORARILY_UNAVAILABLE', required
  - `message` string: (optional) Holds further information about the response
  - `warnings` string[]: (optional) Holds further warnings
  - `response` object, required: The actual response object of the response
    - `photo` object: Location photo response model
      - `id` integer: The PromoRepublic unique id for the photo
      - `dateCreated` string, date-time: The date when the object was created in PromoRepublic database
      - `repoKey` string: File name
      - `locationId` integer: The PromoRepublic unique id of this photo's location
      - `description` string: A description for the photo
      - `identifier` string: The photo identifier based on your internal identification system
      - `main` boolean: A boolean indicating whether this photo is the location's main photo. Maximum one per location
      - `logo` boolean: A boolean indicating whether this photo is the location's logo. Maximum one logo per location
      - `type` string, required: Required - One of: <br> MAIN <br> LOGO <br> SQUARED_LOGO <br> DOCTOR_COM_PORTRAIT - Doctor.com clients only <br> LANDSCAPE - Updates Google Cover Photo<br> APPLE_LANDSCAPE <br> PHOTO <br> STOREFINDER_LOGO - Only for PromoRepublic locator product <br> STOREFINDER_COVER - Only for PromoRepublic locator product<br> FACEBOOK_LANDSCAPE - Facebook Cover Photo <br> EXTERIOR - Google's Exterior Photo tag - availability dependent on a location's business category <br> INTERIOR - Google's Interior Photo tag - availability dependent on a location's business category <br> FOOD_AND_DRINK - Google's Food and Drink Photo tag - availability dependent on a location's business category <br> MENU - Google's Menu Photo tag, which should only be photos of the menu - availability dependent on a location's business category <br> PRODUCT - Google's Product Photo tag - availability dependent on a location's business category <br> TEAMS - Google's Teams Photo tag - availability dependent on a location's business category <br> AT_WORK - Google's At Work Photo tag - availability dependent on a location's business category <br> COMMON_AREA - Google's Common Area Photo tag - availability dependent on a location's business category <br> ROOMS - Google's Rooms Photo tag - availability dependent on a location's business category
      - `url` string: The URL of the photo
      - `publicUrl` string: A public url for this photo
      - `thumbnailUrl` string: Url for the image thumbnail
      - `cropOffsetX` integer: Horizontal pixel offset of the top-left corner of the cropped area [LANDSCAPE photo only]
      - `cropOffsetY` integer: Vertical pixel offset of the top-left corner of the cropped area [LANDSCAPE photo only]
      - `cropWidth` integer: Width of the 16:9 cropped area [LANDSCAPE photo only]
      - `cropHeight` integer: Height of the 16:9 cropped area [LANDSCAPE photo only]
      - `sourceUrl` string: The client supplied url for a photo

## Other responses

- `400`: Bad Request - The request was invalid or cannot be otherwise served
- `401`: Unauthorized - Authentication credentials are missing or invalid
- `403`: Forbidden - The request is understood, but has been refused or access is not allowed
- `404`: Not Found - The requested resource could not be found
- `409`: Conflict - The request conflicts with current state of the server

---

[API](https://skmtc.dev/promorepublic/apis/listings-api.md) - [All operations](https://skmtc.dev/promorepublic/apis/listings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/promorepublic/apis/listings-api/revisions/a04c07676a6e?raw)
