set_listing_attributes
Set channel-defined listing attributes like Material or Style on one product. Partial writes succeed; rejected values are reported for correction, and sync pushes changes immediately.
Instructions
Set channel-defined listing attributes on ONE product (Material, Style, Washing Instructions and similar). Call describe_listing_attributes first to learn the field keys and their allowed values.
A PARTIAL WRITE SUCCEEDS. Send four values with one bad and the three good ones are stored while the bad one is reported ā you do not have to get them all right at once. A value the channel refuses comes back in rejected with a machine-readable reason and the allowed values echoed, so you can correct it in one more turn rather than guessing. Rejections are never dropped silently.
ā NEVER INVENT A VALUE. Relay what the merchant told you. If you cannot get a value from them, leave it UNSET and say so ā an unset field is honest, an invented one is not. Do not infer it from the product type, do not copy it from another shop, and do not pick the nearest allowed value because it looks close.
š SIZE CHART. US apparel is graded down without one. A chart is normally rendered automatically from the fulfillment provider's real measurements, so most listings need nothing. When one IS flagged, prefer size_chart_measurements (an object ā call import_size_measurements to fill it from the provider) over size_chart_template_id: the template id can only come from a human in the channel's own admin, because the channel publishes no way to list, verify or correct one.
ā NEVER INVENT MEASUREMENTS. They are what a buyer reads before choosing a size. Do not derive a table from the garment type, do not copy one from a similar product, and do not fill a gap with a plausible number. A malformed table is refused whole, with a reason ā nothing is half-applied. A missing cell is fine and renders blank; an invented one means somebody receives a garment that does not fit.
Setting a value does NOT change the live listing on its own ā the channel is updated on the next sync. Pass sync: true to push it immediately, or run sync_to_channel afterwards.
[#ef218b]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sync | No | Push the listing to the channel immediately after storing. | |
| remove | No | Field keys to clear. | |
| values | Yes | field key -> value. Use an array for a field whose `cardinality` is "multi", and an object for one whose `value_type` is "object" (build it from that field's `channel_ref.object_schema`). Values are relayed exactly as given. | |
| workspace | No | ||
| store_uuid | Yes | ||
| product_uuid | Yes | ||
| integration_uuid | No | Only needed when the store has more than one connected channel. |