<?php
$url = 'https://www.vendus.pt/ws/v1.0/products/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
?>
<?php
$url = 'https://www.vendus.pt/ws/v1.0/products/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'GET';
$params = array(
'title' => 'book',
'store_id' => 123,
'reference' => 'XBD001',
'barcode' => '6920702798897',
'category_id' => 123,
'brand_id' => 123,
'status' => 'XBD001',
);
$url .= '?' . http_build_query($params);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
$result = curl_exec($curl);
?>
Name | Type | Example | Description |
---|---|---|---|
title | string | book | String to be searched on title |
store_id | int | 123 | Store ID |
reference | string | XBD001 | Reference code |
barcode | string | 6920702798897 | Barcode |
category_id | int | 123 | Category ID |
brand_id | int | 123 | Brand ID |
status | stringon - Ativo (default)off - Inativo | Status |
Name | Type | Example | Description |
---|---|---|---|
id | int | 12345 | ID |
reference | string | XBD001 | Reference code |
barcode | string | 6920702798897 | Barcode |
title | string | Magazine XPTO | Name |
category_id | int | 123 | Category ID |
brand_id | int | 123 | Brand ID |
status | stringon - Ativooff - Inativo | Status |
<?php
$url = 'https://www.vendus.pt/ws/v1.0/products/12345/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
?>
<?php
$url = 'https://www.vendus.pt/ws/v1.0/products/12345/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
?>
Name | Type | Example | Description |
---|---|---|---|
id | int | 12345 | ID Interno |
reference | string | XBD001 | Reference code |
barcode | string | P000000XBD001 | Barcode |
supplier_code | string | AHSG102X | Supplier Code |
title | string | Book XPTO | Name |
description | string | Book XPTO 2006 Edition | Description |
supply_price | currency | 10.12 | Supplier price |
gross_price | currency | 20.00 | Gross price |
unit_id | int | 123 | Unit ID |
type_id | stringP - ProdutoS - ServiçoO - Outro (portes, adiantamentos, etc.)I - Imposto (excepto IVA e IS) ou Encargo ParafiscalE - Imposto Especial de Consumo (IABA, ISP e IT) | ||
stock_control | int 0, 1 | Stock Control | |
stock_type | stringM - M - MercadoriasP - P - Matérias primas, subsidiárias ou de consumoA - A - Produtos acabados ou intermédiosS - S - Subprodutos, deperdícios ou refugosT - T - Produtos e trabalhos em curso | Stock Type | |
tax_id | stringNOR - Taxa NormalINT - Taxa IntermédiaRED - Taxa ReduzidaISE - IsentoOUT - Outros | Tax ID | |
tax_exemption | stringM01 - M01 - Artigo 16.º, n.º 6 do CIVA ou similarM02 - M02 - Artigo 6.º do Decreto-Lei n.º 198/90, de 19 de JunhoM03 - M03 - Exigibilidade de caixa (revogado)M04 - M04 - Artigo 13.º do CIVA ou similarM05 - M05 - Artigo 14.º do CIVA ou similarM06 - M06 - Artigo 15.º do CIVA ou similarM07 - M07 - Artigo 9.º do CIVA ou similarM08 - M08 - IVA - autoliquidação (revogado)M09 - M09 - IVA - não confere direito a deduçãoM10 - M10 - IVA - Regime de isenção (Artigo 57.º do CIVA)M11 - M11 - Regime particular do tabacoM12 - M12 - Regime da margem de lucro - Agências de viagensM13 - M13 - Regime da margem de lucro - Bens em segunda mãoM14 - M14 - Regime da margem de lucro - Objetos de arteM15 - M15 - Regime da margem de lucro - Objetos de coleção e antiguidadesM16 - M16 - Artigo 14.º do RITI ou similarM19 - M19 - Outras isençõesM20 - M20 - IVA - regime forfetárioM21 - M21 - IVA – não confere direito à deduçãoM25 - M25 - Mercadorias à consignaçãoM26 - M26 - Cabaz alimentarM30 - M30 - IVA - autoliquidação (2.1.i)M31 - M31 - IVA - autoliquidação (2.1.j)M32 - M32 - IVA - autoliquidação (2.1.l)M33 - M33 - IVA - autoliquidação (2.1.m)M34 - M34 - IVA - autoliquidação (2.1.n)M40 - M40 - IVA - autoliquidação (6.6.a)M41 - M41 - IVA - autoliquidação (8.3.R)M42 - M42 - IVA - autoliquidação (21.2007)M43 - M43 - IVA - autoliquidação (362.99)M99 - M99 - Não sujeito; não tributado ou similar | Tax Exemption To be used only when tax_id = ISE | |
category_id | int | 123 | Category ID |
brand_id | int | 123 | Brand ID |
status | stringon - Ativooff - Inativo | Status |
<?php
$url = 'https://www.vendus.pt/ws/v1.0/products/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'POST';
$params = array(
'reference' => 'XBD001',
'barcode' => 'P000000XBD001',
'supplier_code' => 'AHSG102X',
'title' => 'Book XPTO',
'description' => 'Book XPTO 2006 Edition',
'supply_price' => 10.12,
'gross_price' => 20.00,
'unit_id' => 123,
'type_id' => 'P',
'stock_control' => 1,
'stock_type' => 'M',
'tax_id' => 'NOR',
'tax_exemption' => 'M40',
'category_id' => 123,
'brand_id' => 123,
'status' => 'on',
);
$content = json_encode($params);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(
"Content-type: application/json",
"Content-Length: " . strlen($content),
)
);
$result = curl_exec($curl);
?>
Name | Type | Example | Description |
---|---|---|---|
reference | string | XBD001 | Reference code |
barcode | string | P000000XBD001 | Barcode |
supplier_code | string | AHSG102X | Supplier Code |
title | string | Book XPTO | Name |
description | string | Book XPTO 2006 Edition | Description |
supply_price | currency | 10.12 | Supplier price |
gross_price | currency | 20.00 | Gross price |
unit_id | int | 123 | Unit ID |
type_id | stringP - Produto (default)S - ServiçoO - Outro (portes, adiantamentos, etc.)I - Imposto (excepto IVA e IS) ou Encargo ParafiscalE - Imposto Especial de Consumo (IABA, ISP e IT) | Type ID | |
stock_control | int 0, 1 | Stock Control | |
stock_type | stringM - M - Mercadorias (default)P - P - Matérias primas, subsidiárias ou de consumoA - A - Produtos acabados ou intermédiosS - S - Subprodutos, deperdícios ou refugosT - T - Produtos e trabalhos em curso | Stock Type | |
tax_id | stringNOR - Taxa Normal (default)INT - Taxa IntermédiaRED - Taxa ReduzidaISE - IsentoOUT - Outros | Tax ID | |
tax_exemption | stringM01 - M01 - Artigo 16.º, n.º 6 do CIVA ou similarM02 - M02 - Artigo 6.º do Decreto-Lei n.º 198/90, de 19 de JunhoM03 - M03 - Exigibilidade de caixa (revogado)M04 - M04 - Artigo 13.º do CIVA ou similarM05 - M05 - Artigo 14.º do CIVA ou similarM06 - M06 - Artigo 15.º do CIVA ou similarM07 - M07 - Artigo 9.º do CIVA ou similarM08 - M08 - IVA - autoliquidação (revogado)M09 - M09 - IVA - não confere direito a deduçãoM10 - M10 - IVA - Regime de isenção (Artigo 57.º do CIVA)M11 - M11 - Regime particular do tabacoM12 - M12 - Regime da margem de lucro - Agências de viagensM13 - M13 - Regime da margem de lucro - Bens em segunda mãoM14 - M14 - Regime da margem de lucro - Objetos de arteM15 - M15 - Regime da margem de lucro - Objetos de coleção e antiguidadesM16 - M16 - Artigo 14.º do RITI ou similarM19 - M19 - Outras isençõesM20 - M20 - IVA - regime forfetárioM21 - M21 - IVA – não confere direito à deduçãoM25 - M25 - Mercadorias à consignaçãoM26 - M26 - Cabaz alimentarM30 - M30 - IVA - autoliquidação (2.1.i)M31 - M31 - IVA - autoliquidação (2.1.j)M32 - M32 - IVA - autoliquidação (2.1.l)M33 - M33 - IVA - autoliquidação (2.1.m)M34 - M34 - IVA - autoliquidação (2.1.n)M40 - M40 - IVA - autoliquidação (6.6.a)M41 - M41 - IVA - autoliquidação (8.3.R)M42 - M42 - IVA - autoliquidação (21.2007)M43 - M43 - IVA - autoliquidação (362.99)M99 - M99 - Não sujeito; não tributado ou similar | Tax Exemption To be used only when tax_id = ISE | |
category_id | int | 123 | Category ID |
brand_id | int | 123 | Brand ID |
status | stringon - Ativo (default)off - Inativo | Status |
Name | Type | Example | Description |
---|---|---|---|
id | int | 12345 | ID Interno |
reference | string | XBD001 | Reference code |
barcode | string | P000000XBD001 | Barcode |
supplier_code | string | AHSG102X | Supplier Code |
title | string | Book XPTO | Name |
description | string | Book XPTO 2006 Edition | Description |
supply_price | currency | 10.12 | Supplier price |
gross_price | currency | 20.00 | Gross price |
unit_id | int | 123 | Unit ID |
type_id | stringP - ProdutoS - ServiçoO - Outro (portes, adiantamentos, etc.)I - Imposto (excepto IVA e IS) ou Encargo ParafiscalE - Imposto Especial de Consumo (IABA, ISP e IT) | ||
stock_control | int 0, 1 | Stock Control | |
stock_type | stringM - M - MercadoriasP - P - Matérias primas, subsidiárias ou de consumoA - A - Produtos acabados ou intermédiosS - S - Subprodutos, deperdícios ou refugosT - T - Produtos e trabalhos em curso | Stock Type | |
tax_id | stringNOR - Taxa NormalINT - Taxa IntermédiaRED - Taxa ReduzidaISE - IsentoOUT - Outros | Tax ID | |
tax_exemption | stringM01 - M01 - Artigo 16.º, n.º 6 do CIVA ou similarM02 - M02 - Artigo 6.º do Decreto-Lei n.º 198/90, de 19 de JunhoM03 - M03 - Exigibilidade de caixa (revogado)M04 - M04 - Artigo 13.º do CIVA ou similarM05 - M05 - Artigo 14.º do CIVA ou similarM06 - M06 - Artigo 15.º do CIVA ou similarM07 - M07 - Artigo 9.º do CIVA ou similarM08 - M08 - IVA - autoliquidação (revogado)M09 - M09 - IVA - não confere direito a deduçãoM10 - M10 - IVA - Regime de isenção (Artigo 57.º do CIVA)M11 - M11 - Regime particular do tabacoM12 - M12 - Regime da margem de lucro - Agências de viagensM13 - M13 - Regime da margem de lucro - Bens em segunda mãoM14 - M14 - Regime da margem de lucro - Objetos de arteM15 - M15 - Regime da margem de lucro - Objetos de coleção e antiguidadesM16 - M16 - Artigo 14.º do RITI ou similarM19 - M19 - Outras isençõesM20 - M20 - IVA - regime forfetárioM21 - M21 - IVA – não confere direito à deduçãoM25 - M25 - Mercadorias à consignaçãoM26 - M26 - Cabaz alimentarM30 - M30 - IVA - autoliquidação (2.1.i)M31 - M31 - IVA - autoliquidação (2.1.j)M32 - M32 - IVA - autoliquidação (2.1.l)M33 - M33 - IVA - autoliquidação (2.1.m)M34 - M34 - IVA - autoliquidação (2.1.n)M40 - M40 - IVA - autoliquidação (6.6.a)M41 - M41 - IVA - autoliquidação (8.3.R)M42 - M42 - IVA - autoliquidação (21.2007)M43 - M43 - IVA - autoliquidação (362.99)M99 - M99 - Não sujeito; não tributado ou similar | Tax Exemption To be used only when tax_id = ISE | |
category_id | int | 123 | Category ID |
brand_id | int | 123 | Brand ID |
status | stringon - Ativooff - Inativo | Status |
<?php
$url = 'https://www.vendus.pt/ws/v1.0/products/12345/';
$apiKey = 'c433ff57a5ba6cdf301a48c97d9432594e35e73ce545945639bc4fb5798f1e8a';
$method = 'PATCH';
$params = array(
'reference' => 'XBD001',
'barcode' => 'P000000XBD001',
'supplier_code' => 'AHSG102X',
'title' => 'Book XPTO',
'description' => 'Book XPTO 2006 Edition',
'supply_price' => 10.12,
'gross_price' => 20.00,
'unit_id' => 123,
'type_id' => 'P',
'stock_control' => 1,
'stock_type' => 'M',
'tax_id' => 'NOR',
'tax_exemption' => 'M40',
'category_id' => 123,
'brand_id' => 123,
'status' => 'on',
);
$content = json_encode($params);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $apiKey);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(
"Content-type: application/json",
"Content-Length: " . strlen($content),
)
);
$result = curl_exec($curl);
?>
Name | Type | Example | Description |
---|---|---|---|
reference | string | XBD001 | Reference code |
barcode | string | P000000XBD001 | Barcode |
supplier_code | string | AHSG102X | Supplier Code |
title | string | Book XPTO | Name |
description | string | Book XPTO 2006 Edition | Description |
supply_price | currency | 10.12 | Supplier price |
gross_price | currency | 20.00 | Gross price |
unit_id | int | 123 | Unit ID |
type_id | stringP - Produto (default)S - ServiçoO - Outro (portes, adiantamentos, etc.)I - Imposto (excepto IVA e IS) ou Encargo ParafiscalE - Imposto Especial de Consumo (IABA, ISP e IT) | Type ID | |
stock_control | int 0, 1 | Stock Control | |
stock_type | stringM - M - Mercadorias (default)P - P - Matérias primas, subsidiárias ou de consumoA - A - Produtos acabados ou intermédiosS - S - Subprodutos, deperdícios ou refugosT - T - Produtos e trabalhos em curso | Stock Type | |
tax_id | stringNOR - Taxa Normal (default)INT - Taxa IntermédiaRED - Taxa ReduzidaISE - IsentoOUT - Outros | Tax ID | |
tax_exemption | stringM01 - M01 - Artigo 16.º, n.º 6 do CIVA ou similarM02 - M02 - Artigo 6.º do Decreto-Lei n.º 198/90, de 19 de JunhoM03 - M03 - Exigibilidade de caixa (revogado)M04 - M04 - Artigo 13.º do CIVA ou similarM05 - M05 - Artigo 14.º do CIVA ou similarM06 - M06 - Artigo 15.º do CIVA ou similarM07 - M07 - Artigo 9.º do CIVA ou similarM08 - M08 - IVA - autoliquidação (revogado)M09 - M09 - IVA - não confere direito a deduçãoM10 - M10 - IVA - Regime de isenção (Artigo 57.º do CIVA)M11 - M11 - Regime particular do tabacoM12 - M12 - Regime da margem de lucro - Agências de viagensM13 - M13 - Regime da margem de lucro - Bens em segunda mãoM14 - M14 - Regime da margem de lucro - Objetos de arteM15 - M15 - Regime da margem de lucro - Objetos de coleção e antiguidadesM16 - M16 - Artigo 14.º do RITI ou similarM19 - M19 - Outras isençõesM20 - M20 - IVA - regime forfetárioM21 - M21 - IVA – não confere direito à deduçãoM25 - M25 - Mercadorias à consignaçãoM26 - M26 - Cabaz alimentarM30 - M30 - IVA - autoliquidação (2.1.i)M31 - M31 - IVA - autoliquidação (2.1.j)M32 - M32 - IVA - autoliquidação (2.1.l)M33 - M33 - IVA - autoliquidação (2.1.m)M34 - M34 - IVA - autoliquidação (2.1.n)M40 - M40 - IVA - autoliquidação (6.6.a)M41 - M41 - IVA - autoliquidação (8.3.R)M42 - M42 - IVA - autoliquidação (21.2007)M43 - M43 - IVA - autoliquidação (362.99)M99 - M99 - Não sujeito; não tributado ou similar | Tax Exemption To be used only when tax_id = ISE | |
category_id | int | 123 | Category ID |
brand_id | int | 123 | Brand ID |
status | stringon - Ativo (default)off - Inativo | Status |
Name | Type | Example | Description |
---|---|---|---|
id | int | 12345 | ID Interno |
reference | string | XBD001 | Reference code |
barcode | string | P000000XBD001 | Barcode |
supplier_code | string | AHSG102X | Supplier Code |
title | string | Book XPTO | Name |
description | string | Book XPTO 2006 Edition | Description |
supply_price | currency | 10.12 | Supplier price |
gross_price | currency | 20.00 | Gross price |
unit_id | int | 123 | Unit ID |
type_id | stringP - ProdutoS - ServiçoO - Outro (portes, adiantamentos, etc.)I - Imposto (excepto IVA e IS) ou Encargo ParafiscalE - Imposto Especial de Consumo (IABA, ISP e IT) | ||
stock_control | int 0, 1 | Stock Control | |
stock_type | stringM - M - MercadoriasP - P - Matérias primas, subsidiárias ou de consumoA - A - Produtos acabados ou intermédiosS - S - Subprodutos, deperdícios ou refugosT - T - Produtos e trabalhos em curso | Stock Type | |
tax_id | stringNOR - Taxa NormalINT - Taxa IntermédiaRED - Taxa ReduzidaISE - IsentoOUT - Outros | Tax ID | |
tax_exemption | stringM01 - M01 - Artigo 16.º, n.º 6 do CIVA ou similarM02 - M02 - Artigo 6.º do Decreto-Lei n.º 198/90, de 19 de JunhoM03 - M03 - Exigibilidade de caixa (revogado)M04 - M04 - Artigo 13.º do CIVA ou similarM05 - M05 - Artigo 14.º do CIVA ou similarM06 - M06 - Artigo 15.º do CIVA ou similarM07 - M07 - Artigo 9.º do CIVA ou similarM08 - M08 - IVA - autoliquidação (revogado)M09 - M09 - IVA - não confere direito a deduçãoM10 - M10 - IVA - Regime de isenção (Artigo 57.º do CIVA)M11 - M11 - Regime particular do tabacoM12 - M12 - Regime da margem de lucro - Agências de viagensM13 - M13 - Regime da margem de lucro - Bens em segunda mãoM14 - M14 - Regime da margem de lucro - Objetos de arteM15 - M15 - Regime da margem de lucro - Objetos de coleção e antiguidadesM16 - M16 - Artigo 14.º do RITI ou similarM19 - M19 - Outras isençõesM20 - M20 - IVA - regime forfetárioM21 - M21 - IVA – não confere direito à deduçãoM25 - M25 - Mercadorias à consignaçãoM26 - M26 - Cabaz alimentarM30 - M30 - IVA - autoliquidação (2.1.i)M31 - M31 - IVA - autoliquidação (2.1.j)M32 - M32 - IVA - autoliquidação (2.1.l)M33 - M33 - IVA - autoliquidação (2.1.m)M34 - M34 - IVA - autoliquidação (2.1.n)M40 - M40 - IVA - autoliquidação (6.6.a)M41 - M41 - IVA - autoliquidação (8.3.R)M42 - M42 - IVA - autoliquidação (21.2007)M43 - M43 - IVA - autoliquidação (362.99)M99 - M99 - Não sujeito; não tributado ou similar | Tax Exemption To be used only when tax_id = ISE | |
category_id | int | 123 | Category ID |
brand_id | int | 123 | Brand ID |
status | stringon - Ativooff - Inativo | Status |