Edit Product

This endpoint enables you to edit details of an existing product.

Endpoint

PUT https://api.keepup.store/v2.0/products/edit/{product_id}

Headers

Authorization: Bearer API_KEY

Body Parameters

Sample Requests

const axios = require('axios');

const productData = {
  product_name: 'Product A',
  description: 'High-quality gadget',
  cost_price: 15.75,
  selling_price: 20.00,
  quantity: 50,
  restock_level: 10,
  show_on_storefront: 'yes',
  featured_product: 'no',
  category: 'Electronics',
  tags: ["Electronics", "Gadget"],
  variants: [{ color: "red", size: "M" }],
  SKU: 'SKU12345',
  barcode: '0123456789012',
  product_location: 'Aisle 3, Shelf 5',
  expirations: [{
    batch_number: "batch123",
    expiration_date: "2024-12-31",
    alert_date: "2024-12-01"
  }],
  removed_images: [],
  primary_product_image_index: 0
};

const config = {
  method: 'post',
  url: 'https://api.keepup.store/v2.0/products/edit/{product_id}',
  headers: {
    'Authorization': 'Bearer API_KEY',  // Replace YOUR_ACCESS_TOKEN with your actual access token
    'Content-Type': 'application/json'
  },
  data: JSON.stringify(productData)
};

axios(config)
.then(function (response) {
  console.log('Product updated successfully:', response.data);
})
.catch(function (error) {
  console.error('Failed to updated product:', error);
});

Sample Response

{
    "status": 200,
    "message": "product updated",
    "data": {
        "product_id": 19845
    }
}

Last updated