set_feature_contract
Save your workspace's feature contract, replacing the one saved: the request fields, by API path, your buyer-aware pricing models learn from, and how each becomes a label (a category, a numeric bin or a flag). Fields that identify a person are refused. Needs a Last Price credential with routing write scope; from the dashboard, an owner or admin.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| opt_in | No | The customer segment and geo fields are used only when listed here, as in buyer-aware pricing. | |
| contract | Yes | The contract: { inputs: [...] } in model column order, at most 64. Each input has a name, the field's path in the pricing request context (a top-level field such as the buyer type or channel, or metadata.<path> such as metadata.device.type; a list is read through [] and reduced, as in metadata.items[]:count, metadata.items[].price:sum or metadata.items[].kind:has=hdmi), and a type: category (with vocabulary, 1 to 50 values), bucket (with edges, rising numbers) or flag. infer_feature_contract proposes one from sample requests. |