Restrict item sale by state or zip code

There is a new requirement for setting up items. You must indicate item Sale Restrictions by geographic location: state or zip Code (also known as State Restrictions). If there are no restrictions, you can set the Restriction Type to "None." The updated specs provide a StateRestrictions section to provide the state code or zip code for all geographic areas where an item cannot be sold.

Provide all states or zip codes where your product should not be sold for legal or commercial reasons. You should notify Walmart of states where laws, regulations, and ordinances prohibit or restrict your product from being sold. Specify items restricted for sale in a state or zip code due to laws preventing sale in that locality withStateRestrictionsText'Illegal for sale.'

You can also specify any states where you prefer not to have your product sold for commercial reasons. Specify StateRestrictionsText'Commercial.'

How state vs zip code restrictions are applied

A state restriction on a product will restrict that product from being sold anywhere within the specified state.

A Zip code restriction will only restrict that product from that Zip Code within a particular state.

IMPORTANT: If you are only limiting sales by zip codes, do not add the state code. Once state code is added to restrictions, all zip codes in that state are restricted for item sale.

Field Name**Acceptable Values**StateRestrictionsTextCommercial, Illegal for sale, NonestatesAll US state codes (such as AL, AK, or AZ)zipCodesAny 5-digit U.S. zip Code.

To set state restrictions for an item

You need to use the Bulk item setup (Multiple) API with the feedtype=MP_WFS_ITEM.

  1. Set states or zip codes that are restricted for item sales. Provide the state codes for the states where you want to prohibit the sale of that item.
    For example, to set state restrictions for California and Arkansas, provide states "CA and "AR" in your request payload.
  2. Provide the reason for the restriction. Set StateRestrictionsText to either 'Commercial,' 'Illegal for sale,' or 'None'

For example, to set commercial restrictions for California and Arkansas, and illegal for-sale restrictions in Texas and Pennsylvania:

“sku”: “JE-ICF1-TR6P”, “stateRestrictions”: [ {“stateRestrictionsText“: “Commercial“, “states“: “CA,AR“ }, {“stateRestrictionsText“: “Illegal for Sale“, “states“: “TX,PA“ } ],

To view all example payload requests, see Request Samples in: Bulk item setup (Multiple) API Reference.

To update state restrictions for an item

To update or delete sales restrictions that you already have set for items, you need to use the Bulk item setup (Multiple) API with the feedtype=MP_MAINTENANCE.

IMPORTANT: Any change to state restrictions overrides the entire list set with the initial Item setup API call. When updating or deleting an individual change in the request payload, provide the complete list of all state restrictions again.

To update a state restriction

If you want to change an item's state restrictions, you must override the entire list of state restrictions set during the initial item setup process.

  1. Send API call to Bulk item setup (Multiple) API with the feedtype=MP_MAINTENANCE.
  2. Specify StateRestrictionsText either 'Commercial,' 'Illegal for sale,' or 'None' for the new restriction, and provide the state code or zip code.
  3. Again, the request payload should include the complete list of state restrictions. Each Bulk item setup API call overrides the previous list of restrictions.

To delete a state restriction

  1. Send API call to Bulk item setup (Multiple) API with the feedtype=MP_MAINTENANCE.
  2. Set the state restrictions attribute to "None" in the payload request. You do not need to specify the State code or Zip code. For example: stateRestrictionsText": "None"
  3. In the request payload, provide a complete list of state restrictions for all the restrictions you want to keep. Each Bulk item setup API call overrides the previous list of restrictions.

List of state codes

This is a list of all U.S. state codes for the states field.

State NameState CodeState NameState Code
AlabamaALNew MexicoNM
AlaskaAKNew YorkNY
ArizonaAZNorth CarolinaNC
ArkansasARNorth DakotaND
CaliforniaCAOhioOH
ColoradoCOOklahomaOK
ConnecticutCTOregonOR
DelawareDEPennsylvaniaPA
FloridaFLRhode IslandRI
GeorgiaGASouth CarolinaSC
HawaiiHISouth DakotaSD
IdahoIDTennesseeTN
IllinoisILTexasTX
IndianaINUtahUT
IowaIAVermontVT
KansasKSVirginiaVA
KentuckyKYWashingtonWA
LouisianaLAWest VirginiaWV
MichiganMIWisconsinWI
MaineMNWyomingWY
MississippiMSDistrict of ColumbiaDC
MissouriMOAmerican SamoaAS
MontanaMTFederated States of MicronesiaFM
NebraskaNEGuamGU
NevadaNVMarshall IslandsMH
New HampshireNHNorthern Mariana IslandsMP
New JerseyNJPuerto RicoPR
PalauPWVirgin IslandsVI