Replace Customer Branches
Sostituisce l’intero elenco delle branch. Richiede customers_edit. Le branch escluse diventano HEADQUARTERS e perdono mainCustomerId. secondaryCustomerIds omesso, null o vuoto tenta di scollegarle tutte. Le regole multisede possono impedire lo scollegamento, ad esempio per partita IVA già usata da una sede principale. In caso di errore la transazione viene annullata.
id*integer1 <= valueorganizationId*integerint641 <= valueapplication/json- body
secondaryCustomerIds?array<>ID delle anagrafiche da collegare alla sede principale. Obbligatorio e non vuoto per aggiungere branch; per replace, omesso, null o vuoto scollega tutte le branch, se consentito dalle regole multisede.
Operazione completata.
application/json- response
[index: integer]?Customer master record returned by CustomersController (Anagrafiche).
curl -X PUT 'https://api.eis.it/v1/customers/update/1/1/main-customer/branches/replace' \ -H 'Content-Type: application/json' \ -d '{}'[ { "id": 0, "organizationId": 0, "name": "string", "ragioneSociale": "string", "rappresentante": "string", "ptoponomastica": "string", "indirizzo": "string", "civico": "string", "indSedLeg": "string", "civicoSedLeg": "string", "comuneSedLeg": "string", "provinciaSedLeg": "string", "regioneSedLeg": "string", "capSedLeg": "strin", "comune": "string", "provincia": "string", "regione": "string", "country": "string", "cap": "strin", "tel": "string", "vatNumber": "string", "fiscalCode": "string", "company": true, "userid": 0, "mainCustomer": 0, "mainCustomerId": 0, "type": "HEADQUARTERS", "createDate": "string", "organization": { "organizationId": 0, "userId": 0, "userName": "string", "createDate": "string", "modifiedDate": "string", "parentOrganizationId": 0, "name": "string", "sbcId": 0, "notificationEmailFromAddress": "string", "customerId": 0 }, "user": { "userId": 0, "ssoId": "string", "createDate": "string", "modifiedDate": "string", "emailAddress": "string", "firstName": "string", "lastName": "string", "hasToChangePassword": true, "organizationId": 0, "parentOrganizationId": 0 }, "associated_users": [ { "userId": 0, "ssoId": "string", "createDate": "string", "modifiedDate": "string", "emailAddress": "string", "firstName": "string", "lastName": "string", "hasToChangePassword": true, "organizationId": 0, "parentOrganizationId": 0 } ], "egonCodeAddress": "string", "egonCodeCity": "string", "egonCodeMain": "string", "rawAddress": "string", "mainCustomerInfo": { "id": 0, "name": "string", "ragioneSociale": "string" } }]Check Customer Branches POST
Controlla duplicati e incompatibilità senza modificare le anagrafiche. Richiede customers_view. Inviare secondaryCustomerIds come array, anche vuoto. canProceed è un controllo preliminare e non garantisce il successo di una successiva modifica.
Remove Customer Main Office DELETE
Scollega la branch identificata da id dalla sede principale e la rende HEADQUARTERS. Richiede customers_edit. Le regole multisede possono impedire lo scollegamento, ad esempio per partita IVA già usata da una sede principale.