# Walmart CA Precarting

Pre-carting allows you to add any products to cart even if its out of stock. You can then wait on the page and complete checkout once the monitor pings instock!

```
fetch("https://www.walmart.ca/api/product-page/v2/cart?responseGroup=essential&storeId=1061&lang=en", {
  "headers": {
    "accept": "application/json",
    "accept-language": "en-US,en;q=0.9",
    "content-type": "application/json",
    "sec-ch-ua": "\"Google Chrome\";v=\"89\", \"Chromium\";v=\"89\", \";Not A Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "wm_qos.correlation_id": "33d099ba-025-178cddd5967322,33d099ba-025-178cddd59674b6,33d099ba-025-178cddd59674b6"
  },
  "referrer": "https://www.walmart.ca/en/ip/jurassic-world-camp-cretaceous-epic-roarin-tyrannosaurus-rex-dinosaur-figure-multi/6000201578484",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"postalCode\":\"A1B2C3\",\"items\":[{\"offerId\":\"SKU HERE\",\"skuId\":\"SKU HERE\",\"quantity\":1,\"allowSubstitutions\":false,\"subscription\":false,\"action\":\"ADD\"}],\"pricingStoreId\":\"1061\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});
```

From the code above you will want to edit the `"body"` section where it says `SKU HERE`  You can find the sku to any product by scrolling down on the product page and copying the SKU value.

![](https://1737036544-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJU7HSTnDW7uDOm1KmZ%2F-MYCqwhggs0BtGKcPJ_r%2F-MYCrwrM5WQShnxttdeb%2Fimage.png?alt=media\&token=0d5270e2-8623-43ae-8a2c-e61a0b079a4f)

Now using the SKU `6000201578485` and replacing it in the two `SKU HERE` sections the code below will add that product to cart. Make sure you keep the `\` next to the `SKU HERE`

```
fetch("https://www.walmart.ca/api/product-page/v2/cart?responseGroup=essential&storeId=1061&lang=en", {
  "headers": {
    "accept": "application/json",
    "accept-language": "en-US,en;q=0.9",
    "content-type": "application/json",
    "sec-ch-ua": "\"Google Chrome\";v=\"89\", \"Chromium\";v=\"89\", \";Not A Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "wm_qos.correlation_id": "33d099ba-025-178cddd5967322,33d099ba-025-178cddd59674b6,33d099ba-025-178cddd59674b6"
  },
  "referrer": "https://www.walmart.ca/en/ip/jurassic-world-camp-cretaceous-epic-roarin-tyrannosaurus-rex-dinosaur-figure-multi/6000201578484",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"postalCode\":\"A1B2C3\",\"items\":[{\"offerId\":\"6000201578485\",\"skuId\":\"6000201578485\",\"quantity\":1,\"allowSubstitutions\":false,\"subscription\":false,\"action\":\"ADD\"}],\"pricingStoreId\":\"1061\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});
```

## Adding To Cart

1\) using chrome press the command `CTRL + Shift + i` to open up the inspect console.&#x20;

2\) From the top of the bar select "CONSOLE" to open up the command console.&#x20;

3\) Paste in the code with the edited SKU HERE values

4\) Press enter to execute the command

![](https://1737036544-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJU7HSTnDW7uDOm1KmZ%2F-MYCqwhggs0BtGKcPJ_r%2F-MYCsvXRE4-n3fzG1baw%2Fimage.png?alt=media\&token=7ddbed03-6384-4466-9a7d-f26697d3d6b0)

## Is it in my cart?

Head over to your cart and you should see it in there! If you don't see it in your cart, repeat the process or open a ticket for support.
