Issue using POST to batch update products
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
Research direction
Start with the WCAPI.post call shown in the issue and compare its request construction with WCAPI.get. Then check how the WooCommerce wc/v3 products/batch endpoint handles POST and PUT requests. Done means identifying whether the failure is in the wrapper or endpoint usage and documenting or correcting the supported request path.
Written by the indexing model from the issue text.
Description
I am attempting to batch update prices for products, this is just a small example to test updating using the batch method:
When I swap the POST for PUT I get a 200, but nothing gets updated
`wcapi = WCAPI(
url=site_url,
consumer_key=wc_ck,
consumer_secret=wc_sk,
wp_api=True,
version="wc/v3",
query_string_auth=True
)
test_json = {
"update": [
{
"id": 1675,
"price": "8042.0",
"regular_price": "8042.0"
}
]
}
print(wcapi.post("products/batch", test_json).json())`
This returns a 404:
{'code': 'rest_no_route', 'message': 'No route was found matching the URL and request method.', 'data': {'status': 404}}
However, when I use get in something like this it works just fine and returns products
wcapi.get("products").json()
My API key is read/write enabled.
Any help is appreciated. Thanks
- Dominant language
- Python
- Stars
- 216
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from woocommerce/wc-api-python
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
woocommerce/wc-api-python#108 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
woocommerce/wc-api-python#106 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
woocommerce/wc-api-python#105 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
woocommerce/wc-api-python#104 ·
-
Json FormattingOpen
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
woocommerce/wc-api-python#103 ·
All issues in woocommerce/wc-api-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug difficulty:2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MakazhanAlpamys/Soup#3167 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
snap-stanford/Biomni#380 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jsboige/CoursIA#27768 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100
rossant/awesome-math#206 ·