Fejlesztőknek
Kezdj bele
AI/Tool reference/Catalog/Warranty, quantity and plan rules

Warranty, quantity and plan rules

Ez az oldal még csak angolul érhető el.

The 11 tools of the Warranty, quantity and plan rules toolset in the Catalog area, with their permissions, approval rules and inputs.

Ezen az oldalon

Toolset product_policies, 11 tools.

Records

platform_restriction

What the plan has locked for one limit, such as products over the plan allowance. meter names the limit.

  • Permission: products.read
  • Tools: platform_restriction_list

Filters on the list:

FilterTypeRequiredDescription
meterstringyesThe limit, such as products

variant_quantity_rule

The least, most and step a shopper may buy of a variant, set by a wholesale quantity rule. List all variants of one product with product_id; get takes <product id>/<variant id> and answers null rule fields when the variant has none.

  • Permission: products.read
  • Tools: variant_quantity_rule_list, variant_quantity_rule_get

Filters on the list:

FilterTypeRequiredDescription
product_idstringyesThe product whose variants to read

warranty_policy

A warranty a product can carry: activation, support and replacement windows in days. One policy is the store default for products without their own; product_warranty_set assigns one.

  • Permission: products.read
  • Tools: warranty_policy_list, warranty_policy_get

Actions

product_tier_visibility_set

Choose the wholesale tiers that see and the tiers that can buy a product.

Tiers are customer group ids of wholesale tiers. An empty list means everyone. Read the current setting with product_get include tier_visibility.

  • Action key: product_tier_visibility.set
  • Permission: products.write
  • Approval: Waits for approval when the store requires it for this action.
  • Effect: Changes the live store.
  • Retries: safe to repeat with the same input.
FieldTypeRequiredDescription
product_idstringyes
visible_to_tierslist of stringyesat most 50 items
purchasable_by_tierslist of stringyesat most 50 items

Example input:

{
  "product_id": "019bb58e-0ec1-79c1-9f40-d39d8d07674b",
  "visible_to_tiers": [
    "019bb264-41f3-7e69-8ba9-63ad646130e7"
  ],
  "purchasable_by_tiers": []
}

variant_quantity_rule_set

Set the least, most and step a shopper may buy of one variant.

null clears a limit. The step must fit the limits: with a maximum, the maximum has to be reachable in steps from the minimum.

  • Action key: variant_quantity_rule.set
  • Permission: products.write
  • Approval: Waits for approval when the store requires it for this action.
  • Effect: Changes the live store.
  • Retries: safe to repeat with the same input.
FieldTypeRequiredDescription
product_idstringyes
variant_idstringyes
min_quantityinteger or nullyesat least 1
max_quantityinteger or nullyesat least 1
quantity_stepinteger or nullyesat least 1

Example input:

{
  "product_id": "019bb58e-0ec1-79c1-9f40-d39d8d07674b",
  "variant_id": "019bb7f3-10ac-7f8b-b47e-f5cd71dff2e1",
  "min_quantity": 6,
  "max_quantity": 60,
  "quantity_step": 6
}

warranty_policy_create

Add a warranty policy products can be given.

  • Action key: warranty_policy.create
  • Permission: products.write
  • Approval: Waits for approval when the store requires it for this action.
  • Effect: Changes the live store.
  • Retries: runs at most once; a repeat with the same idempotency key returns the first result.
FieldTypeRequiredDescription
codestringyesat least 1 characters
namestringyesat least 1 characters
template_keystringone of "digital_license_standard", "standard_warranty"
activation_window_daysintegeryesDays after delivery to activate. above 0
support_window_daysinteger or nullyesNull for no support window. above 0
replacement_window_daysintegeryesabove 0
replacement_after_window_guaranteedboolean
is_activeboolean
is_defaultboolean

Example input:

{
  "code": "std-12",
  "name": "Standard 12 months",
  "activation_window_days": 30,
  "support_window_days": null,
  "replacement_window_days": 365
}

warranty_policy_delete

Delete a warranty policy; products that carried it fall back to the store default.

  • Action key: warranty_policy.delete
  • Permission: products.write
  • Approval: Always waits for a person to approve it.
  • Effect: Changes the live store.
  • Destructive: in compact mode it runs with run_destructive_action.
  • Retries: safe to repeat with the same input.
FieldTypeRequiredDescription
policy_idstringyesWarranty policy ID from warranty_policy_list

Example input:

{
  "policy_id": "019bb819-4494-70f4-a487-4e536b0d042e"
}

warranty_policy_set_default

Choose the warranty policy products without their own use.

Pass null for no default.

  • Action key: warranty_policy.set_default
  • Permission: products.write
  • Approval: Waits for approval when the store requires it for this action.
  • Effect: Changes the live store.
  • Retries: safe to repeat with the same input.
FieldTypeRequiredDescription
policy_idstring or nullyes

Example input:

{
  "policy_id": "019bb819-4494-70f4-a487-4e536b0d042e"
}

warranty_policy_update

Change the windows, name or state of a warranty policy.

Only the fields passed change; at least one is needed.

  • Action key: warranty_policy.update
  • Permission: products.write
  • Approval: Waits for approval when the store requires it for this action.
  • Effect: Changes the live store.
  • Retries: safe to repeat with the same input.
FieldTypeRequiredDescription
policy_idstringyesWarranty policy ID from warranty_policy_list
codestringat least 1 characters
namestringat least 1 characters
template_keystringone of "digital_license_standard", "standard_warranty"
activation_window_daysintegerDays after delivery to activate. above 0
support_window_daysinteger or nullNull for no support window. above 0
replacement_window_daysintegerabove 0
replacement_after_window_guaranteedboolean
is_activeboolean

Example input:

{
  "policy_id": "019bb819-4494-70f4-a487-4e536b0d042e",
  "replacement_window_days": 730
}
Utoljára frissítve