Skip to main content

Update Customer Case Pack Rule

PUT 

/api/customers/:customer/case-pack-rules/:rule

Change a product rule's unit or pack size. A rule's product cannot change: delete the rule and create one for the other product. Returns 404 when the rule does not belong to the customer.

Required scope: customers:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: a Personal Access Token with the customers:write scope. Requires permission to edit customers.

Body fields:

  • ship_unit (required): case | case_then_inner | inner | each | custom.
  • ship_pack_quantity (number, >0, max 100000, nullable): the pack size; required when ship_unit is custom and ignored otherwise.
  • product_id: not allowed (422).

Rule fields:

  • ship_unit: case | case_then_inner | inner | each | custom, with ship_unit_label and ship_unit_description saying what packing does with it.
  • ship_pack_quantity: the pack size of a custom rule; null for every other unit.
  • product: id, sku, name, case_quantity and inner_pack_quantity of the product the rule is for; null on the default rule.
  • carton_quantity: units in one full carton under the rule (product rules only; null for eaches, the default rule, or when the product lacks the case or inner pack the unit needs).
  • order_multiple: order quantities should be multiples of this; quantities that are not are flagged on the customer's orders and shipments.
  • reason: plain-English explanation of how the product ships under the rule.
  • inner_missing_reason: set when the rule uses inner packs but the product has none (or its inner pack no longer divides the case), so packing falls back to full cases.

Request​

Responses​

OK

Response Headers
    Content-Type