Skip to content
msMarketSDK

all endpoints

// api reference

Categories

GET /v1/categories

List categories

secret key only

GET /v1/categoriesrequest
curl https://api.marketsdk.com/v1/categories \
  -H "Authorization: Bearer $MARKETSDK_KEY"
200 example response, category list
{
  "object": "list",
  "data": [
    {
      "object": "category",
      "id": "cat_034XtPDs7UJ0TXzTsdaHZa",
      "key": "string",
      "name": "string",
      "description": null,
      "parent": null,
      "attribute_schema": {
        "attributes": [
          null
        ]
      },
      "fee": {
        "percent_bps": null,
        "fixed_amount": null
      },
      "prohibited": false,
      "created_at": "2026-10-01T12:00:00.000Z",
      "updated_at": "2026-10-01T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

parameters

Parameters
fieldtypeabout
limitinteger, in querymin 1, max 100, default 20
starting_afterstring, in queryThe next_cursor of the previous page.

returns 200, category list

fields
Response fields
fieldtypeabout
objectrequiredone of: list
datarequiredarray of category
data[].objectrequiredone of: category
data[].idrequiredstring
data[].keyrequiredstring
data[].namerequiredstring
data[].descriptionrequiredstring or null
data[].parentrequiredstring or null
data[].attribute_schemarequiredattribute schema
data[].attribute_schema.attributesrequiredarray of attribute definitionup to 50 items
data[].feerequiredcategory fee or null
data[].fee.percent_bpsinteger or nullBasis points: 250 is 2.5 percent.min 0, max 10000
data[].fee.fixed_amountinteger or nullMinor units, in the marketplace currency.min 0
data[].prohibitedrequiredbooleanListings in a prohibited category cannot be published.
data[].created_atrequiredtimestamp
data[].updated_atrequiredtimestamp
has_morerequiredbooleanWhether another page follows.
next_cursorrequiredstring or nullPass as starting_after (or cursor for search) to get the next page.

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 429Rate limited. See Retry-After.

POST /v1/categories

Create a category

secret key only

POST /v1/categoriesrequest
curl -X POST https://api.marketsdk.com/v1/categories \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"key":"ui-kits","name":"string"}'
201 example response, category
{
  "object": "category",
  "id": "cat_034XtPDs7UJ0TXzTsdaHZa",
  "key": "string",
  "name": "string",
  "description": null,
  "parent": null,
  "attribute_schema": {
    "attributes": [
      {
        "key": "format",
        "label": "string",
        "type": "string",
        "required": false,
        "options": [
          null
        ],
        "min": 0,
        "max": 0,
        "max_length": 0
      }
    ]
  },
  "fee": {
    "percent_bps": null,
    "fixed_amount": null
  },
  "prohibited": false,
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

body, create category

Request body
fieldtypeabout
keyrequiredstringYour key for the category. Unique per marketplace.
namerequiredstringup to 120 characters
descriptionstring or nullup to 2000 characters
parentstring or nullAnother category of this marketplace.
attribute_schemaattribute schema
attribute_schema.attributesrequiredarray of attribute definitionup to 50 items
attribute_schema.attributes[].keyrequiredstring
attribute_schema.attributes[].labelstring
attribute_schema.attributes[].typerequiredone of: string, number, integer, boolean, enum
attribute_schema.attributes[].requiredboolean
attribute_schema.attributes[].optionsarray of string
attribute_schema.attributes[].mininteger
attribute_schema.attributes[].maxinteger
attribute_schema.attributes[].max_lengthinteger
feecategory fee or nullOverrides the marketplace's platform fee for listings in this category. Null uses the marketplace fee.
fee.percent_bpsinteger or nullBasis points: 250 is 2.5 percent.min 0, max 10000
fee.fixed_amountinteger or nullMinor units, in the marketplace currency.min 0
prohibitedbooleanListings in a prohibited category cannot be published (section 9.4).default false

returns 201, category

fields
Response fields
fieldtypeabout
objectrequiredone of: category
idrequiredstring
keyrequiredstring
namerequiredstring
descriptionrequiredstring or null
parentrequiredstring or null
attribute_schemarequiredattribute schema
attribute_schema.attributesrequiredarray of attribute definitionup to 50 items
attribute_schema.attributes[].keyrequiredstring
attribute_schema.attributes[].labelstring
attribute_schema.attributes[].typerequiredone of: string, number, integer, boolean, enum
attribute_schema.attributes[].requiredboolean
attribute_schema.attributes[].optionsarray of string
attribute_schema.attributes[].mininteger
attribute_schema.attributes[].maxinteger
attribute_schema.attributes[].max_lengthinteger
feerequiredcategory fee or null
fee.percent_bpsinteger or nullBasis points: 250 is 2.5 percent.min 0, max 10000
fee.fixed_amountinteger or nullMinor units, in the marketplace currency.min 0
prohibitedrequiredbooleanListings in a prohibited category cannot be published.
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.

GET /v1/categories/{id}

Retrieve a category

secret key only

GET /v1/categories/{id}request
curl https://api.marketsdk.com/v1/categories/{id} \
  -H "Authorization: Bearer $MARKETSDK_KEY"
200 example response, category
{
  "object": "category",
  "id": "cat_034XtPDs7UJ0TXzTsdaHZa",
  "key": "string",
  "name": "string",
  "description": null,
  "parent": null,
  "attribute_schema": {
    "attributes": [
      {
        "key": "format",
        "label": "string",
        "type": "string",
        "required": false,
        "options": [
          null
        ],
        "min": 0,
        "max": 0,
        "max_length": 0
      }
    ]
  },
  "fee": {
    "percent_bps": null,
    "fixed_amount": null
  },
  "prohibited": false,
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

returns 200, category

fields
Response fields
fieldtypeabout
objectrequiredone of: category
idrequiredstring
keyrequiredstring
namerequiredstring
descriptionrequiredstring or null
parentrequiredstring or null
attribute_schemarequiredattribute schema
attribute_schema.attributesrequiredarray of attribute definitionup to 50 items
attribute_schema.attributes[].keyrequiredstring
attribute_schema.attributes[].labelstring
attribute_schema.attributes[].typerequiredone of: string, number, integer, boolean, enum
attribute_schema.attributes[].requiredboolean
attribute_schema.attributes[].optionsarray of string
attribute_schema.attributes[].mininteger
attribute_schema.attributes[].maxinteger
attribute_schema.attributes[].max_lengthinteger
feerequiredcategory fee or null
fee.percent_bpsinteger or nullBasis points: 250 is 2.5 percent.min 0, max 10000
fee.fixed_amountinteger or nullMinor units, in the marketplace currency.min 0
prohibitedrequiredbooleanListings in a prohibited category cannot be published.
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 404No object with that id in this marketplace.
  • 429Rate limited. See Retry-After.

PATCH /v1/categories/{id}

Update a category

secret key only

PATCH /v1/categories/{id}request
curl -X PATCH https://api.marketsdk.com/v1/categories/{id} \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
200 example response, category
{
  "object": "category",
  "id": "cat_034XtPDs7UJ0TXzTsdaHZa",
  "key": "string",
  "name": "string",
  "description": null,
  "parent": null,
  "attribute_schema": {
    "attributes": [
      {
        "key": "format",
        "label": "string",
        "type": "string",
        "required": false,
        "options": [
          null
        ],
        "min": 0,
        "max": 0,
        "max_length": 0
      }
    ]
  },
  "fee": {
    "percent_bps": null,
    "fixed_amount": null
  },
  "prohibited": false,
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, update category

Request body
fieldtypeabout
namestringup to 120 characters
descriptionstring or null
parentstring or null
feecategory fee or null
fee.percent_bpsinteger or nullBasis points: 250 is 2.5 percent.min 0, max 10000
fee.fixed_amountinteger or nullMinor units, in the marketplace currency.min 0
prohibitedbooleanListings in a prohibited category cannot be published. Listings already published stay until moderated.

returns 200, category

fields
Response fields
fieldtypeabout
objectrequiredone of: category
idrequiredstring
keyrequiredstring
namerequiredstring
descriptionrequiredstring or null
parentrequiredstring or null
attribute_schemarequiredattribute schema
attribute_schema.attributesrequiredarray of attribute definitionup to 50 items
attribute_schema.attributes[].keyrequiredstring
attribute_schema.attributes[].labelstring
attribute_schema.attributes[].typerequiredone of: string, number, integer, boolean, enum
attribute_schema.attributes[].requiredboolean
attribute_schema.attributes[].optionsarray of string
attribute_schema.attributes[].mininteger
attribute_schema.attributes[].maxinteger
attribute_schema.attributes[].max_lengthinteger
feerequiredcategory fee or null
fee.percent_bpsinteger or nullBasis points: 250 is 2.5 percent.min 0, max 10000
fee.fixed_amountinteger or nullMinor units, in the marketplace currency.min 0
prohibitedrequiredbooleanListings in a prohibited category cannot be published.
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 404No object with that id in this marketplace.
  • 429Rate limited. See Retry-After.

GET /v1/categories/{id}/attribute_schema

A category's attribute schema

secret key only

GET /v1/categories/{id}/attribute_schemarequest
curl https://api.marketsdk.com/v1/categories/{id}/attribute_schema \
  -H "Authorization: Bearer $MARKETSDK_KEY"
200 example response, attribute schema
{
  "attributes": [
    {
      "key": "format",
      "label": "string",
      "type": "string",
      "required": false,
      "options": [
        "string"
      ],
      "min": 0,
      "max": 0,
      "max_length": 0
    }
  ]
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

returns 200, attribute schema

fields
Response fields
fieldtypeabout
attributesrequiredarray of attribute definitionup to 50 items
attributes[].keyrequiredstring
attributes[].labelstring
attributes[].typerequiredone of: string, number, integer, boolean, enum
attributes[].requiredboolean
attributes[].optionsarray of string
attributes[].mininteger
attributes[].maxinteger
attributes[].max_lengthinteger

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 404No object with that id in this marketplace.
  • 429Rate limited. See Retry-After.

PUT /v1/categories/{id}/attribute_schema

Replace a category's attribute schema

Refused if a listing already in the category would no longer fit.

secret key only

PUT /v1/categories/{id}/attribute_schemarequest
curl -X PUT https://api.marketsdk.com/v1/categories/{id}/attribute_schema \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"attributes":[{"key":"format","type":"string"}]}'
200 example response, attribute schema
{
  "attributes": [
    {
      "key": "format",
      "label": "string",
      "type": "string",
      "required": false,
      "options": [
        "string"
      ],
      "min": 0,
      "max": 0,
      "max_length": 0
    }
  ]
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, attribute schema

Request body
fieldtypeabout
attributesrequiredarray of attribute definitionup to 50 items
attributes[].keyrequiredstring
attributes[].labelstring
attributes[].typerequiredone of: string, number, integer, boolean, enum
attributes[].requiredboolean
attributes[].optionsarray of string
attributes[].mininteger
attributes[].maxinteger
attributes[].max_lengthinteger

returns 200, attribute schema

fields
Response fields
fieldtypeabout
attributesrequiredarray of attribute definitionup to 50 items
attributes[].keyrequiredstring
attributes[].labelstring
attributes[].typerequiredone of: string, number, integer, boolean, enum
attributes[].requiredboolean
attributes[].optionsarray of string
attributes[].mininteger
attributes[].maxinteger
attributes[].max_lengthinteger

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.