fields
or one prefixed with fields:
. These “optional” fields are
denoted in the field descriptions in the API reference with the text Optional Field
.
Example requesting optional fields qty_locked
and is_pickable
:
all
may be used. However, it
is recommended to request only the fields you need, to reduce processing time and conserve bandwidth.
Example requesting all location fields (including all optional fields):
fields
, either
explicitly or implied with all
, only the “reference” to that object (an object with type
and id
) is added to the response. However, the referenced objects including all or some of their
properties can also be added to the response to avoid additional round-trips to fetch them.
Please read the “Including Referenced Objects” section below for more info.all
keyword will not automatically include all fields of referenced objects as well. I.e. its behavior
is not recursive.type
and id
in the same response. This object data
for additionally included objects is added to the included
property of the response by requesting one
or more fields of the referenced objects. The included
property is an object of lists with a key for each
included object type
which contains a list of included objects of that type.
The corresponding query parameter for including referenced objects will be the path of the reference to the
object from the top-level object as if it was included inline and prefixed with fields:
.
Example requesting a collection of locations as well as the sku
and name
of every location’s product
:
basic
keyword
as a value of the parameter to imply that all non-optional fields shall be returned.
Example requesting all basic (non-optional) fields of the referenced Product
object:
Optional Field
in the descriptions and these will not be returned when requesting basic
, but may be listed
individually or implied using all
to return all basic and optional fields.
Example requesting a mix of basic and optional fields of the referenced Product
object:
Product
object:
all
keyword only implies that the first level of fields shall be returned and deeply-referenced fields are
not implied but can be included in many cases as well. For example, since a Location
references a Product
using
a property called product
and the Product
references a Merchant
using a property called merchant
, you can
request that the Merchant
data be included in the response using fields:product.merchant
.
Example requesting all top-level fields as well as all fields of a referenced object and a deeply-referenced object:
included
object for the matching
type
and then searching the list of objects for the matching id
.
For example, the response for the above query may have this shape (irrelevant fields replaced with ”…” for simplicity):