Document Upload with JSON Request
The endpoint for multipart message uploads is POST /api/v2/Document/Uploads with Content-Type: application/json:
Request
POST /api/v2/Document/Uploads HTTP/1.1
Host: connect-testing.secupay-ag.de
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
{
"name"
:
"Gewerbeanmeldung"
,
"type"
:
"application/pdf"
,
"content"
:
"JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMg...GCg=="
}
The parameters name and type are optional but recommended. The field content takes the Base64 encoded file.
The API responds with an representation of the created file object.
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"object"
:
"document.uploads"
,
"id"
:
"DUP_8Z092GGNK60KD94JPZFKYDS6C67X4C"
,
"created"
:
"2018-08-01T08:00:30+02:00"
}
Response parameters:
Parameter |
Meaning |
object |
always document.uploads |
id |
ID of uploaded file; needed for subsequent API requests |
created |
date and time of the upload |
The file content is not contained in the object representation.