WebHook Product
Résumé
Manipulation de l'entité Product (Articles) en lecture/écriture/suppression via un objet métier depuis une application externe.
Tables
Les tables utilisées sont :
sw_data_product : Table des articles
Critères d'activation
WHK_Product est défini dans la gestion des webhooks du studio.
Fonctionnement
verb: GET
resultType: simple
"product":{
"codeproduct": "ALB0001",
"description": "Album 'Mon petit Louvre' français / anglais",
"productfamily_ID": "BIJOUXARG"
}
verb: GET
resultType: extended
"product":{
"codeproduct": "ALB0001",
"description": "Album 'Mon petit Louvre' français / anglais",
"productfamily_ID": "LIBTECH",
"barcode": "3210330376946",
"saleMultiple": "",
"defaultPrice": "18.84",
"weight": "0.23",
"purchasePrice": "6.85",
"coefficient": "",
"packaging": "1",
"supplierReference": "LIVR-JEUX000",
"supplierBarcode": "",
"generictype_ID_weightunit": "KG",
"generictype_ID_taxCode": "1",
"blocked": "0",
"supplier_ID": "Saphira",
"supplementaryDescription1": "test description 1 azerty",
"supplementaryDescription2": "test description 2",
"generictype_ID_sellingunit": "SIMPLE",
"unused": "0",
"generictype_ID_managementType": "",
"height": "1",
"width": "15",
"depth": "20",
"generictype_ID_lengthunit": "MM",
"generictype_ID_brand": "",
"productGeneric": "0",
"product_ID_parentDeclination": "",
"productdeclination_ID_level1": "",
"productdeclination_ID_level2": "",
"productdeclination_ID_level3": "",
"productdeclination_ID_level4": "",
"productdeclination_ID_level5": "",
"stockDeclination": "0",
"erpProductID": ""
}
verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables productfamily, generictype_weightunit, generictype_sellingUnit, generictype_lengthunit, generictype_taxCode, generictype_managementType, product_parentdeclination, productdeclination_level1, productdeclination_level2, productdeclination_level3, productdeclination_level4 et productdeclination_level5
"related":[
{
"productfamily":{
"codeproductfamily": "BIJOUXARG",
"label": "Bijouterie Argent",
"hierarchicalLevel": "1",
"productfamily_ID_parentFamily": "ARG"
},
"generictype_weightunit": {
"codegenerictype": "WEIGHT_UNIT-KG",
"label": "kg",
"originalCode": "KG",
"dataType": "WEIGHT_UNIT",
"description": "Kilogramme",
"translationKey": "",
"generictype_ID_parent": "",
"tag": "1000",
"orderNumber": ""
},
"generictype_sellingUnit": {
"codegenerictype": "SELLING_UNIT-SIMPLE",
"label": "Simple",
"originalCode": "SIMPLE",
"dataType": "SELLING_UNIT",
"description": "",
"translationKey": "",
"generictype_ID_parent": "",
"tag": "",
"orderNumber": ""
},
"generictype_lengthunit": {
"codegenerictype": "LENGTH_UNIT-MM",
"label": "mm",
"originalCode": "MM",
"dataType": "LENGTH_UNIT",
"description": "Millimètre",
"translationKey": "",
"generictype_ID_parent": "",
"tag": "0.001",
"orderNumber": ""
},
"generictype_taxCode": {
"codegenerictype": "TAX_PRODUCT-1",
"label": "TVA normale",
"originalCode": "1",
"dataType": "TAX_PRODUCT",
"description": "",
"translationKey": "GenType_TAX_PRODUCT-1",
"generictype_ID_parent": "",
"tag": "",
"orderNumber": ""
},
"generictype_managementType": {
"codegenerictype": "",
"label": "",
"originalCode": "",
"dataType": "",
"description": "",
"translationKey": "",
"generictype_ID_parent": "",
"tag": "",
"orderNumber": ""
},
"product_parentdeclination": {
"codeproduct": "",
"description": "",
"productfamily_ID": "",
...
},
"productdeclination_level1": {
"codeproductdeclination": "",
"label": "",
"productdeclinationtype_ID": "",
"translationKey": "",
"color": "",
"orderNumber": ""
},
"productdeclination_level2": {
...
},
"productdeclination_level3: {
...
},
"productdeclination_level4": {
...
},
"productdeclination_level5": {
...
}
}]
verb: PUT
verb: LIST
resultType: simple, extended reprendre les définitions du GET
Valeurs possibles pour le tri "orderBy" :
codeProductAsc : par code article ascendant
descriptionAsc : par description article ascendant