Connections

Listing requirements

Lists the fields a category or product type requires.

GET
/v1/connections/{id}/listing-requirements

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:

FieldWhat it says
pathwhere the value goes: a canonical field (fiscal.ncm), an attribute (attributes[BRAND]) or a marketplace option (marketplaceOptions.mock.listingType)
scopewhich record carries the value: product, variant, marketplace_product, marketplace_product_variant, listing or binding
requirementrequired (the marketplace refuses without it), recommended (weighs on quality or exposure) or optional
conditionsempty: 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.

Authorization

api_key
headerAuthorizationBearer <token>

API key (mk_...)

Path Parameters

id*string

Identifier of the resource, as returned by the API.

Match^([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)$
Formatuuid

Query Parameters

categoryId?string

The category to describe.

Length1 <= length <= 200
productType?string

The product type to describe, for marketplaces that ask by product type.

Length1 <= length <= 200
catalogProductId?string

A catalog product: the requirements then come with what that product already fixes.

Length1 <= length <= 200

Response Body

The fields the category asks for, each with its path, scope, requirement and conditions, and the limits of the category.

application/json
  1. response

What a category asks for before a listing can be published in it.

categoryId*string

The category these requirements are for.

Length1 <= length <= 200
productType*|

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.

Itemsitems <= 500
limits*

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  }}