# Uploading to SDS

In order to transfer a file to SDS, you execute an HTTP POST request which needs to contain the following information:

  1. Credentials — the requests are authenticated using Basic authentication, where the username is your service name and the password is the same as in your web service requests. Signicat Support will help you acquire the correct credentials for your integration. In production you will need a client certificate as well. See Get a client SSL web service certificate for step-by-step instructions.
  2. Content-Type — must reflect the type of content you're uploading, i.e. application/pdf for PDF, text/plain for text, or application/x-ltv-sdo for XAdES.
  3. Body — simply put the file contents in the request body.

# Example HTTP request

POST https://preprod.signicat.com/doc/demo/sds HTTP/1.1
Content-Type: application/pdf
Authorization: Basic c2hhcmVkOkJvbmQwMDc=
Host: preprod.signicat.com
Content-Length: 688343
Expect: 100-continue

%PDF-1.5
%âãÏÓ
1 0 obj
<</Metadata 2 0 R/OCProperties<</D<</OFF[10 0 R 11 0 R 12 0 R]/ON[13 0 R 14 0 R 15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R 29 0 R 30 0 R]/Order 31 0 R/RBGroups[]>>/OCGs[10 0 R 13 0 R 14 0 R 15 0 R 16 0 R 17 0 R 18 0 R 11 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 12 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R 29 0 R 30 0 R]>>/Pages 3 0 R/Type/Catalog>>
[a lot of PDF mumbo jumbo here] >>
startxref
683190
%%EOF

# Example HTTP response

HTTP/1.1 100 Continue
HTTP/1.1 201 Created
Date: Wed, 21 Aug 2013 10:04:44 GMT
Set-Cookie: JSESSIONID=60CDAA2C7E7C5B202F58DA00715327AF.test01; Path=/doc; Secure
Location: http://localhost:8085/acme/21082013yuhu3a80c1kofj1baarn1gozk32hphh9jcy6i5h9a3qk2ca7z
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 57

21082013yuhu3a80c1kofj1baarn1gozk32hphh9jcy6i5h9a3qk2ca7z

# Response codes

A successful request results in a HTTP 201 Created response. Other HTTP codes you may receive are:

  • HTTP 400 Bad Request — most likely, your request is syntactically incorrect and could not be understood by the server.
  • HTTP 500 Internal Server Error — the service failed to complete your request for undisclosed reasons.

Given a successful request, the response body will contain a string which may be up to 64 characters long. The document is guaranteed to remain on the server for 30 minutes, after which it will be deleted unless it has been used in a subsequent web service request.

Last updated: 3/1/2021, 12:00:45 AM