PDFrePRO API documentation version v3
https://api.pdfrepro.de/v3
Welcome
The PDFrePRO-API allows you to connect your application to our services to design PDF-Templates and create PDFs. More informations, codesamples and descriptions are available on our Documentation page and in our Manual.
Important note
Before you start using our PDFrePRO-API, please make sure you have everything configured correctly in your account in our Portal. When you are intending to integrate our PDFrePRO-WYSIWYG-Editor into your own application you need to set up a success- and abort-url as follow-up urls to let the Editor know where to redirect to when you want to leave the editor.
/placeholders
Returns a list of all available placeholders of your PDFrePRO account.
Creates a new placeholder in your PDFrePRO account.
get /placeholders
Returns a list of all available placeholders of your PDFrePRO account.
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 200
OK - The list of available placeholders got returned, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": false,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"placeholders":
{
"description": "All available placeholders of your PDFrePRO account.",
"required": true,
"type": "array",
"properties":
{
"description": "One of the available placeholders.",
"required": true,
"type": "object",
"properties":
{
"id":
{
"description": "The ID of the placeholder.",
"required": true,
"type": "string"
},
"name":
{
"description": "The name of the placeholder.",
"required": true,
"type": "string"
},
"readonly":
{
"description": "The readonly flag.",
"required": true,
"type": "boolean"
},
"lastModificationDate":
{
"description": "The date of the last time, the placeholder got modified.",
"required": true,
"type": "string"
},
"numberOfReferencedTemplates":
{
"description": "The number of templates, which are using the placeholder.",
"required": true,
"type": "integer"
}
}
}
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"placeholders":
[
{
"id": "041c3014741206c385e6e333080eab561a3106dc",
"name": "Customer Information",
"readonly": false,
"lastModificationDate": "2017-08-10 15:36:34",
"numberOfReferencedTemplates": 3
},
{
"id": "27033155cd407377f4c1435427c8d8de875e5a57",
"name": "Copy of Customer Information",
"readonly": false,
"lastModificationDate": "2017-08-10 15:36:37",
"numberOfReferencedTemplates": 2
},
{
"id": "4f91084db808aa058fc909b1813bc08c992db381",
"name": "PDFrePRO_Example",
"readonly": true,
"lastModificationDate": "2017-09-01 09:28:40",
"numberOfReferencedTemplates": 1
}
]
}
}
HTTP status code 204
No Content - There are no placeholders available.
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
post /placeholders
Creates a new placeholder in your PDFrePRO account.
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
- Content-Type: required (string)
Used to get details about the type of content.
Example:
Content-Type: application/json;charset=utf-8
- Content-Length: required (string)
Used to get details about the length of content.
Example:
Content-Length: 50
Body
Type: application/json
Schema:
{
"description": "The request body.",
"required": true,
"type": "object",
"properties":
{
"name":
{
"description": "The name of the new placeholder.",
"pattern": "The name is allowed to have 1-50 characters. Allowed characters are all alphanumerical characters, '.', '-', '_', ' ', '(', ')', 'ß', 'ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'.",
"required": true,
"type": "string"
},
"data":
{
"description": "The JSON-encoded raw data for the new placeholder.",
"required": true,
"type": "string"
}
}
}
Example:
{
"name": "Customer Basic Information",
"data": "{\"First Name\":\"Max\",\"Last Name\":\"Mustermann\",\"Birthdate\":\"1958-05-11\"}"
}
HTTP status code 201
Created - The placeholder got created, successfully.
Headers
- Location: (string)
Used to return a relative URL to the new placeholder.
Example:
Location: /v3/placeholders/3a7abab9-56b5-4b3f-a333-48a2cb333fcb
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"url":
{
"description": "A relative URL to the created placeholder.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 201,
"status": "success",
"data":
{
"url": "/v3/placeholders/041c3014741206c385e6e333080eab561a3106dc"
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 411
Length Required - The request has no 'Content-Length'-header.
Body
Type: application/json
Example:
{
"code": 411,
"status": "error",
"message": "Content-Length header is missing.",
"data": "Length Required"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
Returns a placeholder (information about it and its raw data).
Copies a placeholder.
Updates a placeholder.
Deletes a placeholder.
get /placeholders/{placeholderId}
Returns a placeholder (information about it and its raw data).
URI Parameters
- placeholderId: required (string)
The ID of the placeholder, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/placeholders/2c6323df-6a06-4687-8566-9c4f6bc0d3f5
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 200
OK - The placeholder got returned, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"id":
{
"description": "The ID of the requested placeholder.",
"required": true,
"type": "string"
},
"name":
{
"description": "The name of the requested placeholder.",
"required": true,
"type": "string"
},
"readonly":
{
"description": "The readonly flag.",
"required": true,
"type": "boolean"
},
"lastModificationDate":
{
"description": "The date of the last time, the requested placeholder got modified.",
"required": true,
"type": "string"
},
"numberOfReferencedTemplates":
{
"description": "The number of templates, which are using the requested placeholder.",
"required": true,
"type": "integer"
},
"rawData":
{
"description": "The JSON-encoded raw data of the requested placeholder.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"id": "041c3014741206c385e6e333080eab561a3106dc",
"name": "Customer Information",
"readonly": false,
"lastModificationDate": "2017-08-10 15:36:34",
"numberOfReferencedTemplates": 3,
"rawData": "{\"First Name\":\"Max\",\"Last Name\":\"Mustermann\",\"Birthdate\":\"1958-05-11\",\"City\":\"Berlin\",\"Address\":\"Fuchsbau 12\"}"
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
post /placeholders/{placeholderId}
Copies a placeholder.
URI Parameters
- placeholderId: required (string)
The ID of the placeholder, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/placeholders/2c6323df-6a06-4687-8566-9c4f6bc0d3f5
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
- Content-Type: required (string)
Used to get details about the type of content.
Example:
Content-Type: application/json;charset=utf-8
- Content-Length: required (string)
Used to get details about the length of content.
Example:
Content-Length: 50
Body
Type: application/json
Schema:
{
"description": "The request body.",
"required": false,
"type": "object",
"properties":
{
"name":
{
"description": "The new name of the copied placeholder.",
"pattern": "The name is allowed to have 1-50 characters. Allowed characters are all alphanumerical characters, '.', '-', '_', ' ', '(', ')', 'ß', 'ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'.",
"required": false,
"type": "string"
}
}
}
Example:
{
"name": "Copy of Customer Information"
}
HTTP status code 201
Created - The placeholder got copied, successfully.
Headers
- Location: (string)
Used to return a relative URL to the copied placeholder.
Example:
Location: /v3/placeholders/3a7abab9-56b5-4b3f-a333-48a2cb333fcb
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"url":
{
"description": "A relative URL to the copied placeholder.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 201,
"status": "success",
"data":
{
"url": "/v3/placeholders/27033155cd407377f4c1435427c8d8de875e5a57"
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 411
Length Required - The request has no 'Content-Length'-header.
Body
Type: application/json
Example:
{
"code": 411,
"status": "error",
"message": "Content-Length header is missing.",
"data": "Length Required"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
put /placeholders/{placeholderId}
Updates a placeholder.
URI Parameters
- placeholderId: required (string)
The ID of the placeholder, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/placeholders/2c6323df-6a06-4687-8566-9c4f6bc0d3f5
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
- Content-Type: required (string)
Used to get details about the type of content.
Example:
Content-Type: application/json;charset=utf-8
- Content-Length: required (string)
Used to get details about the length of content.
Example:
Content-Length: 50
Body
Type: application/json
Schema:
{
"description": "The request body.",
"required": true,
"type": "object",
"properties":
{
"name":
{
"description": "The updated name of the placeholder.",
"pattern": "The name is allowed to have 1-50 characters. Allowed characters are all alphanumerical characters, '.', '-', '_', ' ', '(', ')', 'ß', 'ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'.",
"required": false,
"type": "string"
},
"data":
{
"description": "The updated JSON-encoded raw data of the placeholder.",
"required": false,
"type": "string"
}
}
}
Example:
{
"name": "Customer Basic Information",
"data": "{\"First Name\":\"Max\",\"Last Name\":\"Mustermann\",\"Birthdate\":\"1958-05-11\"}"
}
HTTP status code 200
OK - The placeholder got updated, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"url":
{
"description": "A relative URL to the updated placeholder.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"url": "/v3/placeholders/041c3014741206c385e6e333080eab561a3106dc"
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 409
Conflict - The request cannot be executed caused by existing reference(s) or the dataset is readonly
Body
Type: application/json
Example:
{
"code": 409,
"status": "error",
"message": "Your request cannot be executed.",
"data": "Conflict"
}
HTTP status code 411
Length Required - The request has no 'Content-Length'-header.
Body
Type: application/json
Example:
{
"code": 411,
"status": "error",
"message": "Content-Length header is missing.",
"data": "Length Required"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
delete /placeholders/{placeholderId}
Deletes a placeholder.
URI Parameters
- placeholderId: required (string)
The ID of the placeholder, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/placeholders/2c6323df-6a06-4687-8566-9c4f6bc0d3f5
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 204
No Content - The placeholder got deleted, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": false,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
}
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 409
Conflict - The request cannot be executed caused by existing reference(s) or the dataset is readonly
Body
Type: application/json
Example:
{
"code": 409,
"status": "error",
"message": "Your request cannot be executed.",
"data": "Conflict"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
Returns a list of all templates, which are using the placeholder.
get /placeholders/{placeholderId}/templates
Returns a list of all templates, which are using the placeholder.
URI Parameters
- placeholderId: required (string)
The ID of the placeholder, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/placeholders/2c6323df-6a06-4687-8566-9c4f6bc0d3f5
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 200
OK - The list of templates, which are using the placeholder, got returned, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"templates":
{
"description": "All templates, which are using the placeholder with the corresponding ID.",
"required": true,
"type": "array",
"properties":
{
"description": "One of the templates, which is using the placeholder with the corresponding ID.",
"required": false,
"type": "object",
"properties":
{
"id":
{
"description": "The ID of the template.",
"required": true,
"type": "string"
},
"name":
{
"description": "The name of the template.",
"required": true,
"type": "string"
},
"description":
{
"description": "The description of the template.",
"required": false,
"type": "string"
},
"lastModificationDate":
{
"description": "The date of the last time, the template got modified.",
"required": true,
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"templates":
[
{
"id": "0f7744f525e81a1d5fc2fc9d88109c244ae81683",
"name": "PDFrePRO_Example",
"description": "An example, how to use PDFrePRO.",
"lastModificationDate": "2017-08-10 15:38:10"
},
{
"id": "2ee5a4a2058f9bc4209da49f4084772707e4a90b",
"name": "PDFrePRO_Example_2",
"description": "Another example, how to use PDFrePRO.",
"lastModificationDate": "2017-08-10 15:38:15"
},
{
"id": "41f6433b900fbc1cf1e25a6d167d1a1cb5ba5dbf",
"name": "PDFrePRO_Example_3",
"description": "A third example, how to use PDFrePRO.",
"lastModificationDate": "2017-09-01 12:02:10"
}
]
}
}
HTTP status code 204
No Content - There are no templates, using the placeholder.
Body
Type: application/json
Example:
{
"code": 204,
"status": "success",
"data":
{
"templates": []
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
/templates
Returns a list of all available templates of your PDFrePRO account.
Creates a new template.
get /templates
Returns a list of all available templates of your PDFrePRO account.
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 200
OK - The list of available templates got returned, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": false,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"templates":
{
"description": "All available templates of your PDFrePRO account.",
"required": true,
"type": "array",
"properties":
{
"description": "One of the available templates.",
"required": true,
"type": "object",
"properties":
{
"id":
{
"description": "The ID of the template.",
"required": true,
"type": "string"
},
"name":
{
"description": "The name of the template.",
"required": true,
"type": "string"
},
"description":
{
"description": "The description of the template.",
"required": false,
"type": "string"
},
"lastModificationDate":
{
"description": "The date of the last time, the template got modified.",
"required": true,
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"templates":
[
{
"id": "0f7744f525e81a1d5fc2fc9d88109c244ae81683",
"name": "PDFrePRO_Example",
"description": "An example, how to use PDFrePRO.",
"lastModificationDate": "2017-08-10 15:38:10"
},
{
"id": "2ee5a4a2058f9bc4209da49f4084772707e4a90b",
"name": "PDFrePRO_Example_2",
"description": "Another example, how to use PDFrePRO.",
"lastModificationDate": "2017-08-10 15:38:15"
},
{
"id": "41f6433b900fbc1cf1e25a6d167d1a1cb5ba5dbf",
"name": "PDFrePRO_Example_3",
"description": "A third example, how to use PDFrePRO.",
"lastModificationDate": "2017-09-01 12:02:10"
}
]
}
}
HTTP status code 204
No Content - There are no templates available.
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
post /templates
Creates a new template.
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
- Content-Type: required (string)
Used to get details about the type of content.
Example:
Content-Type: application/json;charset=utf-8
- Content-Length: required (string)
Used to get details about the length of content.
Example:
Content-Length: 50
Body
Type: application/json
Schema:
{
"description": "The request body.",
"required": true,
"type": "object",
"properties":
{
"name":
{
"description": "The name of the new template.",
"pattern": "The name is allowed to have 1-50 characters. Allowed characters are all alphanumerical characters, '.', '-', '_', ' ', '(', ')', 'ß', 'ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'.",
"required": true,
"type": "string"
},
"description":
{
"description": "The description of the new template.",
"pattern": "Allowed maximal length is 4096 characters.",
"required": false,
"type": "string"
},
"placeholderIds":
{
"description": "An array, containing all IDs of placeholders, which the new template shall use.",
"required": false,
"type": "array",
"properties":
{
"description": "The ID of a placeholder, which the new template shall use.",
"required": false,
"type": "string"
}
}
}
}
Example:
{
"name": "PDFrePRO_Example",
"description": "An example, how to use PDFrePRO.",
"placeholderIds":
[
"041c3014741206c385e6e333080eab561a3106dc",
"27033155cd407377f4c1435427c8d8de875e5a57",
"4f91084db808aa058fc909b1813bc08c992db381"
]
}
HTTP status code 201
Created - The template got created, successfully.
Headers
- Location: (string)
Used to return a relative URL to the new template.
Example:
Location: /v3/templates/accb482f-617d-416a-b13d-71aae89e9eea
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"url":
{
"description": "A relative URL to the created template.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 201,
"status": "success",
"data":
{
"url": "/v3/templates/0f7744f525e81a1d5fc2fc9d88109c244ae81683"
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 411
Length Required - The request has no 'Content-Length'-header.
Body
Type: application/json
Example:
{
"code": 411,
"status": "error",
"message": "Content-Length header is missing.",
"data": "Length Required"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
Returns all informations about one template, including effectively used fields of assigned placeholders
Copies a template.
Updates a template.
Deletes a template.
get /templates/{templateId}
Returns all informations about one template, including effectively used fields of assigned placeholders
URI Parameters
- templateId: required (string)
The ID of the template, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/templates/47f35cc4-e61b-4d60-a83a-5ea1e89e67ab
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 200
OK - The requested template got returned, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": false,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"id":
{
"description": "The ID of the template.",
"required": true,
"type": "string"
},
"name":
{
"description": "The name of the template.",
"required": true,
"type": "string"
},
"description":
{
"description": "The description of the template.",
"required": false,
"type": "string"
},
"lastModificationDate":
{
"description": "The date of the last time, the template got modified.",
"required": true,
"type": "string"
},
"usedPlaceholders":
{
"description": "List of the placeholders used in this template",
"required": false,
"type": "array",
"properties":
{
"description": "Placeholder group and name, joined with a period",
"required": true,
"type": "string"
}
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"id": "0f7744f525e81a1d5fc2fc9d88109c244ae81683",
"name": "PDFrePRO_Example",
"description": "An example, how to use PDFrePRO.",
"lastModificationDate": "2017-08-10 15:38:10",
"usedPlaceholders": [ "customer.name", "customer.street", "customer.phone" ]
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
post /templates/{templateId}
Copies a template.
URI Parameters
- templateId: required (string)
The ID of the template, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/templates/47f35cc4-e61b-4d60-a83a-5ea1e89e67ab
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
- Content-Type: required (string)
Used to get details about the type of content.
Example:
Content-Type: application/json;charset=utf-8
- Content-Length: required (string)
Used to get details about the length of content.
Example:
Content-Length: 50
Body
Type: application/json
Schema:
{
"description": "The request body.",
"required": true,
"type": "object",
"properties":
{
"name":
{
"description": "The new name of the copied template.",
"pattern": "The name is allowed to have 1-50 characters. Allowed characters are all alphanumerical characters, '.', '-', '_', ' ', '(', ')', 'ß', 'ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'.",
"required": false,
"type": "string"
},
"description":
{
"description": "The new description of the copied template.",
"pattern": "Allowed maximal length is 4096 characters.",
"required": false,
"type": "string"
}
}
}
Example:
{
"name": "PDFrePRO_Example_2",
"description": "Another example, how to use PDFrePRO."
}
HTTP status code 201
Created - The template got copied, successfully.
Headers
- Location: (string)
Used to return a relative URL to the copied template.
Example:
Location: /v3/templates/47f35cc4-e61b-4d60-a83a-5ea1e89e67ab
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"url":
{
"description": "A relative URL to the copied template.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 201,
"status": "success",
"data":
{
"url": "/v3/templates/2ee5a4a2058f9bc4209da49f4084772707e4a90b"
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 411
Length Required - The request has no 'Content-Length'-header.
Body
Type: application/json
Example:
{
"code": 411,
"status": "error",
"message": "Content-Length header is missing.",
"data": "Length Required"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
put /templates/{templateId}
Updates a template.
URI Parameters
- templateId: required (string)
The ID of the template, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/templates/47f35cc4-e61b-4d60-a83a-5ea1e89e67ab
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
- Content-Type: required (string)
Used to get details about the type of content.
Example:
Content-Type: application/json;charset=utf-8
- Content-Length: required (string)
Used to get details about the length of content.
Example:
Content-Length: 50
Body
Type: application/json
Schema:
{
"description": "The request body.",
"required": true,
"type": "object",
"properties":
{
"name":
{
"description": "The updated name of the template.",
"pattern": "The name is allowed to have 1-50 characters. Allowed characters are all alphanumerical characters, '.', '-', '_', ' ', '(', ')', 'ß', 'ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'.",
"required": false,
"type": "string"
},
"description":
{
"description": "The updated description of the template.",
"pattern": "Allowed maximal length is 4096 characters.",
"required": false,
"type": "string"
},
"placeholderIds":
{
"description": "An updated array, containing all IDs of placeholders, which the template shall use. The IDs of Placeholders, which are already placed in the template, must be in the array.",
"required": false,
"type": "array",
"properties":
{
"description": "The ID of a placeholder, which the template shall use.",
"required": false,
"type": "string"
}
}
}
}
Example:
{
"name": "PDFrePRO Example",
"description": "An updated example, how to use PDFrePRO.",
"placeholderIds":
[
"f41eca4973e3353b85ce4a7a25ba37c6eb97bc5d",
"04ff23fbe3a06851e8315b1e9f3097b98000d444",
"87554f8a2cd1bda87aec40b623a6a7265bb0a214"
]
}
HTTP status code 200
OK - The template got updated, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"url":
{
"description": "A relative URL to the updated template.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"url": "/v3/templates/0f7744f525e81a1d5fc2fc9d88109c244ae81683"
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 411
Length Required - The request has no 'Content-Length'-header.
Body
Type: application/json
Example:
{
"code": 411,
"status": "error",
"message": "Content-Length header is missing.",
"data": "Length Required"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
delete /templates/{templateId}
Deletes a template.
URI Parameters
- templateId: required (string)
The ID of the template, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/templates/47f35cc4-e61b-4d60-a83a-5ea1e89e67ab
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 204
No Content - The template got deleted, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": false,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
}
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
Returns a list of all placeholders, which are used by a template.
get /templates/{templateId}/placeholders
Returns a list of all placeholders, which are used by a template.
URI Parameters
- templateId: required (string)
The ID of the template, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/templates/47f35cc4-e61b-4d60-a83a-5ea1e89e67ab
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 200
OK - The list of placeholders, which are used by the template, got returned, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"placeholders":
{
"description": "All placeholders, which are used by the template with the corresponding ID.",
"required": true,
"type": "array",
"properties":
{
"description": "One of the placeholders, which is used by the template with the corresponding ID.",
"required": true,
"type": "object",
"properties":
{
"id":
{
"description": "The ID of the placeholder.",
"required": true,
"type": "string"
},
"name":
{
"description": "The name of the placeholder.",
"required": true,
"type": "string"
},
"readonly":
{
"description": "The readonly flag.",
"required": true,
"type": "boolean"
},
"lastModificationDate":
{
"description": "The date of the last time, the placeholder got modified.",
"required": true,
"type": "string"
},
"numberOfReferencedTemplates":
{
"description": "The number of templates, which are using the placeholder.",
"required": true,
"type": "integer"
}
}
}
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"placeholders":
[
{
"id": "041c3014741206c385e6e333080eab561a3106dc",
"name": "Customer Information",
"readonly": false,
"lastModificationDate": "2017-08-10 15:36:34",
"numberOfReferencedTemplates": 3
},
{
"id": "27033155cd407377f4c1435427c8d8de875e5a57",
"name": "Copy of Customer Information",
"readonly": false,
"lastModificationDate": "2017-08-10 15:36:37",
"numberOfReferencedTemplates": 2
},
{
"id": "4f91084db808aa058fc909b1813bc08c992db381",
"name": "PDFrePRO_Example",
"readonly": false,
"lastModificationDate": "2017-09-01 09:28:40",
"numberOfReferencedTemplates": 1
}
]
}
}
HTTP status code 204
No Content - There are no placeholders used in the template.
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
Returns an URL, which initializes the WYSIWYG-editor, for editing the template.
get /templates/{templateId}/editor-url
Returns an URL, which initializes the WYSIWYG-editor, for editing the template.
URI Parameters
- templateId: required (string)
The ID of the template, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/templates/47f35cc4-e61b-4d60-a83a-5ea1e89e67ab
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
HTTP status code 200
OK - The URL, which can be used to start the WYSIWYG-editor, got returned, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"url":
{
"description": "An URL, which opens the WYSIWYG-editor, for editing the template with the corresponding ID.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 200,
"status": "success",
"data":
{
"url": "https://editor.pdfrepro.de/editor?token=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}
Produces a PDF, by filling raw data into placeholders, which are placed in the template.
post /templates/{templateId}/pdf
Produces a PDF, by filling raw data into placeholders, which are placed in the template.
URI Parameters
- templateId: required (string)
The ID of the template, on which the request shall be called.
Example:
https://api.pdfrepro.de/v3/templates/47f35cc4-e61b-4d60-a83a-5ea1e89e67ab
Headers
- Authorization: required (string)
Used for authentication. The authorization-header consists of three parts:
[authentication scheme] [apiKey]:[signature]
The authentication scheme is used to describe the method of authentication. Only 'SharedKey' is accepted. The apiKey is one of your available 'apiKey's of your PDFrePRO account. The signature is a HashMAC and is build the following way:
StringToSign = apiKey + "\n" +
Request-Method + "\n" +
Resource + "\n" +
Host + "\n" +
if(Content) ? MD5(Content) : "" + "\n" +
Accept-Header + "\n" +
if(Content) ? Content-Type-Header : "" + "\n" +
if(Content) ? Content-Length-Header : "" + "\n" +
Date-Header + "\n";Signature = HMAC-SHA256(YourSharedKey, UTF-8-Encoding-Of(StringToSign));
Example:
StringToSign = "srkJAozkNgYKp1dQKyKb" + "\n" +
"GET" + "\n" +
"/v3/templates" + "\n" +
"api.pdfrepro.de" + "\n" +
"" + "\n" +
"application/json;charset=utf8" + "\n" +
"" + "\n" +
"" + "\n" +
"Thu, 10 Aug 2017 12:25:31 GMT" + "\n";Signature = HMAC-SHA256(9ZGbqHtUXTRvq7aXhKbrj4OntHoAeXnGXJIWu \ qNJcaCvW6xiqB21O4JJO3OB51MN, UTF-8-Encoding-Of(StringToSign));
Example:
Authorization: SharedKey srkJAozkNgYKp1dQKyKb:697d7d149ed02f91d0bb7e05dfd66e16298fe5201e849fc4cf139fa666fe434f
- Accept: required (string)
Used to create the requested content in an accepted format.
Example:
Accept: application/json;charset=utf-8
- Date: required (string)
Used to get the time, at which the request was send.
Notes:
The date must be in preferred format of specification "RFC 7231, section 7.1.1.2: Date" (see example).
The date header will be validated. Requests, which have a date older than 60 seconds will be rejected.Example:
Date: Thu, 10 Aug 2017 12:25:34 GMT
- Content-Type: required (string)
Used to get details about the type of content.
Example:
Content-Type: application/json;charset=utf-8
- Content-Length: required (string)
Used to get details about the length of content.
Example:
Content-Length: 50
Body
Type: application/json
Schema:
{
"description": "The request body.",
"required": false,
"type": "object",
"properties":
{
"data":
{
"description": "The JSON-encoded raw data, the placeholders (placed in the template) will filled with while printing.",
"required": false,
"type": "string"
},
"language":
{
"description": "The print language in ISO 639-1 format or as IETF language code (the ISO 631-1 language code and for the country the ISO 3166-1 alpha-2 code, delimited with a minus character)",
"required": false,
"type": "string"
}
}
}
Example:
{
"data": "{\"Customer Information\":{\"First Name\":\"Max\",\"Last Name\":\"Mustermann\",\"Birthdate\":\"1958-05-11\",\"City\":\"Berlin\",\"Address\":\"Fuchsbau 12\"}}",
"language": "en-GB"
}
HTTP status code 201
OK - The PDF got created, successfully.
Headers
- Content-Type: required (string - default: application/json)
Used to give details about the type of content.
NOTE: This header will be send with every response of this request method.
Example:
Content-Type: application/json;charset=utf8
- Allow: (string)
Used to return a list of all allowed HTTP request methods on this URI.
Example:
Allow: GET, POST
Body
Type: application/json
Schema:
/* This schema can be applied to every response of this request method. */
{
"description": "The response body.",
"required": true,
"type": "object",
"properties":
{
"code":
{
"description": "The HTTP status code of this response.",
"required": true,
"type": "integer"
},
"status":
{
"description": "The status of this response.",
"required": true,
"type": "string",
"enum":
{
"error": "For HTTP status codes from 400-499.",
"fail": "For HTTP status codes from 500-599.",
"success": "For all other HTTP status codes."
}
},
"message":
{
"description": "Only used for the statuses 'error' and 'fail'. It contains the error-message.",
"required": false,
"type": "string"
},
"data":
{
"description": "The body of this HTTP response. In case of 'error' or 'fail', it contains the cause or exception name.",
"required": true,
"type": "object or string",
"properties":
{
"pdf":
{
"description": "A Base64-encoded string representation of the printed PDF.",
"required": true,
"type": "string"
}
}
}
}
}
Example:
{
"code": 201,
"status": "success",
"data":
{
"pdf": "data:application/pdf;base64,UERGcmVQUk8="
}
}
HTTP status code 400
Bad Request - The request has at least one failure.
Body
Type: application/json
Example:
{
"code": 400,
"status": "error",
"message": "Missing date header.",
"data": "Bad Request"
}
HTTP status code 401
Unauthorized - The authorization-header doesn't authorize your request on this resource.
Body
Type: application/json
Example:
{
"code": 401,
"status": "error",
"message": "Your authorization header doesn't authorize your request.",
"data": "Unauthorized"
}
HTTP status code 404
Not Found - The resource could not be found.
Body
Type: application/json
Example:
{
"code": 404,
"status": "error",
"message": "The resource could not be found.",
"data": "Not Found"
}
HTTP status code 405
Method Not Allowed - This request method is not allowed on this URI.
Body
Type: application/json
Example:
{
"code": 405,
"status": "error",
"message": "This HTTP request method is not allowed.",
"data": "Method Not Allowed"
}
HTTP status code 406
Not Acceptable - The request is valid, but either the resource cannot be provided in a format, specified in the accept-header of the request, or the content, provided by the request, isn't in an acceptable format.
Body
Type: application/json
Example:
{
"code": 406,
"status": "error",
"message": "The requested content can't be provided in the requested format.",
"data": "Not Acceptable"
}
HTTP status code 408
Request Time-out - The request is expired, due to an time-out of the date-header.
Body
Type: application/json
Example:
{
"code": 408,
"status": "error",
"message": "Your request is expired.",
"data": "Request Time-out"
}
HTTP status code 411
Length Required - The request has no 'Content-Length'-header.
Body
Type: application/json
Example:
{
"code": 411,
"status": "error",
"message": "Content-Length header is missing.",
"data": "Length Required"
}
HTTP status code 500
Internal Server Error - Something went wrong. Try it again, later.
Body
Type: application/json
Example:
{
"code": 500,
"status": "fail",
"message": "Something went wrong. Try it again, later.",
"data": "Internal Server Error"
}