---
title: "Upsert Product Locations"
method: POST
path: "/products/{product_id}/locations"
tags: ["Products"]
---

# Upsert Product Locations

`POST /products/{product_id}/locations`

## Request

- Base URL: `https://api.liftforward.com`
- URL: `https://api.liftforward.com/products/{product_id}/locations`
- Auth: API key in header `Api-Key`

Creates or updates the availability and inventory messaging for the Product at one or more Locations.

Send an array of `product_locations`. Each entry identifies its Location by either `location_id` (LiftForward id) or `merchant_location_id` (your own id). The whole array is applied in a single transaction — if any entry is invalid, nothing is saved.

## Path parameters

- `product_id` string, required

## Request body

- PostProductsProductIdLocations: Upsert Product Locations
  - `product_locations` object[], required
    - `location_id` string: LiftForward identifier for the Location. Provide this or merchant_location_id.
    - `merchant_location_id` string: The Location's identifier in the merchant's own system. Provide this or location_id.
    - `available` boolean, required: Whether the product is available at this Location.
    - `inventory_message` string, required: Inventory message shown for this product at this Location.
    - `inventory_help_message` string, required: Help message shown when hovering the availability help icon for this Location.

## Response `201`

Upsert Product Locations

- MerchantApiEntitiesProductLocationsResponse: MerchantApi_Entities_ProductLocationsResponse model
  - `product_locations` MerchantApiEntitiesProductLocationEntity[]
    - `location_id` string, required: LiftForward identifier for the Location.
    - `merchant_location_id` string, required: The Location's identifier in the merchant's own system.
    - `available` boolean, required: Whether the product is available at this Location.
    - `inventory_message` string, required: Inventory message shown for this product at this location. Overrides the product-level message.
    - `inventory_help_message` string, required: Help message shown when hovering the availability help icon for this product at this location.
  - `meta` MetaEntity
    - `page` integer: Current page of results.
    - `per_page` integer: Results per page.
    - `total_pages` integer: Total number of pages in complete result set.
    - `total_records` integer: Total number of records in the complete result set.

## Other responses

- `400`: Invalid parameters
- `401`: Unauthorized
- `405`: Not Allowed
- `408`: Request Time Out
- `500`: Internal Service Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/liftforward/apis/device-as-a-service-merchant-apis-lift-daas-service-producti.md) - [All operations](https://skmtc.dev/liftforward/apis/device-as-a-service-merchant-apis-lift-daas-service-producti/llms.txt) - [OpenAPI document](https://skmtc.dev/liftforward/apis/device-as-a-service-merchant-apis-lift-daas-service-producti/revisions/5a1383ffd271?raw)
