#Delete Product API.

The following endpoint allows merchant to delete product from their Fatora Platform account.

https://api.fatora.io/v1/products/{product_id}
curl --location --request DELETE 'https://api.fatora.io/v1/products/{product_id}' \
--header 'api_key: E4B73FEE-F492-4607-A38D-852B0EBC91C9' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.fatora.io/v1/products/{product_id}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'api_key: E4B73FEE-F492-4607-A38D-852B0EBC91C9',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
// Define the API endpoint URL.
        string apiUrl = "https://api.fatora.io/v1/products/{product_id}";

        // Create a WebRequest object.
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(apiUrl);
        request.Method = "DELETE";

        // Set the request headers.
        request.Headers.Add("api_key", "E4B73FEE-F492-4607-A38D-852B0EBC91C9");
        request.Accept = "application/json";

        try
        {
            // Send the DELETE request and get the response.
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();

            // Check the response status code.
            if (response.StatusCode == HttpStatusCode.OK)
            {
                using (Stream responseStream = response.GetResponseStream())
                using (StreamReader reader = new StreamReader(responseStream))
                {
                    string responseContent = reader.ReadToEnd();
                    Console.WriteLine("API Response: " + responseContent);
                }
            }
            else
            {
                Console.WriteLine("API Request failed with status code: " + response.StatusCode);
            }
        }
        catch (WebException ex)
        {
            Console.WriteLine("API Request failed with exception: " + ex.Message);
        }
HTTP Status Code: 204 No Content - The product has been successfully deleted.

Try it now: Delete Product API

Header Parameters

Header Value
api_key REQUIRED Use the valid API key of your Fatora account. Read more information about Authentication.
Content-Type REQUIRED application/json

Query Parameters

Parameter Description
product_id REQUIRED intUnique identifier of the product to delete.

Response

HTTP Status Code: 204 No Content - The product has been successfully deleted.


Otherwise if there was a problem with your request, you'll receive an error response such as 400 status code, and the response will include an error object describing why this request failed.

Response Schema: application/json
status string The status of response.
error object:
  • error_code string, the naumber of error: e.g: 400, For more information
    see Response Code
  • description string, the description of error: e.g: bad request
technical-support

🛠️ Technical Support