Reputation: 322
I want to add products in our Bigcommerce Store through Bigcommerce API.
I have used following API to add a product in our store :-
URL : https://store-f8tya.mybigcommerce.com/api/v2/products
type : POST
data : row - json
{
"name": "Plain T-Shirt",
"type": "physical",
"description": "This timeless fashion staple will never go out of style!",
"price": "29.99",
"categories": [21],
"availability": "available",
"weight": "0.5"
}
I am Receiving following Error :
415 - The specified input content type is not valid.
Note : I was asked to enter username and password. I have entered correct Username and token from Legacy API Settings.
Can someone help to solve this issue?
Upvotes: 1
Views: 197
Reputation: 1866
This error is due to not specifying a content-type header. BigCommerce accepts XML or JSON as a type.
Upvotes: 1