Managing Charts
Create, update, and bulk-load size charts from markdown or PDF.
PDF Ingestion
Supply a PDF by URL or upload; it’s converted to markdown asynchronously.
Product Linking
Associate a size chart with a product during import.
AI Assistant
How Remark’s assistant uses size charts to help customers.
Before You Begin
All size chart operations require an integration API key with the
SIZE_CHART_MANAGE permission.
All size chart mutations and queries are served at
https://api.remark.ai/graphql and authenticate via the X-Vendor-Api-Key header. You can also send the key as Authorization: Bearer rmrk_.... Dashboard user tokens aren’t accepted for these operations.
Each size chart has an externalId you control. This is how you reference a chart when associating it with products, and how bulk operations match existing charts.
Managing Charts
A size chart has aname, an externalId, and a markdown body. The body can be supplied directly as markdown, or generated from a PDF (see PDF Ingestion).
Create a Chart
Provide exactly one ofbody (markdown) or sourceUrl (a PDF URL).
A chart created from markdown is
READY immediately. A chart created from a PDF is PENDING until conversion completes — see PDF Ingestion.
Each externalId must be unique. To create or update charts by externalId, use Bulk Upsert.
List Charts
first (1–100) and the previous response’s endCursor to page forward.
Update a Chart
input fields (externalId, name, body, sourceUrl) are optional — only include what you want to change. Pass at most one of body or sourceUrl. Passing body replaces the content with markdown and sets the chart to READY. Passing sourceUrl clears the body and sets the chart to PENDING until the new PDF converts.
Delete a Chart
Deleting a chart unlinks it from any associated products — those products simply lose their size chart. It does not affect the products otherwise.
Bulk Upsert
For loading large sets of charts (up to 5,000 per request), usebulkUpsertSizeCharts. Charts are matched by externalId — existing charts are updated, new ones are created. A request with duplicate externalId values is rejected.
body / sourceUrl rules as Create a Chart. Response:
Bulk Delete
Delete up to 5,000 charts byexternalId in a single call. Unknown external IDs are skipped and counted in notFound. A request with duplicate externalId values is rejected.
PDF Ingestion
If your sizing guides are PDFs, you can hand Remark a PDF and it will convert it to markdown for you. There are two ways to supply one: By URL — passsourceUrl to createSizeChart, updateSizeChart, or any bulk upsert entry. Remark fetches and converts the PDF.
By upload — for PDFs not hosted at a public URL, upload the file directly with uploadSizeChartPdf:
externalId. Send it as a GraphQL multipart request with an Apollo-Require-Preflight: true header. The file must be a PDF of at most 50 MB.
source: PDF and status: PENDING, and conversion runs in the background.
Conversion Status
Every chart exposes astatus reflecting where its body stands:
Poll
sizeCharts and check each chart’s status to see when a PDF finishes converting. Conversion is typically fast, but you should treat a chart as usable only once it reaches READY.
bulkUpsertSizeCharts doesn’t re-convert a chart whose sourceUrl is unchanged, unless its last conversion failed. If you replace the PDF at the same URL, call updateSizeChart with the sourceUrl, or use a new URL.Linking Products
Associate a size chart with a product by includingsizeChartExternalId in your product import payload. This works with both SFTP and direct API imports. Each product can have one size chart.
- Omit
sizeChartExternalIdto leave the existing association unchanged. nullclears the association.- An external ID sets the association. An unknown external ID clears it.
Create your size charts before importing products. Referencing an external ID that doesn’t match an existing chart clears the product’s association rather than failing the import.
AI Assistant Behavior
Once you’ve created at least one size chart, the Find size chart action becomes available in the dashboard. Add it to the Actions section of each intent that handles sizing or fit questions, so the assistant can look up a product’s chart during those conversations.How it works
- Lookup: When a customer asks about sizing for a product, the assistant looks up that product’s associated chart by ID or name.
- In-conversation answer: If the chart is
READY, the assistant uses its markdown to answer the customer’s question directly — recommending a size, reading off measurements, or comparing across the table. - PDF fallback: If the chart’s PDF is still converting (
PENDING) or conversion failed (FAILED), the assistant falls back to linking the customer to the original PDF so they’re never left without a sizing reference.
Example conversation
Customer: What size should I get in the Trail Runner Shoe? I’m a US 9.5. Assistant: For the Trail Runner Shoe, a US 9.5 maps to a EU 43. These run true to size, so a 9.5 should be a good fit.
Setup Checklist
1
Load your charts
Create or bulk upsert your size charts from markdown or PDF. For large catalogs, batch into requests of up to 5,000 charts each.
2
Wait for conversion
For PDF charts, confirm each reaches
READY before relying on it.3
Link products
Include
sizeChartExternalId in your product import payloads.4
Add the action to an intent
Add Find size chart to the intents that handle sizing and fit questions.
5
Test
Start a conversation with Remark’s AI assistant and ask a sizing question about a linked product.