Docs

Docs / Data Feed / Restrictions

For Data Feed stores
Endpoint · Change a restriction

PATCH/restrictions/{id}

Change some fields of a restriction and keep the rest. There is no PUT.

Needs Restrictions: Read and writeBase URL https://backend.fflmonkey.com/api/v1Counts 1 toward 120 a minute

Fields

The restriction's id in the address, and in the body only the fields to change, at least one. Needs Restrictions: Read and write.

FieldTypeRule
nameoptionalstringUp to 120 characters.
restriction_typeoptionalstringexclude hides what it matches; only_show hides what no switched-on only-show matches.
distributorsoptionallist of stringsDistributor slugs, as a product's sourced_from names them: it applies to those distributors' offers, never to your own stock. Empty: any. Sent, it replaces what the restriction holds; left out, it keeps it.
categoriesoptionallist of stringsCategory slugs from GET /categories; each takes in the categories below it. Empty: any. Sent, it replaces what the restriction holds; left out, it keeps it.
manufacturersoptionallist of stringsBrand slugs from GET /manufacturers. Empty: any. Sent, it replaces what the restriction holds; left out, it keeps it.
product_classesoptionallist of stringsProduct class slugs from GET /product-classes. Empty: any. Sent, it replaces what the restriction holds; left out, it keeps it.
upcsoptionallist of stringsUPCs, 6 to 14 digits each. A code that can never match (a spreadsheet's scientific notation, a leading apostrophe) is refused. Empty: any. Sent, it replaces what the restriction holds; left out, it keeps it.
skusoptionallist of stringsSKUs of up to 64 characters: a distributor's, matched against its offer, or your own in-house one. A code that can never match is refused. Empty: any. Sent, it replaces what the restriction holds; left out, it keeps it.
min_stockoptionalinteger or null0 to 1000000. On an exclude, it matches an offer with fewer than this in stock; on an only-show, one with at least this many. Null: any.
from_priceoptionalstring, number or nullThe lowest distributor cost it matches, 0 to 9999999.99, at most two decimals, or null for no lower bound.
to_priceoptionalstring, number or nullThe highest distributor cost it matches, on the same terms, and never below from_price, or null for no upper bound.
disabledoptionalbooleantrue keeps the restriction and hides nothing.
confirm_tokenoptionalstring After a 422 catalogue_wipe_confirmation_required: the confirm_token from that answer, to save a restriction that empties your store anyway.
acknowledge_zero_matchoptionalboolean Send true to save a restriction that matches no product in the catalog, after a 422 zero_match_confirmation_required.

Each list takes at most 1,000 entries. Money with a third decimal is refused, never rounded. Name distributors in distributors: distributor_slug and distributor_slugs are refused.

  • Everything you do not send is kept: its switch, its distributors and every condition you leave out. A condition you send replaces the old one, and [] means any. There is no PUT, for the reason a pricing rule has none.
  • A condition that reads "(deleted)" cannot be sent back. Leave it out to keep what the restriction holds, or send the slugs you mean.
  • The checks a create meets are made on the restriction as it would be saved. Emptying the one condition of an only-show is refused, and switching on an exclude with no condition asks for its confirm_token. A change to a restriction that already matches nothing is asked about again.
  • What follows: your store is worked out again, and the restriction is announced as restriction.updated.

Returns

This endpoint can also answer 401 invalid_api_key, 403 license_not_active, 403 product_not_included, 403 insufficient_scope and 429 rate_limited.

Example

FFL Monkey Data Feed API, version 1. Questions: Support in your FFL Monkey account, or [email protected].