Skip to content

Create Size Chart V2

POST
/product/202610/size_charts

Create one size chart from structured table data. Use REUSABLE_TEMPLATE to create a seller template that can be reused across products, or PRODUCT_SCOPED to create a chart for a single product. The response returns the created size chart ID. The request must identify one authorized shop using shop_cipher.

shop_cipher
required
string

Identifies the shop. Obtain it from the Get Authorized Shops API.

Media typeapplication/json
object
category_id
required

The leaf category for which to create the size chart. The category must support size charts.

string
size_chart_data
required

Structured size chart content.

object
description

Additional size chart description.

string
is_one_size

Whether this is a one-size chart.

boolean
measurement_type
required

Possible values: GENERIC_MEASUREMENTS: generic measurements; BODY_MEASUREMENTS: shopper body measurements; PRODUCT_MEASUREMENTS: finished-product measurements.

string
Allowed values: GENERIC_MEASUREMENTS BODY_MEASUREMENTS PRODUCT_MEASUREMENTS
size_types

Possible values: size_chart_common_size_type: Common; size_chart_size_type_regular: Regular; size_chart_size_type_juniors: Juniors; size_chart_size_type_plus: Plus; size_chart_size_type_big&tall: Big & Tall; size_chart_size_type_petite: Petite. Available values depend on the category.

Array<string>
table
required

Table containing headers and rows.

object
headers
required

Ordered header definitions. Provide 1 to 20 headers.

Array<object>
object
id

Standard size-system or measurement ID. For standard measurement columns, call Get Category Rules for the corresponding category and use the ID from measurement_and_options[].options[].id under the applicable measurement_type. For size-system columns, use the following predefined IDs:

  • Size: size_chart_size_system_size
  • US: size_chart_size_system_us
  • UK: size_chart_size_system_uk
  • EU: size_chart_size_system_eu
  • JP: size_chart_size_system_jp
  • MX: size_chart_size_system_mx Omit this field for custom columns.
string
name
required

Header display name. Maximum length: 32 characters.

string
<= 32 characters
rows
required

Rows of the size chart. Provide 1 to 45 rows.

Array<object>
object
cells
required

Cells aligned by index with table.headers. Each row must contain exactly one cell for every header.

Array<object>
object
value
required

Cell value. Maximum length: 32 characters.

string
<= 32 characters
unit_system
required

Possible values: METRIC: metric units; IMPERIAL: imperial units.

string
Allowed values: METRIC IMPERIAL
size_chart_mode
required

Possible values: REUSABLE_TEMPLATE: A size chart template that can be reused across multiple products. PRODUCT_SCOPED: A size chart created for and used by a single product.

string
template_name

Template name. Required when size_chart_mode is REUSABLE_TEMPLATE. When size_chart_mode is PRODUCT_SCOPED, any value provided for this field is discarded and is not stored.

string
Example
{
"category_id": "601739",
"size_chart_data": {
"description": "Use body measurements.",
"is_one_size": false,
"measurement_type": "BODY_MEASUREMENTS",
"size_types": [
"size_chart_size_type_regular"
],
"table": {
"headers": [
{
"id": "size_chart_size_system_size",
"name": "Size"
},
{
"id": "size_chart_option_bust",
"name": "Bust"
}
],
"rows": [
{
"cells": [
{
"value": "M"
},
{
"value": "90"
}
]
}
]
},
"unit_system": "METRIC"
},
"size_chart_mode": "REUSABLE_TEMPLATE",
"template_name": "Women's Tops Size Chart"
}

Success

Media typeapplication/json
object
code

Status code; 0 means success.

integer format: int64
message

Success or failure message.

string
request_id

Request log ID.

string
data
object
size_chart_id

The ID of the created size chart. For REUSABLE_TEMPLATE mode, use this value as size_chart.template.id in subsequent product APIs. For PRODUCT_SCOPED mode, this ID identifies a size chart specific to a single product and cannot be reused as a template ID.

string
Example
{
"code": 0,
"data": {
"size_chart_id": "7612345678901234567"
},
"message": "Success",
"request_id": "202203070749000101890810281E8C70B7"
}