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
- Avg merge
- 6h 34m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
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 Formatting Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
woocommerce/wc-api-python#103 ·
All issues in woocommerce/wc-api-python
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100