Skip to Content
Hive
API Referencev1Customers

Replace Customer Branches

PUT
/v1/customers/update/{id}/{organizationId}/main-customer/branches/replace

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.

Path Parameters

id*integer
Range1 <= value
organizationId*integer
Formatint64
Range1 <= value

Request Body

application/json
  1. 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.

Response Body

Operazione completata.

application/json
  1. response
[index: integer]?

Customer master record returned by CustomersController (Anagrafiche).

Example Request
curl -X PUT 'https://api.eis.it/v1/customers/update/1/1/main-customer/branches/replace' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
[  {    "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"    }  }]