Listing requirements
Lists the fields a category or product type requires.
Read category requirements
- MockDevelopment only
- Mercado LivreNot supported
- MagaluPlanned
- AmazonPlanned
- TikTok ShopPlanned
- ShopeePlanned
Tells you what to fill in to publish. Send categoryId, productType or both. With none, the answer is 400. catalogProductId narrows the result with what that catalog product already defines.
curl "$BACKEND_URL/v1/connections/$CONNECTION_ID/listing-requirements?categoryId=mock-cellphones" \
-H "Authorization: Bearer mk_your_api_key"Each item of fields is a field to fill in:
| Field | What it says |
|---|---|
path | where the value goes: a canonical field (fiscal.ncm), an attribute (attributes[BRAND]) or a marketplace option (marketplaceOptions.mock.listingType) |
scope | which record carries the value: product, variant, marketplace_product, marketplace_product_variant, listing or binding |
requirement | required (the marketplace refuses without it), recommended (weighs on quality or exposure) or optional |
conditions | empty: the requirement always applies. With items: it only applies when all conditions are true. Each has path, operator (equals, not_equals, in, present, absent) and values |
Example. GTIN is required, unless the seller states why there is none (EMPTY_GTIN_REASON):
{
"path": "attributes[GTIN]",
"scope": "marketplace_product_variant",
"requirement": "required",
"conditions": [
{
"path": "attributes[EMPTY_GTIN_REASON]",
"operator": "absent",
"values": []
}
]
}Read it like this: GTIN is required while attributes[EMPTY_GTIN_REASON] is missing (absent). Once the reason is filled in, the condition stops holding and GTIN is no longer required. present and absent take no values.
Each field also has the allowed values, the units (UCUM) and variationAxis, which marks a field that becomes a variation, such as color. Outside the fields, limits has the category caps, like maxPictures. To check a listing against this list, use Validate listing.
Part of Publish listings. Synchronous read, no Job, as in List categories.
api_keyAuthorizationBearer <token>API key (mk_...)
id*stringIdentifier of the resource, as returned by the API.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidcategoryId?stringThe category to describe.
1 <= length <= 200productType?stringThe product type to describe, for marketplaces that ask by product type.
1 <= length <= 200catalogProductId?stringA catalog product: the requirements then come with what that product already fixes.
1 <= length <= 200The fields the category asks for, each with its path, scope, requirement and conditions, and the limits of the category.
application/json- response
What a category asks for before a listing can be published in it.
categoryId*stringThe category these requirements are for.
1 <= length <= 200productType*|The product type of the category, when the marketplace has one. null when it has none.
catalogProductId*|The catalog product the requirements were asked for, or null when they were asked for the category alone.
fields*array<>Every field the category asks for.
items <= 500limits*Limits of the category. A limit the marketplace does not state is left out.
curl -X GET "https://example.com/v1/connections/3d1c8a52-7f0e-4b0a-8a65-9c1b2f6d7e01/listing-requirements"{ "categoryId": "mock-cellphones", "productType": "CELLULAR_PHONE", "catalogProductId": null, "fields": [ { "path": "attributes[BRAND]", "key": "BRAND", "label": "Brand", "scope": "marketplace_product", "requirement": "required", "conditions": [], "valueType": "enum", "multiple": false, "maxValues": null, "allowedValues": [ { "value": "mock-brand-acme", "label": "Acme" } ], "allowCustomValue": false, "allowedUnits": [], "constraints": {}, "editable": "always", "variationAxis": false, "marketplaceData": {} } ], "limits": { "maxPictures": 10, "maxVariants": 100 }}