Hello,
I cannot create a first product using the admin API.
url = f"https://{SHOPIFY_STORE}/admin/api/2025-01/products.json"
headers = {
"X-Shopify-Access-Token": ADMIN_API_TOKEN,
"Content-Type": "application/json"
}
data = {
"product": {
"title": "Sadfgdfgct",
"body_html": "<strong>Adfggmazing product description</strong>",
"vendor": "YodfgurBrand",
"product_type": "T-Shirt",
}
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code, response.json()) # P
The response returns an existing product
200 {'products': [{'id': 10118779109710, 'title': 'sdfds', 'body_html': '<p>sdfdsf</p>', 'vendor': 'Edurika Shop', 'product_type': '', 'created_at': '2025-02-02T15:18:21+01:00', 'handle': 'sdfds', 'updated_at': '2025-02-02T15:18:39+01:00', 'published_at': '2025-02-02T15:18:21+01:00', 'template_suffix': '', 'published_scope': 'global', 'tags': '', 'status': 'active', 'admin_graphql_api_id': 'gid://shopify/Product/10118779109710', 'variants': [{'id': 51002501103950, 'product_id': 10118779109710, 'title': 'Default Title', 'price': '0.00', 'position': 1, 'inventory_policy': 'deny', 'compare_at_price': None, 'option1': 'Default Title', 'option2': None, 'option3': None, 'created_at': '2025-02-02T15:18:22+01:00', 'updated_at': '2025-02-02T15:18:22+01:00', 'taxable': False, 'barcode': '', 'fulfillment_service': 'manual', 'grams': 0, 'inventory_management': None, 'requires_shipping': False, 'sku': '', 'weight': 0.0, 'weight_unit': 'kg', 'inventory_item_id': 53059789455694, 'inventory_quantity': 0, 'old_inventory_quantity': 0, 'admin_graphql_api_id': 'gid://shopify/ProductVariant/51002501103950', 'image_id': None}], 'options': [{'id': 12825902612814, 'product_id': 10118779109710, 'name': 'Title', 'position': 1, 'values': ['Default Title']}], 'images': [], 'image': None}]}
I tried graphql, curl and different versions.