Connections

List categories

Browses the marketplace category tree.

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

List categories

  • MockDevelopment only
  • Mercado LivreNot supported
  • MagaluPlanned
  • AmazonPlanned
  • TikTok ShopPlanned
  • ShopeePlanned

Returns the categories where a listing can be published. With no filter you get the root. Go down with parentId or search by text with query. Only a category with leaf and listingAllowed true accepts a listing.

curl "$BACKEND_URL/v1/connections/$CONNECTION_ID/listing-categories?parentId=mock-electronics" \
  -H "Authorization: Bearer mk_your_api_key"

Each item has the path (root to category) and the native value in marketplaceData. Once you pick a category, see what it requires in Listing requirements.

Part of Publish listings.

Synchronous read

The Connection discovery and catalog routes answer right away, with no Job: you use the answer to build a form. The time limit is the marketplace adapter's. If it does not answer, you get 503 MARKETPLACE_UNAVAILABLE and can try again; an inactive Connection gives 409. See Errors.

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

page?integer

Page number, starting at 1. Defaults to 1. A page beyond pagination.totalPages is not an error: it returns empty data.

Range1 <= value <= 9007199254740991
Default1
pageSize?integer

Items per page, from 1 to 100. Defaults to 20.

Range1 <= value <= 100
Default20
parentId?string

List the children of this category. Omit it to list the root categories.

Length1 <= length <= 200
query?string

Only categories whose name matches this text. With no parentId it looks at the whole tree; with one, at the children of that category.

Length1 <= length <= 200

Response Body

One page of categories: the roots, or the children of parentId, or the ones whose name matches query. pagination carries the totals.

application/json
  1. response

One page of categories.

data*array<>

The categories of this page, in the order the marketplace gives them.

pagination*

Where this page sits in the whole listing: the totals and whether there are pages before and after it.

curl -X GET "https://example.com/v1/connections/3d1c8a52-7f0e-4b0a-8a65-9c1b2f6d7e01/listing-categories"
{  "data": [    {      "id": "mock-cellphones",      "name": "Cell phones",      "parentId": "mock-electronics",      "path": [        {          "id": "mock-electronics",          "name": "Electronics"        },        {          "id": "mock-cellphones",          "name": "Cell phones"        }      ],      "leaf": true,      "listingAllowed": true,      "marketplaceData": {}    }  ],  "pagination": {    "page": 1,    "pageSize": 20,    "totalItems": 57,    "totalPages": 3,    "hasNext": true,    "hasPrev": false  }}