Update a product
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Patch, RequestUri = new Uri("https://api.koibox.cloud/api/productos/1"), Headers = { { "X-Koibox-Key", "<X-Koibox-Key>" }, }, Content = new StringContent("{ \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"proveedor\": {}, \"servicios_escandallo\": [ { \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": \"example\", \"is_tarifas\": true, \"precio_tarifa1\": \"example\", \"precio_tarifa2\": \"example\", \"precio_tarifa3\": \"example\", \"precio_tarifa4\": \"example\", \"duracion\": \"example\", \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"is_active\": true, \"users\": [ { \"value\": 1, \"text\": \"example\", \"color\": \"example\", \"username\": \"hello@example.com\", \"foto_url_absolute_path\": \"https://example.com\" } ], \"is_disponible_online\": true, \"descuento_online\": 1, \"secure_payment_amount\": \"example\", \"productos_escandallo\": [ { \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"proveedor\": {}, \"servicios_escandallo\": [], \"stock\": { \"existencias\": 1, \"stock_minimo\": 1 }, \"barcode\": \"example\", \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": 1, \"precio_online\": 1, \"precio_coste\": 1, \"pedido_minimo\": 1, \"is_active\": true, \"is_uso_interno\": false, \"is_disponible_ecommerce\": true, \"imagenes\": [ { \"name\": \"example\", \"size\": 1, \"type\": \"example\", \"opts\": { \"principal\": true } } ], \"impuesto\": 1 } ], \"impuesto\": 1, \"orden\": 1, \"tbai_vat_exemption_cause\": 1 } ], \"stock\": { \"existencias\": 1, \"stock_minimo\": 1 }, \"barcode\": \"example\", \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": 1, \"precio_online\": 1, \"precio_coste\": 1, \"pedido_minimo\": 1, \"is_active\": true, \"is_uso_interno\": false, \"is_disponible_ecommerce\": true, \"imagenes\": [ { \"name\": \"example\", \"size\": 1, \"type\": \"example\", \"opts\": { \"principal\": true } } ], \"impuesto\": 1 }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.koibox.cloud/api/productos/1")) .header("X-Koibox-Key", "<X-Koibox-Key>") .header("Content-Type", "application/json") .method("PATCH", HttpRequest.BodyPublishers.ofString("{ \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"proveedor\": {}, \"servicios_escandallo\": [ { \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": \"example\", \"is_tarifas\": true, \"precio_tarifa1\": \"example\", \"precio_tarifa2\": \"example\", \"precio_tarifa3\": \"example\", \"precio_tarifa4\": \"example\", \"duracion\": \"example\", \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"is_active\": true, \"users\": [ { \"value\": 1, \"text\": \"example\", \"color\": \"example\", \"username\": \"hello@example.com\", \"foto_url_absolute_path\": \"https://example.com\" } ], \"is_disponible_online\": true, \"descuento_online\": 1, \"secure_payment_amount\": \"example\", \"productos_escandallo\": [ { \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"proveedor\": {}, \"servicios_escandallo\": [], \"stock\": { \"existencias\": 1, \"stock_minimo\": 1 }, \"barcode\": \"example\", \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": 1, \"precio_online\": 1, \"precio_coste\": 1, \"pedido_minimo\": 1, \"is_active\": true, \"is_uso_interno\": false, \"is_disponible_ecommerce\": true, \"imagenes\": [ { \"name\": \"example\", \"size\": 1, \"type\": \"example\", \"opts\": { \"principal\": true } } ], \"impuesto\": 1 } ], \"impuesto\": 1, \"orden\": 1, \"tbai_vat_exemption_cause\": 1 } ], \"stock\": { \"existencias\": 1, \"stock_minimo\": 1 }, \"barcode\": \"example\", \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": 1, \"precio_online\": 1, \"precio_coste\": 1, \"pedido_minimo\": 1, \"is_active\": true, \"is_uso_interno\": false, \"is_disponible_ecommerce\": true, \"imagenes\": [ { \"name\": \"example\", \"size\": 1, \"type\": \"example\", \"opts\": { \"principal\": true } } ], \"impuesto\": 1 }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"proveedor\": {}, \"servicios_escandallo\": [ { \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": \"example\", \"is_tarifas\": true, \"precio_tarifa1\": \"example\", \"precio_tarifa2\": \"example\", \"precio_tarifa3\": \"example\", \"precio_tarifa4\": \"example\", \"duracion\": \"example\", \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"is_active\": true, \"users\": [ { \"value\": 1, \"text\": \"example\", \"color\": \"example\", \"username\": \"hello@example.com\", \"foto_url_absolute_path\": \"https://example.com\" } ], \"is_disponible_online\": true, \"descuento_online\": 1, \"secure_payment_amount\": \"example\", \"productos_escandallo\": [ { \"categoria\": { \"value\": 1, \"text\": \"example\", \"nombre\": \"example\", \"id\": 1, \"orden\": 1, \"is_active\": true }, \"proveedor\": {}, \"servicios_escandallo\": [], \"stock\": { \"existencias\": 1, \"stock_minimo\": 1 }, \"barcode\": \"example\", \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": 1, \"precio_online\": 1, \"precio_coste\": 1, \"pedido_minimo\": 1, \"is_active\": true, \"is_uso_interno\": false, \"is_disponible_ecommerce\": true, \"imagenes\": [ { \"name\": \"example\", \"size\": 1, \"type\": \"example\", \"opts\": { \"principal\": true } } ], \"impuesto\": 1 } ], \"impuesto\": 1, \"orden\": 1, \"tbai_vat_exemption_cause\": 1 } ], \"stock\": { \"existencias\": 1, \"stock_minimo\": 1 }, \"barcode\": \"example\", \"referencia\": \"example\", \"nombre\": \"example\", \"detalle\": \"example\", \"precio\": 1, \"precio_online\": 1, \"precio_coste\": 1, \"pedido_minimo\": 1, \"is_active\": true, \"is_uso_interno\": false, \"is_disponible_ecommerce\": true, \"imagenes\": [ { \"name\": \"example\", \"size\": 1, \"type\": \"example\", \"opts\": { \"principal\": true } } ], \"impuesto\": 1 }");Request request = new Request.Builder() .url("https://api.koibox.cloud/api/productos/1") .patch(body) .addHeader("X-Koibox-Key", "<X-Koibox-Key>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'PATCH', url: 'https://api.koibox.cloud/api/productos/1', headers: {'X-Koibox-Key': '<X-Koibox-Key>', 'Content-Type': 'application/json'}, data: { categoria: {value: 1, text: 'example', nombre: 'example', id: 1, orden: 1, is_active: true}, proveedor: {}, servicios_escandallo: [ { referencia: 'example', nombre: 'example', detalle: 'example', precio: 'example', is_tarifas: true, precio_tarifa1: 'example', precio_tarifa2: 'example', precio_tarifa3: 'example', precio_tarifa4: 'example', duracion: 'example', categoria: {value: 1, text: 'example', nombre: 'example', id: 1, orden: 1, is_active: true}, is_active: true, users: [ { value: 1, text: 'example', color: 'example', username: 'hello@example.com', foto_url_absolute_path: 'https://example.com' } ], is_disponible_online: true, descuento_online: 1, secure_payment_amount: 'example', productos_escandallo: [ { categoria: {value: 1, text: 'example', nombre: 'example', id: 1, orden: 1, is_active: true}, proveedor: {}, servicios_escandallo: [], stock: {existencias: 1, stock_minimo: 1}, barcode: 'example', referencia: 'example', nombre: 'example', detalle: 'example', precio: 1, precio_online: 1, precio_coste: 1, pedido_minimo: 1, is_active: true, is_uso_interno: false, is_disponible_ecommerce: true, imagenes: [{name: 'example', size: 1, type: 'example', opts: {principal: true}}], impuesto: 1 } ], impuesto: 1, orden: 1, tbai_vat_exemption_cause: 1 } ], stock: {existencias: 1, stock_minimo: 1}, barcode: 'example', referencia: 'example', nombre: 'example', detalle: 'example', precio: 1, precio_online: 1, precio_coste: 1, pedido_minimo: 1, is_active: true, is_uso_interno: false, is_disponible_ecommerce: true, imagenes: [{name: 'example', size: 1, type: 'example', opts: {principal: true}}], impuesto: 1 }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.koibox.cloud/api/productos/1';const options = { method: 'PATCH', headers: {'X-Koibox-Key': '<X-Koibox-Key>', 'Content-Type': 'application/json'}, body: '{"categoria":{"value":1,"text":"example","nombre":"example","id":1,"orden":1,"is_active":true},"proveedor":{},"servicios_escandallo":[{"referencia":"example","nombre":"example","detalle":"example","precio":"example","is_tarifas":true,"precio_tarifa1":"example","precio_tarifa2":"example","precio_tarifa3":"example","precio_tarifa4":"example","duracion":"example","categoria":{"value":1,"text":"example","nombre":"example","id":1,"orden":1,"is_active":true},"is_active":true,"users":[{"value":1,"text":"example","color":"example","username":"hello@example.com","foto_url_absolute_path":"https://example.com"}],"is_disponible_online":true,"descuento_online":1,"secure_payment_amount":"example","productos_escandallo":[{"categoria":{"value":1,"text":"example","nombre":"example","id":1,"orden":1,"is_active":true},"proveedor":{},"servicios_escandallo":[],"stock":{"existencias":1,"stock_minimo":1},"barcode":"example","referencia":"example","nombre":"example","detalle":"example","precio":1,"precio_online":1,"precio_coste":1,"pedido_minimo":1,"is_active":true,"is_uso_interno":false,"is_disponible_ecommerce":true,"imagenes":[{"name":"example","size":1,"type":"example","opts":{"principal":true}}],"impuesto":1}],"impuesto":1,"orden":1,"tbai_vat_exemption_cause":1}],"stock":{"existencias":1,"stock_minimo":1},"barcode":"example","referencia":"example","nombre":"example","detalle":"example","precio":1,"precio_online":1,"precio_coste":1,"pedido_minimo":1,"is_active":true,"is_uso_interno":false,"is_disponible_ecommerce":true,"imagenes":[{"name":"example","size":1,"type":"example","opts":{"principal":true}}],"impuesto":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.koibox.cloud/api/productos/1 \ --header 'Content-Type: application/json' \ --header 'X-Koibox-Key: <X-Koibox-Key>' \ --data '{ "categoria": { "value": 1, "text": "example", "nombre": "example", "id": 1, "orden": 1, "is_active": true }, "proveedor": {}, "servicios_escandallo": [ { "referencia": "example", "nombre": "example", "detalle": "example", "precio": "example", "is_tarifas": true, "precio_tarifa1": "example", "precio_tarifa2": "example", "precio_tarifa3": "example", "precio_tarifa4": "example", "duracion": "example", "categoria": { "value": 1, "text": "example", "nombre": "example", "id": 1, "orden": 1, "is_active": true }, "is_active": true, "users": [ { "value": 1, "text": "example", "color": "example", "username": "hello@example.com", "foto_url_absolute_path": "https://example.com" } ], "is_disponible_online": true, "descuento_online": 1, "secure_payment_amount": "example", "productos_escandallo": [ { "categoria": { "value": 1, "text": "example", "nombre": "example", "id": 1, "orden": 1, "is_active": true }, "proveedor": {}, "servicios_escandallo": [], "stock": { "existencias": 1, "stock_minimo": 1 }, "barcode": "example", "referencia": "example", "nombre": "example", "detalle": "example", "precio": 1, "precio_online": 1, "precio_coste": 1, "pedido_minimo": 1, "is_active": true, "is_uso_interno": false, "is_disponible_ecommerce": true, "imagenes": [ { "name": "example", "size": 1, "type": "example", "opts": { "principal": true } } ], "impuesto": 1 } ], "impuesto": 1, "orden": 1, "tbai_vat_exemption_cause": 1 } ], "stock": { "existencias": 1, "stock_minimo": 1 }, "barcode": "example", "referencia": "example", "nombre": "example", "detalle": "example", "precio": 1, "precio_online": 1, "precio_coste": 1, "pedido_minimo": 1, "is_active": true, "is_uso_interno": false, "is_disponible_ecommerce": true, "imagenes": [ { "name": "example", "size": 1, "type": "example", "opts": { "principal": true } } ], "impuesto": 1 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
Read-only
Read-only
object
Read-only
Read-only
Read-only
Read-only
object
Identifier of the user
Name of the user
Write-only
Read-only
object
Read-only
object
object
Name of the file
File size (in bytes)
MIME type of the file
object
Indicates if it is the main image of the product
Write-only
Read-only
object
object
object
Name of the file
File size (in bytes)
MIME type of the file
object
Indicates if it is the main image of the product
Responses
Section titled “Responses”The modified product
object
Read-only
Read-only
object
Read-only
Read-only
Read-only
Read-only
object
Identifier of the user
Name of the user
Write-only
Read-only
object
Read-only
object
object
Name of the file
File size (in bytes)
MIME type of the file
object
Indicates if it is the main image of the product
Write-only
Read-only
object
object
object
Name of the file
File size (in bytes)
MIME type of the file
object
Indicates if it is the main image of the product
The access key has not been provided in the X-Koibox-Key header
Headers
Section titled “Headers”Indicates the required header for authentication
No valid access key has been provided
The resource was not found
