Link Search Menu Expand Document

Eliminar opción

Eliminar una opción del producto.


DELETE /api/rest_admin/produtoptions/:id

Parámetros

get

id integerId de la opción.

Cabeceras HTTP

X-Sushi-Token-IdToken de autorización.

Respuesta

{
    "success": 1,
    "error": [],
    "data": ""
}
success integer0 si hay error, 1 si no hay error.
error stringDescripción del error.
data json objectDatos de respuesta.

Ejemplos

cURL
curl --location --request DELETE 'http://sushi.loc/api/rest_admin/productoptions/15' \
--header 'X-Sushi-Token-Id: 43cu4ma6gdfqfeprav8bf3rpt7'
PHP - cURL
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://sushi.loc/api/rest_admin/productoptions/15",
  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(
    "X-Sushi-Token-Id: 43cu4ma6gdfqfeprav8bf3rpt7"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;