Quick Start

Last updated: 02/04/2020

Autorizzazione

Genera il Token da utilizzare nelle richieste successive

Request:

POST: https://sisapi.fullservice.private-cloud.online/Authorization/Token

Header:

Content-Type: application/x-www-form-urlencoded

Request Body (x-www-form-urlencoded):

username: [your-username]
password: [your-password]
grant_type: password

Response OK (200):

{"access_token": "[TOKEN]", "token_type": "bearer", "expires_in": 599}

Bad Request (400):

{"error": "invalid_grant", "error_description": "Wrong credentials Used"}

Stock (tracciato 3.5)

Gestiremo nella stessa chiamata lo stock nuovo, usato, km0, VHC e le auto demo. Lo stock sarà allineato in real time col DMS, quindi ad ogni Insert,Update o Delete nel DMS dovrà essere inviato questo messaggio.
Il campo “operation” definisce il tipo di attività da fare (insert, update o delete)

Request:

POST: https://sisapi.fullservice.private-cloud.online/SiS/Stock

Header:

Authorization: Bearer + [your-token]
Content-Type: application/json

Request Body:

{ 
    "IdDms": 0,
    "CodInfocar": "",
    "CodEurotax": "",
    "CodMarcaListino": 0,
    "CodModelloListino": "",
    "CodVersioneListino": "",
    "WersVeicolo": "",
    "Dmarca": "",
    "Dmodello": "",
    "Dversione": "",
    "FkStockTipologia": 0, //1(Nuovo) | 2(Km0) | 3(VHC) | 4(Usato) | 5(Demo) | 6(Altro)
    "FkStockStatus": 0, //1(Presente) | 2(Viaggiante) | 3(Ordinata) | 4(Nazionale) | 5(Demo) | 6(Virtualle)
    "TipologiaVeicolo": 0,
    "mnyPrezzo": 0.00,
    "Targa": "",
    "Telaio": "",
    "Nordine": "",
    "DataImmatricolazione": "",
    "Dataritiro": "",
    "DataFattura": "",
    "DataListino": "",
    "DataOpzione": "",
    "DataArrivo": "",
    "DataVendita": "",
    "DispVen": 0,
    "KmPerc": 0,
    "AnnoImm": 1970,
    "MeseImm": 01,
    "ColoreInt": "",
    "ColoreEst": "",
    "Alimentazione": "",
    "Cilindrata": "",
    "Co2": "",
    "Ubicazione": "",
    "mnyPrezzoRitiro": 0.00,
    "Foto": "",
    "IvaE": 0,
    "Brand": 0,
    "Optionals": [
        {
            "CodOpt": "",
            "WersOptional": "",
            "DescOpt": "",
            "Mnyimporto": 0.00,
            "Omaggio": 0
        }
    ],
    "Spese": [
        {
            "CodSpesa": "",
            "DescSpesa": "",
            "TipoVariazione": "", //CAR=CARROZZERIA | PNE=PNEUMATICI | INT=INTERNI | MEC=MECCANICA | NULL=ALTRO
            "ImportoSpesa": 0.00
        }
    ],
    "Operation": "" //I=INSERT | U=UPDATE
}
                                        
In caso di contratto per un auto in stock, la togliamo dalla disponibilità:

{ 
    "IdDms": 0,
    "DataVendita": "",
    "Operation": "D" //D=DELETE
}
                                        

Response OK (200):


{
    "status_code": 200,
    "message": "OK",
    "dealer_id": [account-dealerID],
    "return_id": [last-identity] (se l'operazione è INSERT),
    "error": false,
    "error_description": []
}
                                            

Bad Request (400):


{
    "status_code": 400,
    "message": "BadRequest",
    "dealer_id": [account-dealerID],
    "return_id": 0,
    "error": true,
    "error_description": [ //ARRAY[]
        {
            "Key": "[Chiave errore]",
            "Value": "[Messaggio errore]"
        }
    ]
}
                                            

Unauthorized (401):

{"Message": "Autorizzazione negata per la richiesta."}

Opziona Veicolo (tracciato 3.7)

Il Dms o la suite inviano questo messaggio per opzionare una vettura, attendono come risposta ok o ko.

Request:

POST: https://sisapi.fullservice.private-cloud.online/SiS/OptionStock

Header:

Authorization: Bearer + [your-token]
Content-Type: application/json

Request Body:

{
    "IdDms": 0,
    "IdFunzDms": 0,
    "DataFineOpzione": "" //se null cancella eventuale opzione esistente
}
                                    

Response OK (200):


{
    "status_code": 200,
    "message": "OK",
    "dealer_id": [account-dealerID],
    "return_id": 0,
    "error": false,
    "error_description": []
}
                                            

Bad Request (400):


{
    "status_code": 400,
    "message": "BadRequest",
    "dealer_id": [account-dealerID],
    "return_id": 0,
    "error": true,
    "error_description": [ //ARRAY[]
        {
            "Key": "[Chiave errore]",
            "Value": "[Messaggio errore]"
        }
    ]
}
                                            

Unauthorized (401):

{"Message": "Autorizzazione negata per la richiesta."}

Annulla Contratto (tracciato 3.11)

Il Dms o la suite inviano questo messaggio per notificare l’annullamento di un contratto, attendono come risposta ok o ko.

Request:

POST: https://sisapi.fullservice.private-cloud.online/SiS/CancelContract

Header:

Authorization: Bearer + [your-token]
Content-Type: application/json

Request Body:

{
    "IdContratto": 2
}
                                    

Response OK (200):


{
    "status_code": 200,
    "message": "OK",
    "dealer_id": [account-dealerID],
    "return_id": 0,
    "error": false,
    "error_description": []
}
                                            

Bad Request (400):


{
    "status_code": 400,
    "message": "BadRequest",
    "dealer_id": [account-dealerID],
    "return_id": 0,
    "error": true,
    "error_description": [ //ARRAY[]
        {
            "Key": "[Chiave errore]",
            "Value": "[Messaggio errore]"
        }
    ]
}
                                            

Unauthorized (401):

{"Message": "Autorizzazione negata per la richiesta."}

Contratti Dms (tracciato 3.13)

Il Dms invia questo messaggio se un preventivo passato in precedenza dal FP viene trasformato in contratto sul dms

Request:

POST: https://sisapi.fullservice.private-cloud.online/SiS/DmsContract

Header:

Authorization: Bearer + [your-token]
Content-Type: application/json

Request Body:

{
    "IdPreventivo": 2,
    "DataVendita": ""
}
                                    

Response OK (200):


{
    "status_code": 200,
    "message": "OK",
    "dealer_id": [account-dealerID],
    "return_id": 0,
    "error": false,
    "error_description": []
}
                                            

Bad Request (400):


{
    "status_code": 400,
    "message": "BadRequest",
    "dealer_id": [account-dealerID],
    "return_id": 0,
    "error": true,
    "error_description": [ //ARRAY[]
        {
            "Key": "[Chiave errore]",
            "Value": "[Messaggio errore]"
        }
    ]
}
                                            

Unauthorized (401):

{"Message": "Autorizzazione negata per la richiesta."}