Update Account Price

Beta
PATCH/v1/sales/account-prices/{id}

Idempotent with Idempotency-Key header. Learn more

Partially updates an account price.

Only the provided fields are changed. If category_ids or attribute_ids are provided, they replace the existing set entirely.

Order lines that have already been priced keep the unit price they were given; the new price applies to lines priced after the change.

Permissions requiredValues:discounts:update
The role behind your API key or agent must grant every one of these permissions.
idstring

Account price ID.

include[]optional arrayenumValues:recipient_accountproduct_linecategories

Sub-objects to expand in the response. When omitted, sub-objects are returned as null.

recipient_account_idoptional string

ID of the customer this price is offered to.

product_line_idoptional string

ID of the product line whose products this price applies to.

rateoptional object

The price the recipient pays.

Supplied whole: send the value together with both units, since the rate is replaced rather than merged field by field.

valuestring (decimal)

Decimal value of the rate, expressed as the amount of the numerator unit per one denominator unit.

numerator_unit_idstring

ID of the unit for the rate's numerator (e.g. the currency of a price).

denominator_unit_idstring

ID of the unit for the rate's denominator (the per-unit basis).

category_idsoptional array of string

Item category IDs to record on this price.

When provided, replaces the existing set of categories entirely; an empty list removes them all. Categories are recorded only — they do not narrow which products the price applies to.

attribute_idsoptional array of string

Attribute IDs to constrain this price to.

When provided, replaces the existing set of attributes entirely; an empty list removes all attribute constraints.

idstring

Account price ID.

objectstringenumValues:account_price

Resource type identifier.

recipient_accountcustomerExpandablenullable

The customer this price is offered to.

A price recorded against a parent customer account also applies to orders placed by its child accounts.

idstring

Customer ID.

objectstringenumValues:customer

Resource type identifier.

namestring

The customer's business name, as shown throughout the app and on documents.

numberstring

Human-readable customer number used to identify the account, distinct from the id.

Unique within your account.

statusstringenumValues:normalpreferredhold_shipment

The customer's account standing.

  • normal: standard account with no restrictions.
  • preferred: account flagged for prioritized handling.
  • hold_shipment: the customer's shipments should be held, typically over a credit problem, while orders can still be placed.
  • hold_all: all activity for the customer should be held.

The hold statuses are advisory: OpenMRP flags the customer's orders as being on credit hold, but requests to create orders or shipments for the customer are not rejected.

edi_statusstringenumValues:enableddisabled

Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.

relationship_typestringenumValues:standaloneparentchild

The customer's position in the account hierarchy.

  • standalone: no parent or child accounts.
  • parent: has one or more child accounts (see child_accounts).
  • child: belongs to a parent account (see parent_account).
commission_policystringenumValues:commission_appliedcommission_exempt

How sales commission applies to this customer's orders.

  • commission_exempt: this customer's orders are exempt from sales commission.
  • commission_applied: sales commission is calculated on this customer's orders.

The customer counts as exempt if this field, its type group, or any of its price_groups is commission_exempt. Exempt customers never have a sales rep assigned automatically when an order is created without one.

notestringnullable

Free-form note about the customer.

credit_limitquantitynullable

Maximum credit extended to this customer.

Used to flag orders once the customer's outstanding balance approaches or passes the limit; orders that exceed it are not rejected.

Always returned as null in this endpoint.
contact_infocustomer_contact_infonullable

General contact details for the customer's business.

Always returned as null in this endpoint.
freight_preferencescustomer_freight_preferencesnullable

Freight and carrier preferences applied to this customer's shipments.

Always returned as null in this endpoint.
defaultscustomer_defaultsnullable

Default settings applied to new orders for this customer.

Always returned as null in this endpoint.
notification_preferencescustomer_notification_preferencesnullable

Which document emails this customer is set up to receive.

Always returned as null in this endpoint.
bill_to_addressaddressnullable

Default billing address.

Always returned as null in this endpoint.
ship_to_addressaddressnullable

Default shipping address.

Always returned as null in this endpoint.
typeaccount_groupnullable

The account group of type type_group that categorizes this customer (for example "Distributors").

Always returned as null in this endpoint.
price_groupslistnullable

Account groups of type pricing_group that this customer belongs to, used to apply pricing rules.

Always returned as null in this endpoint.
parent_accountcustomernullable

The customer this account belongs to, when it is a child account.

Always returned as null in this endpoint.
child_accountslistnullable

The customers belonging to this account, when it is a parent account.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

product_lineproduct_lineExpandablenullable

The product line whose products this price applies to.

A product that is not assigned to a product line never matches an account price.

idstring

Product line ID.

objectstringenumValues:product_line

Resource type identifier.

namestring

Display name of the product line.

Unique among the product lines visible to your account, which includes the shared system lines.

descriptionstringnullable

Free-form description of the product line.

notesstringnullable

Free-form notes about the product line.

commission_policystringenumValues:commission_appliedcommission_exempt

Default commission policy for products in this product line.

  • commission_exempt: no commission applies to these products.
  • commission_applied: commission applies to these products, unless overridden elsewhere.
freight_policystringenumValues:free_freightbilled_freight

Default freight policy for products in this product line.

  • free_freight: these products do not incur a freight charge.
  • billed_freight: freight is billed for these products, unless overridden elsewhere.
ownerownernullable

Owner of the product line.

System-owned product lines are platform-provided and shared across all accounts; account-owned product lines are custom to your account. Only account-owned product lines can be updated, deleted, or granted to customers and account groups.

Always returned as null in this endpoint.
unit_groupunit_groupnullable

Unit group associated with this product line.

The unit group determines the set of units available to products in this product line.

Always returned as null in this endpoint.
default_lotquantitynullable

The lot products in this line are made in — a doff, a pallet.

Sizes the campaigns a production schedule plans, and defaults the quantity when a batch is added to a production run. The unit is part of the value — 60 counted in pairs and 60 counted in eaches are different lots — and is drawn from this product line's unit group.

An item's own lot override still takes precedence over the line's. When the line has no lot convention, planning falls back to the lot of the line the item feeds into, and then to the account-wide default lot size.

Always returned as null in this endpoint.
fulfillment_policystringnullableenumValues:make_to_stockmake_to_order

How products in this line are produced when they do not say for themselves.

  • make_to_stock: built to the forecast, holding a safety stock against its variability.
  • make_to_order: built only against orders already on the book, holding no buffer.

Null falls through to the account default.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last-updated timestamp.

rateratenullable

The price, expressed as a rate.

The rate's numerator unit is typically a currency and its denominator unit is the quantity unit being priced (e.g. $25.50 / kg). A matching order line takes both its unit price and its price units from this rate, exactly as entered.

idstring

Rate ID.

objectstringenumValues:rate

Resource type identifier.

valuestring (decimal)

Decimal value of the rate, as a string to preserve precision.

Expressed as the amount of the numerator unit per one denominator unit.

numerator_unitunitnullable

Unit of the rate's numerator (e.g. the currency of a price).

denominator_unitunitnullable

Unit of the rate's denominator (the per-unit basis, e.g. kilograms for a price per kilogram).

display_valuestring

Human-readable formatted value (e.g. "$25.50 / kg" or "100 kg / hr").

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

categorieslistExpandablenullable

Item categories recorded on this price.

Order pricing matches an account price on its product line and attributes only, so categories recorded here do not narrow which products the price applies to.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of item_category

Resources in this page.

idstring

Item category ID.

objectstringenumValues:item_category

Resource type identifier.

namestring

Display name of the item category.

notesstringnullable

Free-form notes about the item category.

typestringenumValues:material_categoryproduct_category

What kind of items this category groups.

  • material_category: groups raw materials and components (items of type material).
  • product_category: groups finished products and parts (items of type product or part).

An item can only be assigned to a category whose type matches the item's type, and the category's type is fixed at creation.

ownerownernullable

Provenance of the item category.

System-owned categories are platform-provided defaults shared across all accounts and cannot be updated or deleted; account-owned categories are custom to your account.

Always returned as null in this endpoint.
propertieslistnullable

Properties associated with this item category, such as Color or Size.

These describe the dimensions along which items in the category vary, and are also what the customer-facing catalog shows for the category. Attach and detach them with the Add Item Category Property and Remove Item Category Property endpoints.

Always returned as null in this endpoint.
unit_groupunit_groupnullable

Unit group associated with this item category.

Items in this category are measured in units belonging to this group, and can only be ordered in those units unless the item's product line defines its own unit group, which takes precedence.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

attributeslistExpandablenullable

Attributes this price is constrained to.

When set, the price applies only to items that have every listed attribute; when empty, attributes are not considered.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of attribute

Resources in this page.

idstring

Attribute ID.

objectstringenumValues:attribute

Resource type identifier.

valuestring

The selectable value this attribute represents, such as Red for a Color property or Large for a Size property.

colorstringenumValues:bluebrowndefault

Swatch color used to display this attribute in the UI.

The named colors are arbitrary display choices; default is a neutral fallback used when no specific swatch applies.

sort_orderinteger

Position of this attribute relative to its siblings within the property, starting at 1.

Positions are kept contiguous: creating, reordering, or deleting an attribute automatically shifts its siblings.

propertypropertynullable

The property this attribute belongs to.

Populated only when the attribute is returned under an item's or a volume discount's attributes list.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last update timestamp.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

Responses

200

Successful response for Update Account Price