Résumé
Manipulation de l'entité CustomerAddress (Adresses des clients) en lecture/écriture/suppression via un objet métier depuis une application externe.
Tables
Les tables utilisées sont :
sw_data_customeraddress : Table des adresses des tiers
Critères d'activation
WHK_CustomerAddress est défini dans la gestion des webhooks du studio.
Fonctionnement
verb: GET
resultType: simple
"customeraddress":{ "codecustomeraddress":"C0000001-BDX", "customer_ID":"C0000001", "name":"ENTREPÔT GUICHARD", "address1":"15 Avenue Champollion", "address2":"", "address3":"", "postalCode":"21000 ", "city":"Dijon", "phoneNumber":"03 90 22 75 45", "faxNumber":"03 90 22 75 40", "mobilePhoneNumber":"", "email":"", "generictype_ID_country":"FR", "generictype_ID_province":"", "baseculture_ID":"", "branchoffice_ID":"", "site":"1", "siteCode": "BDX", "siteName": "Entrepôt Dijon" }
verb: GET
resultType: extended
"customeraddress":{ "codecustomeraddress":"C0000001-BDX", "customer_ID":"C0000001", "name":"ENTREPÔT GUICHARD", "address1":"15 Avenue Champollion", "address2":"", "address3":"", "postalCode":"21000 ", "city":"Dijon", "phoneNumber":"03 90 22 75 45", "faxNumber":"03 90 22 75 40", "mobilePhoneNumber":"", "email":"", "generictype_ID_country":"FR", "generictype_ID_province":"", "baseculture_ID":"", "branchoffice_ID":"", "site":"1", "siteCode": "BDX", "siteName": "Entrepôt Dijon", "areaCode":"", "contact":"", "gpsLongitude":"5.06764", "gpsLatitude":"47.33379", "billingAddress":"", "defaultBillingAddress":"", "deliveryAddress":"", "defaultDeliveryAddress":"", "accessCode":"", "floor":"", "apartment":"", "miscInfos":"", "baseuser_ID_favoriteTechnician":"", "erpAddressID":"BDX", "bankholidayparamheader_ID":"" }
verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour la table customer, generictype_country, generictype_ID_province, baseculture, baseuser_favoriteTechnician et branchoffice
"related":[ { "customer":{ "codecustomer":"C0000001", "name":"ENTREPRISE DIJON GUICHARD", "baseuser_ID":"", "address1":"33 Avenue du Drapeau", "address2":"", "address3":"", "postalCode":"21000", "city":"DIJON", "phoneNumber":"03 90 11 22 33", "faxNumber":"03 90 11 22 44", "mobilePhoneNumber":"06 90 11 22 33", "email":"contact@guichard.com", "deliveryDays":"1A;1B;2A;2B;3A;3B;4A;4B;5A;5B", "openingDays":"1A;1B;2A;2B;3A;3B;4A;4B;5A;5B", "siretNumber":"", "vatIntra":"", "apeCode":"516K", "comment":"", "blocked":"0", "blockedComment":"", "message":"", "vacationStart":"", "vacationEnd":"", "gpsLongitude":"5.04372", "gpsLatitude":"47.33222", "accountNumber":"C0000001", "contactName":"", "currency_ID":"", "authorizedCredit":"0", "risk":"1", "language":"", "underSurveillance":"", "workforce":"25", "customer_ID_paying":"", "pricecategory_ID":"", "discountRate":"0", "website":"<https://www.guichard.com",> "legalStatus":"Société Anonyme avec Directoire", "generictype_ID_brand":"", "generictype_ID_deliveryMode":"", "generictype_ID_paymentMean":"", "generictype_ID_country":"FR", "generictype_ID_province":"", "generictype_ID_customerType":"CTC", "generictype_ID_customerFamily":"", "confirmationEmail":"contact@guichard.com", "confirmationFax":"03 90 11 22 44", "generictype_ID_taxCode":"", "productdepot_ID":"", "generictype_ID_accountingCategory":"", "generictype_ID_customerPotential":"B", "generictype_ID_civility":"", "skype":"contact@guichard.com", "generictype_ID_role":"", "unused":"0", "customergroup_ID":"", "generictype_ID_referencing":"2", "generictype_ID_distribution":"SELF", "generictype_ID_market":"BIG", "area":"", "baseculture_ID":"FR-FR", "baseuser_ID_favoriteTechnician":"TECH-01", "branchoffice_ID":"SXB", "emailFormat":"", "isIndividual":"0", "facebook":"<https://www.facebook.com/guichard/",> "twitter":"<https://twitter.com/guichard",> "youtube":"<https://www.youtube.com/watch?v=6jGbnEwQJ54",> "linkedin":"<https://www.linkedin.com/company/guichard",> "activity":"" } }]
verb: PUT
{ "customeraddress": { "codecustomeraddress": "C0000001-SXB", /* Code globalement unique d'adresse client (Varchar (255))*/ "customer_ID": "C0000001", /* Code client (ForeignKey () - sw_data_customer.codecustomer)*/ "name": "ENTREPÔT GUICHARD stras", /* Nom de l'adresse client (Varchar (255))*/ "address1": "15 Avenue Champollion", /* Adresse 1 (Varchar (255))*/ "address2": null, /* Adresse 2 (Varchar (255))*/ "address3": null, /* Adresse 3 (Varchar (255))*/ "postalCode": "67000", /* Code postal (Varchar (16))*/ "city": "Strasbourg", /* Ville (Varchar (64))*/ "phoneNumber": "03 90 22 75 45", /* N° de téléphone (Varchar (64))*/ "faxNumber": "03 90 22 75 40", /* N° de télécopie (Varchar (64))*/ "mobilePhoneNumber": null, /* N° de portable (Varchar (64))*/ "email": null, /* Email (Varchar (255))*/ "generictype_ID_country": "COUNTRY-FR", /* Code pays (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = COUNTRY)*/ "generictype_ID_province": null, /* Code province (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = PROVINCE)*/ "billingAddress": "1", /* Adresse de facturation (Valeurs possibles : 0,1) (Bool ()) */ "defaultBillingAddress": "0", /* Adresse de facturation par défaut (Valeurs possibles : 0,1) (Bool ()) */ "deliveryAddress": "1", /* Adresse de livraison (Valeurs possibles : 0,1) (Bool ()) */ "defaultDeliveryAddress": "0", /* Adresse de livraison par défaut (Valeurs possibles : 0,1) (Bool ()) */ "site": "1", /* Site (Valeurs possibles : 0,1) (Bool ())*/ "areaCode": "", /* Code région (Varchar (64))*/ "contact": "M. James", /* Contact (Varchar (64))*/ "accessCode": "", /* Code d'accès (Varchar (64))*/ "floor": "", /* Etage (Varchar (64))*/ "apartment": "", /* Appartement(Varchar (64))*/ "miscInfos": "", /* Informations diverses (Text (65535))*/ "baseuser_ID_favoriteTechnician": "TECH-01", /* Code technicien préféré (ForeignKey () - sw_data_baseuser.codebaseuser)*/ "erpAddressID": "SXB", /* ID adresse ERP (Varchar (255)) "branchoffice_ID": "", /* Code de l'agence de rattachement (ForeignKey () - sw_data_branchoffice.codebranchoffice)*/ "bankholidayparamheader_ID": "", /* Code entête paramétrage jours fériés (ForeignKey () - sw_data_bankholidayparamheader.codebankholidayparamheader)*/ "baseculture_ID": "", /* Code culture (ForeignKey () - sw_data_baseculture.codebaseculture)*/ "siteCode": "SXB", /* Code du site (Varchar (255)) "siteName": "Entrepôt Strasbourg", /* Nom du site (Varchar (255))*/ "internalCodeCustomeraddress": null, /* CodeCustomeraddress original de weavy s'il y a eu transcodage (Varchar (255)) */ "internalcustomer_ID": null /* CodeCustomer original de weavy s'il y a eu transcodage (Varchar (255)) */ } }
verb: LIST
resultType: simple, extended reprendre les définitions du GET
"filters:" { "codeCustomerAddress": "value", filter is equal "codeCustomer": "value", filter is equal "name": "value", filter is contains "site": "value", filter is equal "siteCode": "value", filter is equal "siteName": "value", filter is contains "codeBranchoffice": "value", filter is equal "codeCountry": "value" filter is equal }, "orderBy": "value"
Valeur possibles pour le tri "orderBy" :
nameAsc : par nom ascendant
siteCodeAsc : par code site ascendant
siteNameAsc : par nom de site ascendant