Passa al contenuto principale

LoginService

Versione: 2.1 · Dicembre 2025

Il LoginService autentica un utente e restituisce un authToken richiesto da tutti gli altri servizi Shivah WS.


Metodi​

MetodoDescrizione
getAuthCrea un token di autenticazione per l'utente indicato se le credenziali sono valide

getAuth​

Action: http://dpd.com/common/service/LoginService/2.1/getAuth

Input:

NomeElemento
parameterstypes:getAuth

Output:

NomeElemento
parameterstypes:getAuthResponse

Fault:

NomeElemento
parameterstypes_authentication:authenticationFault

Esempi​

getAuth — SOAP​

POST {baseUrl}/services/LoginService

Corpo della richiesta:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://dpd.com/common/service/types/LoginService/2.1">
<soapenv:Header/>
<soapenv:Body>
<ns:getAuth>
<delisId>{your delisId}</delisId>
<password>{your password}</password>
<messageLanguage>de_CH</messageLanguage>
</ns:getAuth>
</soapenv:Body>
</soapenv:Envelope>

Risposta (successo):

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<getAuthResponse xmlns="http://dpd.com/common/service/types/LoginService/2.1">
<return>
<delisId>{your delisId}</delisId>
<customerUid>{your customerUid}</customerUid>
<authToken>{your authToken}</authToken>
<depot>{your sendingDepot}</depot>
<authTokenExpires>2026-10-01T09:59:28.0000000Z</authTokenExpires>
</return>
</getAuthResponse>
</soap:Body>
</soap:Envelope>

Risposta (errore):

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Authentication failed</faultstring>
<detail>
<ns:authenticationFault xmlns:ns="http://dpd.com/common/service/types/Authentication/2.0">
<errorCode>UNAUTHORIZED</errorCode>
<errorMessage>AUTH-INVALID-CREDENTIALS: Unauthorized, invalid credentials...</errorMessage>
</ns:authenticationFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>

getAuth — REST​

POST {baseUrl}/services/LoginService/getAuth

Corpo della richiesta:

{
"delisID": "{your delisId}",
"password": "{your password}",
"messageLanguage": "de_CH"
}

Risposta (successo):

{
"getAuthResponse": {
"return": {
"delisId": "{your delisId}",
"customerUid": "{your customerUid}",
"authToken": "{your authToken}",
"depot": "{your sendingDepot}",
"authTokenExpires": "2021-07-16T05:39:03.9133333Z"
}
},
"status": {
"type": "OK",
"code": "200",
"message": "valid"
}
}

Risposta (errore):

{
"getAuthResponse": null,
"status": {
"type": "AuthenticationFault",
"code": "DELICOM_ERR_AUTHENTICATION",
"message": "Authentication failure, check delisId and password."
}
}

Tipi complessi​

Namespace: types​

URL: http://dpd.com/common/service/types/LoginService/2.1

Login​

Contiene le informazioni di login restituite dopo un'autenticazione riuscita.

CampoTipo / OccorrenzaDescrizione
delisIdxsd:string / 1..1Il DELIS-Id dell'utente
customerUidxsd:string / 1..1L'UID cliente dell'utente (di norma uguale al DELIS-Id per gli account non secondari)
authTokenxsd:string / 1..1JWT (HS256) necessario per le altre chiamate ai web service. Lunghezza variabile — allocare almeno 2048 caratteri
depotxsd:string / 1..1Il depot a cui l'utente è assegnato
authTokenExpiresxsd:dateTime / 1..1Data e ora UTC di scadenza del token

getAuth​

CampoTipo / OccorrenzaDescrizione
delisIdxsd:string / 1..1Il DELIS-Id dell'utente
passwordxsd:string / 1..1La password dell'utente
messageLanguagexsd:string / 1..1 · length: 5Lingua dei messaggi: de_CH, fr_CH, it_CH, en_CH

getAuthResponse​

CampoTipo / OccorrenzaDescrizione
returntypes:Login / 1..1L'oggetto risultato del login

Namespace: types_authentication​

URL: http://dpd.com/common/service/types/Authentication/2.0

authenticationFault​

CampoTipo / OccorrenzaDescrizione
errorCodexsd:string / 1..1Il codice di errore
errorMessagexsd:string / 1..1 · maxLength: 255Il testo del messaggio di errore

Elementi​

Namespace: types​

ElementoTipoDescrizione
getAuthtypes:getAuth / 1..1Parametro di input di getAuth
getAuthResponsetypes:getAuthResponse / 1..1Parametro di output di getAuth

Namespace: types_authentication​

ElementoTipoDescrizione
authenticationFaultTipo complesso anonimoElemento del fault di autenticazione

Punti di accesso​

AmbienteProtocolloURL
StageSOAPhttps://shivah-st.dpd.ch/external/soap/services/LoginService
LiveSOAPhttps://shivah.dpd.ch/external/soap/services/LoginService
StageRESThttps://shivah-st.dpd.ch/external/rest/services/LoginService/getAuth
LiveRESThttps://shivah.dpd.ch/external/rest/services/LoginService/getAuth