API upload documents

This endpoint is for uploading customer documents. Our application will store the documents and respond with a success code in case everything went well or with a code and an error message if not.

				
					Sandbox: https://api.sandbox.soisy.it/api/shops/{shopId}/requests/{fiscalCode}/documents
Produzione: https://api.soisy.it/api/shops/{shopId}/requests/{fiscalCode}/documents
				
			
				
					POST

				
			
This API requires authentication viashopId and headerX-Auth-Token . To access this endpoint, you must have successfully requested approval of a request.
ParameterObligatoryGuyFormatDescription
identityFrontFileYupImageJpg, Png, PdfFront image of the ID card
identityBackFileYupImageJpg, Png, PdfImage of the back of the ID card
fiscalCodeFrontFileYupImageJpg, Png, PdfFront image of the tax code
fiscalCodeBackFileYupImageJpg, Png, PdfImage of the back of the tax code
selfieFileYupImageJpg, Png, PdfUser selfie
incomeDeclarationFile No*ImageJpg, Png, PdfA user income document. Required ifadditionalDataNeeded istrue . The pay slip, the CUD, the 730 or the Unico model are valid
residencePermitFileNo*ImageJpg, Png, PdfResidency permit. Mandatory for users outside the European Community.
The maximum size of each document is 15MB. (*) This parameter may be mandatory in certain situations. See the description column corresponding to the item. The API returns a JSON array.
CodeDescription
201Resource created
400Syntax or domain error
403Failed to authenticate the request
500System error
				
					[
    {"fileName: "identityFrontFile", "id": <UUID>},
    {"fileName: "identityBackFile", "id": <UUID>},
    {"fileName: "fiscalCodeFrontFile", "id": <UUID>},
    {"fileName: "fiscalCodeBackFile", "id": <UUID>},
    {"fileName: "selfieFile", "id": <UUID>},
    {"fileName: "incomeDeclarationFile", "id": <UUID>},
    {"fileName: "residencePermitFile", "id": <UUID>},
]
				
			

The JSON object returned in the event of an error varies depending on the HTTP response code.

Responses with this HTTP code indicate a client-side error. The submitted request contained a formally incorrect parameter.

The following errors are possible for each parameter :

  • Failure to send the parameter

				
					{
    "errors": {
        {parametro}: [
            "Questo valore non dovrebbe essere vuoto." 
        ]
    }
}
				
			
  • Empty file
				
					{
    "errors": {
        "file": [
            "Un file vuoto non è consentito." 
        ]
    }
}
				
			
  • File sent larger than allowed
				
					{
    "errors": {
        "file": [
            "Il file è troppo grande ({size} MB). La dimensione massima consentita è 15 MB." 
        ]
    }
}
				
			
  • File sent with Media Type other thanapplication/pdf ,application/x-pdf ,image/jpeg ,image/pjpeg orimage/png
				
					{
    "errors": {
        "file": [
            "Puoi caricare solo file pdf, immagini jpg o png" 
        ]
    }
}
				
			

The sent request contains invalid credentials. Check the shopId and headerX-Auth-Token . Find more info on credentials in the authentication paragraph.

				
					 {
     "error": "Access denied"
 }
				
			

Responses with this HTTP code indicate that a system error has occurred.

				
					{
    "errors": {
        "system": [
            "System error"
        ]
    }
}
				
			

Ciao!

Siamo on line dal lunedì al venerdì dalle 9.30 alle 12.30 e dalle 14.30 alle 17.30

Scrivici in questi orari, grazie!