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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The leaf category for which to create the size chart. The category must support size charts.
Structured size chart content.
object
Additional size chart description.
Whether this is a one-size chart.
Possible values: GENERIC_MEASUREMENTS: generic measurements; BODY_MEASUREMENTS: shopper body measurements; PRODUCT_MEASUREMENTS: finished-product measurements.
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.
Table containing headers and rows.
object
Ordered header definitions. Provide 1 to 20 headers.
object
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.
Header display name. Maximum length: 32 characters.
Rows of the size chart. Provide 1 to 45 rows.
object
Cells aligned by index with table.headers. Each row must contain exactly one cell for every header.
object
Cell value. Maximum length: 32 characters.
Possible values: METRIC: metric units; IMPERIAL: imperial units.
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.
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.
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"}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
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.
Example
{ "code": 0, "data": { "size_chart_id": "7612345678901234567" }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}