Open API v2 will be deprecated on April 3, 2023. Please begin transitioning to Open API v3 as soon as possible. As of September 29, 2022 all new apps will only be permitted to use Open API v3.

API Documentation

ListingInventory

Overview

A representation of a listing's inventory.

Fields

Field Visibility Level Permission Scope Type Description
products public none array(ListingProduct) The products available for this listing.
price_on_property private listings_r array(int) Which properties control price?
quantity_on_property private listings_r array(int) Which properties control quantity?
sku_on_property private listings_r array(int) Which properties control SKU?

Associations

This resource has no associations.

Methods

getInventory

Method Name getInventory
Synopsis Get the inventory for a listing
HTTP Method GET
URI /listings/:listing_id/inventory
Parameters
Name Required Default Type
listing_id Y   int
write_missing_inventory N boolean
Requires OAuth N
Permission Scope none
Notes
When a listing has not been edited using the new inventory tools, it will have no inventory records. We generate suitable records on the fly, but don’t write them out by default. If you need to get stable product_id and offering_id fields, pass the write_missing_inventory parameter as true and we’ll persist the records.
In order to return SKU data, you will need the Listings_W permission.

updateInventory

Method Name updateInventory
Synopsis Update the inventory for a listing
HTTP Method PUT
URI /listings/:listing_id/inventory
Parameters
Name Required Default Type
listing_id Y   int
products Y   stringJSON
price_on_property N   array(int)
quantity_on_property N   array(int)
sku_on_property N   array(int)
Requires OAuth Y
Permission Scope listings_w
Notes
price_on_property is an array of the property_ids of the properties which price depends on (if any).
quantity_on_property is an array of the property_ids of the properties which quantity depends on (if any).
sku_on_property is an array of the property_ids of the properties which sku depends on (if any).
The update will fail if the supplied values for product sku and offering quantity and price are incompatible with the supplied values of the "on_property_*" fields.
When supplying a price, supply a float equivalent to amount divided by divisor as specified in the Money resource.
The products parameter should be a JSON array of products, even if you only send a single product. All field names in the JSON blob should be lowercase.
See Authorized PUT/POST Requests for more information on how to format this type of request.

Open API v3New

Your developer account