upload_file


POST  - Add a file

In the scope of merchant and guarantor contract, to build beam of evidence, adding supporting document can be mandatory.

upload_file action let transmit documents. If the files are required by merchant parameters, the transmission must occur before create_mandate action

On usage, verification processing of the various provided parts (files) of this beam of evidence can take place. These checks may result in some of the files being rejected. This control process is driven by the "Verification Mode", which makes it possible, amongst other things, to force the upload in case the document may not be readable.

When creating a mandate, all the parts are automaticaly linked with the mandate. If the mandate already exists, the parts are directly linked to it. In case of a mandate renewal, the parts must be sent again.


Argument Description Type - Length Example Mandatory
safedebit_consumer_referenceSafedebit consumer referenceString - 35YES
file_data *File in base64Stringbase64Binary
YES
file_type *File typeChar - 11: mandate
2 : Identity
3 : IBAN
4 : KBIS
5 : Other
YES
file_description **File descriptionString - 256NO
file_verifVerification modeString - 2561 : Failure : No upload in case of a check failure
2 : Read failure : Upload continues unless read failure. Result of check is transfered in verif parameter.
The default behavior depends on the merchant settings (1 if service available, no check if service not available).
NO



Kbis ( result check )


Argument Description Type
readableFile readabletrue or false
validKBis verified as per Infogreffetrue or false
expiredExpired KBis (more than 3 months)true or false
social_referenceValid corporate nametrue or false
sirenValid SIRENtrue or false

Request

POST /xxxx/upload_file HTTP/1.1
Host: xxx.xxxxxxxx.fr
Authorization: Basic JQheySHkalSNuakkmSmm==
Content-Type: application/json
Accept: application/json


{
"safedebit_consumer_reference": "XXXXXX",
"file_type": "2",
"file_data": "XjljSHJKhbJSHjkS...........",
"file_description": "CNI"}
                                                
If the file is successfully added

Response

HTTP/1.1 200 OK
Content-Type: application/json


{
    "result" : true,
    "file_key" : "xxxxxx"
}
                                        


If addition failed

Response

HTTP/1.1 200 OK
Content-Type: application/json


{
    "result" : false,
    "code" : "XXXX"
}
                                        


Argument Description
result true or false :
true : action succeeded
false : action failed
file_key A unique key for each file to be used for fetching of the latter
code See (error codes in annex).
verif Json table of details of the result of the verification
Only present if the verification has taken place
Authorized extensions : gif,jpeg,jpg,png,pdf.
Thanks to fill-in all the mandatory fields
Request

HTTP/1.1 200 OK
POST /ssp/upload_file HTTP/1.1
Host: xxx.safedebit.fr
Authorization: Basic JQheySHkalSNuakkmSmm==
Content-Type: application/json
Accept: application/json