ACTUALIZAR PRODUCTOS
POSThttps://empresa1.demo3pro6.ibu.pe/api/items/6/update
Ejemplo:
- Método: POST
- URL: https://empresa1.demo3pro6.ibu.pe/api/items/\{\{item_id\}\}/update
- TOKEN: HOHYgwd4atPalTxqi2IIspythpLAU7eP239oByfjk9VuveiOpfUTm4Yg0Szt
IMPORTANTE:
Reemplace el item_id por el id del producto
EJEMPLO:
En este caso actualizaremos el producto con id #6.
Request
- application/json
- application/xml
- application/x-www-form-urlencoded
Body
required
- JSON A ENVIAR
idnumber
Example:
6
item_type_idstring
Example:
01
internal_idstring
Example:
rrr
item_codestring
Example:
new_code
item_code_gs1string
Example:
null
descriptionstring
Example:
apk
namestring
Example:
apk
second_namestring
Example:
null
unit_type_idstring
Example:
NIU
currency_type_idstring
Example:
PEN
sale_unit_pricestring
Example:
500
purchase_unit_pricenumber
Example:
0
has_iscboolean
Example:
false
system_isc_type_idstring
Example:
null
percentage_iscnumber
Example:
0
suggested_pricenumber
Example:
0
sale_affectation_igv_type_idstring
Example:
10
purchase_affectation_igv_type_idstring
Example:
10
calculate_quantityboolean
Example:
false
stocknumber
Example:
0
stock_minnumber
Example:
0
has_igvboolean
Example:
true
has_perceptionboolean
Example:
false
item_unit_typesstring
Example:
[]
percentage_of_profitnumber
Example:
0
percentage_perceptionnumber
Example:
0
imagestring
Example:
null
image_urlstring
Example:
null
temp_pathstring
Example:
null
is_setboolean
Example:
false
account_idstring
Example:
null
category_idstring
Example:
null
brand_idstring
Example:
null
date_of_duestring
Example:
null
lot_codestring
Example:
null
lots_enabledboolean
Example:
false
lotsstring
Example:
[]
Body
required
- JSON A ENVIAR
idnumber
Example:
6
item_type_idstring
Example:
01
internal_idstring
Example:
rrr
item_codestring
Example:
new_code
item_code_gs1string
Example:
null
descriptionstring
Example:
apk
namestring
Example:
apk
second_namestring
Example:
null
unit_type_idstring
Example:
NIU
currency_type_idstring
Example:
PEN
sale_unit_pricestring
Example:
500
purchase_unit_pricenumber
Example:
0
has_iscboolean
Example:
false
system_isc_type_idstring
Example:
null
percentage_iscnumber
Example:
0
suggested_pricenumber
Example:
0
sale_affectation_igv_type_idstring
Example:
10
purchase_affectation_igv_type_idstring
Example:
10
calculate_quantityboolean
Example:
false
stocknumber
Example:
0
stock_minnumber
Example:
0
has_igvboolean
Example:
true
has_perceptionboolean
Example:
false
item_unit_typesstring
Example:
[]
percentage_of_profitnumber
Example:
0
percentage_perceptionnumber
Example:
0
imagestring
Example:
null
image_urlstring
Example:
null
temp_pathstring
Example:
null
is_setboolean
Example:
false
account_idstring
Example:
null
category_idstring
Example:
null
brand_idstring
Example:
null
date_of_duestring
Example:
null
lot_codestring
Example:
null
lots_enabledboolean
Example:
false
lotsstring
Example:
[]
Body
required
- JSON A ENVIAR
idnumber
Example:
6
item_type_idstring
Example:
01
internal_idstring
Example:
rrr
item_codestring
Example:
new_code
item_code_gs1string
Example:
null
descriptionstring
Example:
apk
namestring
Example:
apk
second_namestring
Example:
null
unit_type_idstring
Example:
NIU
currency_type_idstring
Example:
PEN
sale_unit_pricestring
Example:
500
purchase_unit_pricenumber
Example:
0
has_iscboolean
Example:
false
system_isc_type_idstring
Example:
null
percentage_iscnumber
Example:
0
suggested_pricenumber
Example:
0
sale_affectation_igv_type_idstring
Example:
10
purchase_affectation_igv_type_idstring
Example:
10
calculate_quantityboolean
Example:
false
stocknumber
Example:
0
stock_minnumber
Example:
0
has_igvboolean
Example:
true
has_perceptionboolean
Example:
false
item_unit_typesstring
Example:
[]
percentage_of_profitnumber
Example:
0
percentage_perceptionnumber
Example:
0
imagestring
Example:
null
image_urlstring
Example:
null
temp_pathstring
Example:
null
is_setboolean
Example:
false
account_idstring
Example:
null
category_idstring
Example:
null
brand_idstring
Example:
null
date_of_duestring
Example:
null
lot_codestring
Example:
null
lots_enabledboolean
Example:
false
lotsstring
Example:
[]
Responses
- 200
- 400
- 422
JSON RESPUESTA
- application/json
- application/xml
- Schema
- Example (from schema)
Schema
succesboolean
Example:
true
msgstring
Example:
Producto editado con éxito
data
object
{
"succes": true,
"msg": "Producto editado con éxito",
"data": {
"id": 6,
"item_id": 6,
"name": "ALERFORT",
"full_description": "rrr - apk",
"description": "apk",
"currency_type_id": "PEN",
"internal_id": "rrr",
"item_code": "new_code",
"currency_type_symbol": "S/",
"sale_unit_price": "500.00",
"purchase_unit_price": 0,
"unit_type_id": "NIU",
"sale_affectation_igv_type_id": "10",
"purchase_affectation_igv_type_id": "10",
"calculate_quantity": false,
"has_igv": true,
"is_set": false,
"aux_quantity": 1
}
}
- Schema
- Example (from schema)
Schema
succesboolean
Example:
true
msgstring
Example:
Producto editado con éxito
data
object
<root>
<succes>true</succes>
<msg>Producto editado con éxito</msg>
<data>
<id>6</id>
<item_id>6</item_id>
<name>ALERFORT</name>
<full_description>rrr - apk</full_description>
<description>apk</description>
<currency_type_id>PEN</currency_type_id>
<internal_id>rrr</internal_id>
<item_code>new_code</item_code>
<currency_type_symbol>S/</currency_type_symbol>
<sale_unit_price>500.00</sale_unit_price>
<purchase_unit_price>0</purchase_unit_price>
<unit_type_id>NIU</unit_type_id>
<sale_affectation_igv_type_id>10</sale_affectation_igv_type_id>
<purchase_affectation_igv_type_id>10</purchase_affectation_igv_type_id>
<calculate_quantity>false</calculate_quantity>
<has_igv>true</has_igv>
<is_set>false</is_set>
<aux_quantity>1</aux_quantity>
</data>
</root>
Invalid input
Validation exception
Authorization: oauth2
name: fastura_authtype: oauth2scopes:write,read
flows: { "implicit": { "authorizationUrl": "https://empresa1.demo3pro6.ibu.pe", "scopes": { "write": "Modificar...", "read": "Leer.." } } }
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://empresa1.demo3pro6.ibu.pe/api/items/6/update");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"id\": 6,\n \"item_type_id\": \"01\",\n \"internal_id\": \"rrr\",\n \"item_code\": \"new_code\",\n \"item_code_gs1\": null,\n \"description\": \"apk\",\n \"name\": \"apk\",\n \"second_name\": null,\n \"unit_type_id\": \"NIU\",\n \"currency_type_id\": \"PEN\",\n \"sale_unit_price\": \"500\",\n \"purchase_unit_price\": 0,\n \"has_isc\": false,\n \"system_isc_type_id\": null,\n \"percentage_isc\": 0,\n \"suggested_price\": 0,\n \"sale_affectation_igv_type_id\": \"10\",\n \"purchase_affectation_igv_type_id\": \"10\",\n \"calculate_quantity\": false,\n \"stock\": 0,\n \"stock_min\": 0,\n \"has_igv\": true,\n \"has_perception\": false,\n \"item_unit_types\": [],\n \"percentage_of_profit\": 0,\n \"percentage_perception\": 0,\n \"image\": null,\n \"image_url\": null,\n \"temp_path\": null,\n \"is_set\": false,\n \"account_id\": null,\n \"category_id\": null,\n \"brand_id\": null,\n \"date_of_due\": null,\n \"lot_code\": null,\n \"lots_enabled\": false,\n \"lots\": []\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear