Skip to content

Commit e33e482

Browse files
author
vagrant
committed
Specification
1 parent d3d9e75 commit e33e482

47 files changed

Lines changed: 419 additions & 121 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,62 @@ PDF Generator API allows you easily generate transactional PDF documents and red
44

55
The PDF Generator API features a web API architecture, allowing you to code in the language of your choice. This API supports the JSON media type, and uses UTF-8 character encoding.
66

7+
You can find our previous API documentation page with references to Simple and Signature authentication [here](https://docs.pdfgeneratorapi.com/legacy).
8+
9+
## Base URL
10+
The base URL for all the API endpoints is `https://us1.pdfgeneratorapi.com/api/v3`
11+
12+
For example
13+
* `https://us1.pdfgeneratorapi.com/api/v3/templates`
14+
* `https://us1.pdfgeneratorapi.com/api/v3/workspaces`
15+
* `https://us1.pdfgeneratorapi.com/api/v3/templates/123123`
16+
17+
## Editor
18+
PDF Generator API comes with a powerful drag & drop editor that allows to create any kind of document templates, from barcode labels to invoices, quotes and reports. You can find tutorials and videos from our [Support Portal](https://support.pdfgeneratorapi.com).
19+
* [Component specification](https://support.pdfgeneratorapi.com/en/category/components-1ffseaj/)
20+
* [Expression Language documentation](https://support.pdfgeneratorapi.com/en/category/expression-language-q203pa/)
21+
* [Frequently asked questions and answers](https://support.pdfgeneratorapi.com/en/category/qanda-1ov519d/)
22+
23+
## Definitions
24+
25+
### Organization
26+
Organization is a group of workspaces owned by your account.
27+
28+
### Workspace
29+
Workspace contains templates. Each workspace has access to their own templates and organization default templates.
30+
31+
### Master Workspace
32+
Master Workspace is the main/default workspace of your Organization. The Master Workspace identifier is the email you signed up with.
33+
34+
### Default Template
35+
Default template is a template that is available for all workspaces by default. You can set the template access type under Page Setup. If template has "Organization" access then your users can use them from the "New" menu in the Editor.
36+
37+
### Data Field
38+
Data Field is a placeholder for the specific data in your JSON data set. In this example JSON you can access the buyer name using Data Field `{paymentDetails::buyerName}`. The separator between depth levels is :: (two colons). When designing the template you don’t have to know every Data Field, our editor automatically extracts all the available fields from your data set and provides an easy way to insert them into the template.
39+
```
40+
{
41+
"documentNumber": 1,
42+
"paymentDetails": {
43+
"method": "Credit Card",
44+
"buyerName": "John Smith"
45+
},
46+
"items": [
47+
{
48+
"id": 1,
49+
"name": "Item one"
50+
}
51+
]
52+
}
53+
```
54+
55+
* * * * *
756
# Authentication
857
The PDF Generator API uses __JSON Web Tokens (JWT)__ to authenticate all API requests. These tokens offer a method to establish secure server-to-server authentication by transferring a compact JSON object with a signed payload of your account’s API Key and Secret.
958
When authenticating to the PDF Generator API, a JWT should be generated uniquely by a __server-side application__ and included as a __Bearer Token__ in the header of each request.
1059

60+
## Legacy Simple and Signature authentication
61+
You can find our legacy documentation for Simple and Signature authentication [here](https://docs.pdfgeneratorapi.com/legacy).
62+
1163
<SecurityDefinitions />
1264

1365
## Accessing your API Key and Secret
@@ -71,12 +123,13 @@ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE
71123
## Testing with JWTs
72124
You can create a temporary token in [Account Settings](https://pdfgeneratorapi.com/account/organization) page after you login to PDF Generator API. The generated token uses your email address as the subject (`sub`) value and is valid for __5 minutes__.
73125
You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API calls. These test tokens should never be used in production applications.
126+
* * * * *
74127

75128
# Libraries and SDKs
76129
## Postman Collection
77-
We have created a [Postman](https://www.postman.com) Collection so you can easily test all the API endpoints wihtout developing and code. You can download the collection [here](https://app.getpostman.com/run-collection/8f99146f64819f3e6db5) or just click the button below.
130+
We have created a [Postman](https://www.postman.com) Collection so you can easily test all the API endpoints wihtout developing and code. You can download the collection [here](https://app.getpostman.com/run-collection/329f09618ec8a957dbc4) or just click the button below.
78131

79-
[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/8f99146f64819f3e6db5)
132+
[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/329f09618ec8a957dbc4)
80133

81134
## Client Libraries
82135
All our Client Libraries are auto-generated using [OpenAPI Generator](https://openapi-generator.tech/) which uses the OpenAPI v3 specification to automatically generate a client library in specific programming language.
@@ -88,11 +141,12 @@ All our Client Libraries are auto-generated using [OpenAPI Generator](https://op
88141
* [Javascript Client](https://github.com/pdfgeneratorapi/javascript-client)
89142

90143
We have validated the generated libraries, but let us know if you find any anomalies in the client code.
144+
* * * * *
91145

92146

93147
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
94148

95-
- API version: 3.1.0
149+
- API version: 3.1.1
96150
- Package version: 1.0.0
97151
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
98152
For more information, please visit [https://support.pdfgeneratorapi.com](https://support.pdfgeneratorapi.com)
@@ -188,6 +242,7 @@ Class | Method | HTTP request | Description
188242
## Documentation For Models
189243

190244
- [Component](docs/Component.md)
245+
- [Data](docs/Data.md)
191246
- [InlineResponse200](docs/InlineResponse200.md)
192247
- [InlineResponse2001](docs/InlineResponse2001.md)
193248
- [InlineResponse2002](docs/InlineResponse2002.md)

docs/Component.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Template component definition
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**cls** | **str** | Defines component class/type | [optional]
8+
**id** | **str** | Component id | [optional]
89
**width** | **float** | Width in units | [optional]
910
**height** | **float** | Height in units | [optional]
1011
**top** | **float** | Position from the page top in units | [optional]

docs/Data.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Data
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **int** | | [optional]
7+
**name** | **str** | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/InlineResponse401.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**error** | **str** | Error description | [optional]
7-
**status** | **str** | HTTP Error code | [optional]
7+
**status** | **int** | HTTP Error code | [optional]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/InlineResponse403.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**error** | **str** | Error description | [optional]
7-
**status** | **str** | HTTP Error code | [optional]
7+
**status** | **int** | HTTP Error code | [optional]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/InlineResponse404.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**error** | **str** | Error description | [optional]
7-
**status** | **str** | HTTP Error code | [optional]
7+
**status** | **int** | HTTP Error code | [optional]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/InlineResponse422.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**error** | **str** | Error description | [optional]
7-
**status** | **str** | HTTP Error code | [optional]
7+
**status** | **int** | HTTP Error code | [optional]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/InlineResponse500.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**error** | **str** | Error description | [optional]
7-
**status** | **str** | HTTP Error code | [optional]
7+
**status** | **int** | HTTP Error code | [optional]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/Template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**id** | **int** | Unique identifier | [optional]
88
**name** | **str** | Template name | [optional]
99
**owner** | **bool** | Indicates if the workspace is the owner of the template | [optional]
10-
**modified** | **datetime** | Timestamp when the template was modified | [optional]
10+
**modified** | **str** | Timestamp when the template was modified | [optional]
1111
**tags** | **list[str]** | A list of tags assigned to a template | [optional]
1212

1313
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/TemplatesApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ This endpoint does not need any parameter.
426426
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
427427

428428
# **merge_template**
429-
> InlineResponse2004 merge_template(template_id, body, name=name, format=format, output=output)
429+
> InlineResponse2004 merge_template(template_id, data, name=name, format=format, output=output)
430430
431431
Merge template
432432

@@ -453,14 +453,14 @@ with pdf_generator_api_client.ApiClient(configuration) as api_client:
453453
# Create an instance of the API class
454454
api_instance = pdf_generator_api_client.TemplatesApi(api_client)
455455
template_id = 19375 # int | Template unique identifier
456-
body = None # object | Data used to generate the PDF. This can be JSON encoded string or a public URL to your JSON file.
456+
data = pdf_generator_api_client.Data() # Data | Data used to generate the PDF. This can be JSON encoded string or a public URL to your JSON file.
457457
name = 'My document' # str | Document name, returned in the meta data. (optional)
458458
format = 'pdf' # str | Document format. The zip option will return a ZIP file with PDF files. (optional) (default to 'pdf')
459459
output = 'base64' # str | Response format. (optional) (default to 'base64')
460460

461461
try:
462462
# Merge template
463-
api_response = api_instance.merge_template(template_id, body, name=name, format=format, output=output)
463+
api_response = api_instance.merge_template(template_id, data, name=name, format=format, output=output)
464464
pprint(api_response)
465465
except ApiException as e:
466466
print("Exception when calling TemplatesApi->merge_template: %s\n" % e)
@@ -471,7 +471,7 @@ output = 'base64' # str | Response format. (optional) (default to 'base64')
471471
Name | Type | Description | Notes
472472
------------- | ------------- | ------------- | -------------
473473
**template_id** | **int**| Template unique identifier |
474-
**body** | **object**| Data used to generate the PDF. This can be JSON encoded string or a public URL to your JSON file. |
474+
**data** | [**Data**](Data.md)| Data used to generate the PDF. This can be JSON encoded string or a public URL to your JSON file. |
475475
**name** | **str**| Document name, returned in the meta data. | [optional]
476476
**format** | **str**| Document format. The zip option will return a ZIP file with PDF files. | [optional] [default to &#39;pdf&#39;]
477477
**output** | **str**| Response format. | [optional] [default to &#39;base64&#39;]

0 commit comments

Comments
 (0)