Overview
Components
-
API doc [1.4.0]
-
User management service [1.4.0]
-
Upload service [1.4.0]
-
Company service [1.4.0]
-
Download service [1.4.0]
HTTP verbs
RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.
Verb | Usage |
---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to replace an existing resource |
|
Used to update an existing resource, including partial updates |
|
Used to delete an existing resource |
RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.
Status code | Usage |
---|---|
|
The request completed successfully |
|
A new resource has been created successfully. The resource’s URI is available from the response’s
|
|
An update to an existing resource has been applied successfully |
|
The request was malformed. The response body will include an error providing further information |
|
The request is unauthorized |
|
The requested resource did not exist |
Authentication and Authorization
Authorization header
Each api call should contain "Authorization" header. Example:
GET /v1/upload HTTP/1.1
Authorization: Bearer {JWT_ACCESS_TOKEN}
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_USER
Host: localhost:8080
JWT_ACCESS_TOKEN required for each call should be requested from Cognito identity provider. See https://docs.aws.amazon.com/cognito/latest/developerguide/authentication.html
Example login Request
POST https://cognito-idp.eu-central-1.amazonaws.com
Content-Type: application/x-amz-json-1.1
X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth
{
"AuthParameters" : {
"USERNAME": "Some@Email",
"PASSWORD": "SecretPassword"
},
"AuthFlow": "USER_PASSWORD_AUTH",
"ClientId": "<CLIENT_ID>"
}
CLIENT_ID can be provided by support team on request.
Example login response
HTTP/1.1 200 OK
Content-Type: application/x-amz-json-1.1
Content-Length: 4148
{
"AuthenticationResult": {
"AccessToken":"JWT_ACCESS_TOKEN",
"ExpiresIn":3600,
"IdToken":"JWT_ID_TOKEN",
"RefreshToken":"JWT_REFRESH_TOKEN",
"TokenType":"Bearer"
},
"ChallengeParameters":{}
}
Requester-Role header
Each api call should contain "X-PF-DWC-Requester-Role" header. Example:
GET /v1/upload HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_UPLOADER
Host: localhost:8080
Errors
Whenever an error response (status code >= 400) is returned, the body will contain a JSON object that describes the problem. The error object has the following structure:
Path | Type | Description |
---|---|---|
|
|
internal |
|
|
The HTTP status code, e.g. |
|
|
A description of the cause of the error, e.g. 'Validation error' |
|
|
Internal code of the cause of the error |
|
|
Extended description to the error, e.g. 'contractNumber: must not be blank' |
|
|
The path to which the request was made |
|
|
The time, in milliseconds, at which the error occurred |
For example, a request that attempts to apply a non-existent tag to a note will produce a
400 Bad Request
response:
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 293
{
"id" : "1cf3235e-0140-4e9d-ad00-b91c5ced5965",
"status" : "BAD_REQUEST",
"timestamp" : "2024-09-30T13:27:17.566087509Z",
"message" : "Bad Request",
"messageCode" : "de.profiforms.docxworld.upload.error.client.bad_request",
"debugMessages" : [ null ],
"path" : "/v1/something"
}
User
Register new user request
POST /v1/users HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 103
Host: localhost:8080
{"email":"email@email.com","firstName":"Max","lastName":"Musterman","companyId":null,"status":"ACTIVE"}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
String |
Login E-Mail of the user. Must be unique |
Must be a well-formed email address. Must not be blank |
|
status |
String |
User status. Allowed values: [ACTIVE, INACTIVE]. Default: ACTIVE |
|
firstName |
String |
First name of the user |
|
lastName |
String |
Last name of the user |
|
companyId |
Null |
Company-Id of the user |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 496
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ {
"number" : "customerNumber",
"customerContracts" : [ {
"number" : "customerContract"
} ]
} ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Get user request
GET /v1/users/{userId}
Parameter | Description |
---|---|
|
id of the user |
Example request
GET /v1/users/123 HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 388
{
"id" : "123",
"firstName" : "firstName_123",
"lastName" : "lastName_123",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "123@profiforms.de",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
List users request
GET /v1/users
Parameter | Description |
---|---|
|
Filter and return users containing provided sequence in last name, first name or E-Mail. Case insensitive. |
|
Filter and return users assigned to provided roles. Allowed values: [ROLE_SYS_ADMIN, ROLE_PF_ADMIN, ROLE_CUSTOMER_ADMIN, ROLE_CUSTOMER_USER, ROLE_CUSTOMER_UPLOADER, ROLE_CUSTOMER_DOWNLOADER_RESULTS, ROLE_CUSTOMER_DOWNLOADER_REPORTS, ROLE_CUSTOMER_APPROVER] and special value ROLE_NO_ROLE for users not assigned to any role. |
|
Filter and return users assigned to provided companies. Special value SYS_COMPANY for users not assigned to any company. |
|
Page number to return. [0,totalPages) |
|
Page size. Default 35 |
|
Sorting in format property[,property][,ASC|DESC]. Allowed values: [email, status]. Allowed direction: [ASC, DESC]. Default direction is ASC. |
Example request
GET /v1/users?sort=email&sort=status%2CDESC&page=0&size=10&freeSearch=email&roles=ROLE_NO_ROLE&roles=ROLE_CUSTOMER_USER&companyIds=SYS_COMPANY&companyIds=00000000-0000-0000-0000-000000000001 HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 829
{
"content" : [ {
"id" : "123",
"firstName" : "name1",
"lastName" : "lastname",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email1",
"status" : "ACTIVE",
"lastLogin" : null,
"roles" : [ ],
"scopedCustomerContracts" : { },
"scopedTargets" : { }
}, {
"id" : "456",
"firstName" : "name2",
"lastName" : "lastname",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email2",
"status" : "ACTIVE",
"lastLogin" : null,
"roles" : [ ],
"scopedCustomerContracts" : { },
"scopedTargets" : { }
} ],
"totalElements" : 2,
"totalPages" : 1,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"size" : 35,
"number" : 0,
"sort" : [ ]
}
Update user request
PUT /v1/users/{userId}
Parameter | Description |
---|---|
|
id of the user |
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
firstName |
String |
First name of the user |
|
lastName |
String |
Last name of the user |
Example request
PUT /v1/users/123 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 42
Host: localhost:8080
{"firstName":"Max","lastName":"Musterman"}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Set user state request
Status has to changed separately from other user metadata with following request
PUT /v1/users/{userId}/state
Parameter | Description |
---|---|
|
id of the user |
Example request
PUT /v1/users/123/state HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 19
Host: localhost:8080
{"status":"ACTIVE"}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
status |
String |
User status. Allowed values: [ACTIVE, INACTIVE] |
Must not be null |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Assign role to user
PUT /v1/users/{userId}/roles
Parameter | Description |
---|---|
|
id of the user |
Example request
PUT /v1/users/123/roles HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 24
Host: localhost:8080
{"role":"ROLE_PF_ADMIN"}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
role |
String |
The role that is assigned to the user. Allowed values:: [ROLE_SYS_ADMIN, ROLE_PF_ADMIN, ROLE_CUSTOMER_ADMIN, ROLE_CUSTOMER_USER, ROLE_CUSTOMER_UPLOADER, ROLE_CUSTOMER_DOWNLOADER_RESULTS, ROLE_CUSTOMER_DOWNLOADER_REPORTS, ROLE_CUSTOMER_APPROVER] |
Must not be null |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Retract role from user
DELETE /v1/users/{userId}/roles
Parameter | Description |
---|---|
|
id of the user |
Example request
DELETE /v1/users/123/roles HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 24
Host: localhost:8080
{"role":"ROLE_PF_ADMIN"}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Assign contracts to user role
PUT /v1/users/{userId}/customer-contracts
Parameter | Description |
---|---|
|
id of the user |
Example request
PUT /v1/users/123/customer-contracts HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 62
Host: localhost:8080
{"customerContracts":["number1"],"targetRole":"ROLE_PF_ADMIN"}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
targetRole |
String |
The role the contracts should be assigned to. Allowed values: [ROLE_PF_ADMIN, ROLE_CUSTOMER_ADMIN] |
Must not be null |
customerContracts |
Array |
The contracts that should be assigned to role. |
Must not be empty |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Remove contracts from user role
DELETE /v1/users/{userId}/customer-contracts
Parameter | Description |
---|---|
|
id of the user |
Example request
DELETE /v1/users/123/customer-contracts HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 62
Host: localhost:8080
{"customerContracts":["number1"],"targetRole":"ROLE_PF_ADMIN"}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
targetRole |
String |
The role from which the contracts should removed assigned from. Allowed values: [ROLE_PF_ADMIN, ROLE_CUSTOMER_ADMIN] |
Must not be null |
customerContracts |
Array |
The contracts that should be removed from role. |
Must not be empty |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Assign targets to user role
PUT /v1/users/{userId}/targets
Parameter | Description |
---|---|
|
id of the user |
Example request
PUT /v1/users/123/targets HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 90
Host: localhost:8080
{"targets":["00000000-0000-0000-0000-000000000001"],"targetRole":"ROLE_CUSTOMER_UPLOADER"}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
targetRole |
String |
The role the targets should be assigned to. Allowed values: [ROLE_CUSTOMER_UPLOADER, ROLE_CUSTOMER_DOWNLOADER_RESULTS, ROLE_CUSTOMER_DOWNLOADER_REPORTS, ROLE_CUSTOMER_APPROVER] |
Must not be null |
targets |
Array |
The targets that should be assigned to role. |
Must not be empty |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Remove targets from user role
DELETE /v1/users/{userId}/targets
Parameter | Description |
---|---|
|
id of the user |
Example request
DELETE /v1/users/123/targets HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 90
Host: localhost:8080
{"targets":["00000000-0000-0000-0000-000000000001"],"targetRole":"ROLE_CUSTOMER_UPLOADER"}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
targetRole |
String |
The role from which the targets should removed assigned from. Allowed values: [ROLE_CUSTOMER_UPLOADER, ROLE_CUSTOMER_DOWNLOADER_RESULTS, ROLE_CUSTOMER_DOWNLOADER_REPORTS, ROLE_CUSTOMER_APPROVER] |
Must not be null |
targets |
Array |
The targets that should be removed from role. |
Must not be empty |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Response fields
Path | Type | Description |
---|---|---|
|
|
User id |
|
|
First name of the user |
|
|
Last name of the user |
|
|
Login E-Mail of the user |
|
|
Set of roles assigned to the user |
|
|
User status |
|
|
Company-Id of the user |
|
|
Company-Name of the user |
|
|
Last login of the user |
|
|
Scoped contracts for different roles |
|
|
Scoped targets for different roles |
Retrieve current user Roles and Grants
GET /v1/users/grants HTTP/1.1
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 424
[ {
"role" : "ROLE_PF_ADMIN",
"grants" : [ {
"action" : "user:updateState"
}, {
"action" : "role:removeUser",
"target" : "ROLE_PF_ADMIN"
} ],
"companies" : [ ".*" ],
"contracts" : null
}, {
"role" : "ROLE_SYS_ADMIN",
"grants" : [ {
"action" : "user:create"
}, {
"action" : "role:addUser",
"target" : "ROLE_PF_ADMIN"
} ],
"companies" : [ "SYS_COMPANY" ],
"contracts" : null
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
Role, user is assigned to |
|
|
Companies scope, role is restricted to |
|
|
Contracts scope, role is restricted to |
|
|
List of Grants assigned to the role |
|
|
Action granted |
|
|
Target context action is granted for |
Reset user’s initial password
PUT /v1/users/{userId}/reset-initial-password
Parameter | Description |
---|---|
|
id of the user |
Example request
PUT /v1/users/123/reset-initial-password HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 373
{
"id" : "123",
"firstName" : "Max",
"lastName" : "Musterman",
"companyId" : "00000000-0000-0000-0000-000000000001",
"companyName" : "companyName",
"email" : "email@email.com",
"status" : "ACTIVE",
"lastLogin" : "2007-12-03T10:15:30Z",
"roles" : [ "ROLE_PF_ADMIN" ],
"scopedCustomerContracts" : {
"ROLE_PF_ADMIN" : [ ]
},
"scopedTargets" : { }
}
Known error codes
Code | Description |
---|---|
de.profiforms.docxworld.connect.usermanagement.error.client.access_denied |
Access denied |
de.profiforms.docxworld.connect.usermanagement.error.client.company_not_exists |
Company not exists exception |
de.profiforms.docxworld.connect.usermanagement.error.client.error |
Client error |
de.profiforms.docxworld.connect.usermanagement.error.client.group_not_exists |
Group not exists exception |
de.profiforms.docxworld.connect.usermanagement.error.client.initial_password_reset_not_allowed |
Initial password reset not allowed. |
de.profiforms.docxworld.connect.usermanagement.error.client.invalid_parameter_exception |
Invalid parameter exception. |
de.profiforms.docxworld.connect.usermanagement.error.client.invalid_sort_argument |
Invalid sort argument exception |
de.profiforms.docxworld.connect.usermanagement.error.client.malformed_request |
Malformed JSON request |
de.profiforms.docxworld.connect.usermanagement.error.client.role_header_missing |
Required request header is missing |
de.profiforms.docxworld.connect.usermanagement.error.client.role_not_assignable |
User can not be assigned to this role |
de.profiforms.docxworld.connect.usermanagement.error.client.role_not_assigned |
User has not assigned requested role |
de.profiforms.docxworld.connect.usermanagement.error.client.role_not_exists |
Public role not exists exception |
de.profiforms.docxworld.connect.usermanagement.error.client.targets_not_approvable |
Targets are not approvable |
de.profiforms.docxworld.connect.usermanagement.error.client.user_already_exists |
User already exists exception |
de.profiforms.docxworld.connect.usermanagement.error.client.user_not_exists |
User not exists exception |
de.profiforms.docxworld.connect.usermanagement.error.client.validation |
Validation error |
de.profiforms.docxworld.connect.usermanagement.error.server.unexpected_internal |
Unexpected internal error |
Upload
Uploading a file can be either done by uploading the file as a whole (Single-Upload) or splitting the file in several chunks and uploading them in sequence or in parallel (Chunked-Upload).
Uploading files using Single-Upload consists of 2 stages
-
getting the presigned URL for uploading,
-
uploading the file to s3.
Uploading files using Chunked-Upload consists of 3 stages:
-
getting several presigned URLs for uploading,
-
uploading the file-chunks to s3,
-
confirming that the upload is complete.
In the process of requesting for S3-Upload URL, the client has to provide the information if Chunked-Upload is supported, however the decision if Single-Upload or Chunked-Upload will be used is made by the backend. Which kind of file-upload actually should be done is given in the response for requesting for S3-Upload URL, where either one single URL is included or a list of URLs, respectively. If Chunked-Upload is used, the client may decide by itself how to split the file into chunks, however only the last chunk may be smaller 5MB.
Getting upload URL
A PUT
request is used to get upload URL
/v1/uploads
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
supportedUploadFeatures |
Array |
Allowed values: MULTIPART - if the file is larger than 100 mb, you can get multiple urls to upload(chunk upload); CS_CONTENT_ENCRYPTION - if client-side encryption is used |
|
contractNumber |
String |
The contract number. Deprecated. Use targetId. If set, no target my be given |
|
targetId |
Null |
The target-ID. If set, no contract number may be given. |
|
referenceId |
String |
Reference Id. If specified, it must be unique for current user |
Size must be between 0 and 100 inclusive |
jobCustomerReference1 |
String |
Customer reference id 1 |
Size must be between 0 and 100 inclusive |
jobCustomerReference2 |
String |
Customer reference id 2 |
Size must be between 0 and 100 inclusive |
jobCustomerReference3 |
String |
Customer reference id 3 |
Size must be between 0 and 100 inclusive |
jobCustomerReference4 |
String |
Customer reference id 4 |
Size must be between 0 and 100 inclusive |
jobCustomerReference5 |
String |
Customer reference id 5 |
Size must be between 0 and 100 inclusive |
jobCustomerReference6 |
String |
Customer reference id 6 |
Size must be between 0 and 100 inclusive |
priority |
String |
Priority, allowed values: NORMAL, HI |
|
fileName |
String |
File name |
Must not be blank |
fileSize |
Number |
File size in bytes |
|
b64ClientWrapKey |
String |
The key to wrap the data encryption key in BASE64 format |
|
clientWrapKeyEncryptionAlg |
String |
The algorithm of key to wrap the data encryption key, allowed values: RSA/ECB/OAEPWithSHA-256AndMGF1Padding |
|
dataEncryptionAlgorithm |
String |
Data encryption algorithm, allowed values: AES/GCM/NoPadding |
|
dataKeyProviderType |
String |
Data encryption key provider, allowed values: DOCXWORLD - keys are generated and stored on the docxworld side; KMS - keys are generated and stored in aws KMS service |
Example request
PUT /v1/uploads HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_UPLOADER
Content-Length: 992
Host: localhost:8080
{"supportedUploadFeatures":["MULTIPART","CS_CONTENT_ENCRYPTION"],"contractNumber":"1231231234","targetId":null,"referenceId":"2341234345","jobCustomerReference1":"custom ref 1","jobCustomerReference2":"custom ref 2","jobCustomerReference3":"custom ref 3","jobCustomerReference4":"custom ref 4","jobCustomerReference5":"custom ref 5","jobCustomerReference6":"custom ref 6","fileName":"test.txt","priority":"NORMAL","fileSize":100,"b64ClientWrapKey":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsLPIMhdi5953f1pgE732rcDFBvoDOFG8F6XPH3JF/3WLueyTcD8Ox7WG1gVgSmvc/Jp/nuOyRPhpqHcxnzNbjdtk95wm5+b+UF3lWQVCvWVnCYXg+XqoFLGbxsP3agveHQCPWEdh8Yv3SVKXylQIjbLaEBDpg8G5A9C6NtsfppN3OWvtI4Ccg3kuO0MT0b5vysJVkYx803UO9m0OrO0+md2U3t/WKJpgmvXFt/3Z5ZLPfTSYXVzeW3EduUqFY/l/XMnfsYufUozdHiemYdAvte4Ik60HpFIc+hnE2tHENVdy/dvdBpDfJeUeylIOVGuS7xcs0cjsSu4sMN6/UO2MJwIDAQAB","dataEncryptionAlgorithm":"AES/GCM/NoPadding","clientWrapKeyEncryptionAlg":"RSA/ECB/OAEPWithSHA-256AndMGF1Padding","dataKeyProviderType":"DOCXWORLD"}
Response fields
Path | Type | Description |
---|---|---|
|
|
Upload id |
|
|
Headers to specify when uploading a file to s3 |
|
|
URLs for uploading the file |
|
|
S3 key |
|
|
True - if upload with same reference id already exist |
|
|
Data encryption key wrapped with b64ClientWrapKey in BASE64 format |
|
|
Initialization vector for data encryption |
|
|
Data encryption key in plain text |
|
|
Algorithm that should be used to wrap the data key |
|
|
Algorithm that should be used to encrypt the data |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2102
{
"id" : "5c636c12-53de-44cb-a1e1-a22233253e1e",
"headers" : { },
"uploadUrls" : [ "https://dwc-upload-dev.s3.eu-central-1.amazonaws.com/a84397c4-fadd-4fb7-9145-7d580646cc86-filename?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20201216T133930Z&X-Amz-SignedHeaders=host%3Bx-amz-meta-contractnumber%3Bx-amz-meta-datakeyprovidertype%3Bx-amz-meta-id%3Bx-amz-meta-jobpriority%3Bx-amz-meta-userid%3Bx-amz-meta-x-amz-cek-alg%3Bx-amz-meta-x-amz-iv%3Bx-amz-meta-x-amz-key-v2%3Bx-amz-meta-x-amz-matdesc%3Bx-amz-meta-x-amz-tag-len%3Bx-amz-meta-x-amz-unencrypted-content-length%3Bx-amz-meta-x-amz-wrap-alg&X-Amz-Expires=3587&X-Amz-Credential=AKIAWSSDUUOI3B7IN4U3%2F20201216%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Signature=995c8d2ffb7b71c3779ad594e81c63f8a49186a928b817e30e076bd50f9b4c46", "https://dwc-upload-dev.s3.eu-central-1.amazonaws.com/a84397c4-fadd-4fb7-9145-7d580646cc86-filename?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20201216T133930Z&X-Amz-SignedHeaders=host%3Bx-amz-meta-contractnumber%3Bx-amz-meta-datakeyprovidertype%3Bx-amz-meta-id%3Bx-amz-meta-jobpriority%3Bx-amz-meta-userid%3Bx-amz-meta-x-amz-cek-alg%3Bx-amz-meta-x-amz-iv%3Bx-amz-meta-x-amz-key-v2%3Bx-amz-meta-x-amz-matdesc%3Bx-amz-meta-x-amz-tag-len%3Bx-amz-meta-x-amz-unencrypted-content-length%3Bx-amz-meta-x-amz-wrap-alg&X-Amz-Expires=3587&X-Amz-Credential=AKIAWSSDUUOI3B7IN4U3%2F20201216%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Signature=995c8d2ffb7b71c3779ad594e81c63f8a49186a928b817e30e076bd50f9b4c46" ],
"s3Key" : "5c636c12-53de-44cb-a1e1-a22233253e1etest.txt",
"jobAlreadyExists" : false,
"b64encryptedDataKey" : "Wf3g36oyGNErkbo7i8XLQichSejA+X4SEe3dXdBi/qbFKKtv8BQUAuu5bKBSCAUOBiI1ac6aKhzlR/F23k7v4mYchBvpBDqryXNiztd1DinjHUntJa7FhfL4631BrXMBgXsh0TJP3O24n8h+Sfd9AoDxA0XjkxGPRaDfd3TbL0qxvUs1cX/nBqX/pvhx8bAwQCNO3cip3xw7quOVBRMp/fWpepHjfCaKw+3X5OFivDQipnXN+IGwP3pWq0KrPuI5UvOkcgv2mh7ZIg3bEHNLuNWAePewlWrjA9bdxLiRABFhtpuovp10+U8jjuK4wT39DvmY0wd4495ry8h+qf4EuQ==",
"b64Iv" : "LSy3GLifoC7NiX46LhpVuQ==",
"b64DataKey" : null,
"clientWrapKeyEncryptionAlg" : null,
"dataEncryptionAlgorithm" : "AES/GCM/NoPadding"
}
In the case of Single-Upload, the response will contain a set of headers, that have to be included as headers in the file-upload request to S3. For the Chunked-Upload, no headers have to be used.
CURL request
$ curl 'http://localhost:8080/v1/uploads' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF8' \
-H 'X-PF-DWC-Requester-Role: ROLE_CUSTOMER_UPLOADER' \
-d '{"supportedUploadFeatures":["MULTIPART","CS_CONTENT_ENCRYPTION"],"contractNumber":"1231231234","targetId":null,"referenceId":"2341234345","jobCustomerReference1":"custom ref 1","jobCustomerReference2":"custom ref 2","jobCustomerReference3":"custom ref 3","jobCustomerReference4":"custom ref 4","jobCustomerReference5":"custom ref 5","jobCustomerReference6":"custom ref 6","fileName":"test.txt","priority":"NORMAL","fileSize":100,"b64ClientWrapKey":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsLPIMhdi5953f1pgE732rcDFBvoDOFG8F6XPH3JF/3WLueyTcD8Ox7WG1gVgSmvc/Jp/nuOyRPhpqHcxnzNbjdtk95wm5+b+UF3lWQVCvWVnCYXg+XqoFLGbxsP3agveHQCPWEdh8Yv3SVKXylQIjbLaEBDpg8G5A9C6NtsfppN3OWvtI4Ccg3kuO0MT0b5vysJVkYx803UO9m0OrO0+md2U3t/WKJpgmvXFt/3Z5ZLPfTSYXVzeW3EduUqFY/l/XMnfsYufUozdHiemYdAvte4Ik60HpFIc+hnE2tHENVdy/dvdBpDfJeUeylIOVGuS7xcs0cjsSu4sMN6/UO2MJwIDAQAB","dataEncryptionAlgorithm":"AES/GCM/NoPadding","clientWrapKeyEncryptionAlg":"RSA/ECB/OAEPWithSHA-256AndMGF1Padding","dataKeyProviderType":"DOCXWORLD"}'
Completing upload
This request has only to be done, if Chunked-Upload is used. While uploading the file-chunks to S3, each response contains an 'ETag' header that has to be included in the complete upload request in a map consisting of the counter of URL used to upload as key and the 'ETag' as value.
A PUT
request is used to complete upload
/v1/uploads/complete
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
processId |
String |
ID received when requesting the upload URL |
Must not be blank |
etags |
Object |
eTags |
Example request
PUT /v1/uploads/complete HTTP/1.1
Content-Type: application/json;charset=UTF8
Content-Length: 36
Host: localhost:8080
{"processId":"processId","etags":{}}
Response fields
Path | Type | Description |
---|---|---|
|
|
The message about the successful completion |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44
{
"message" : "complete upload response"
}
CURL request
$ curl 'http://localhost:8080/v1/uploads/complete' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF8' \
-d '{"processId":"processId","etags":{}}'
Getting upload
/v1/uploads/{id}
Response fields
Path | Type | Description |
---|---|---|
|
|
Upload id |
|
|
Timestamp of upload |
|
|
upload target |
|
|
upload target name |
|
|
upload target abbreviation |
|
|
Reference-Id |
|
|
Customer upload reference 1 |
|
|
Customer upload reference 2 |
|
|
Customer upload reference 3 |
|
|
Customer upload reference 4 |
|
|
Customer upload reference 5 |
|
|
Customer upload reference 6 |
|
|
Filesize |
|
|
Filename |
|
|
Progress of upload. Allowed Values [SCHEDULED, UPLOADED, TRANSFER_FAILED, TRANSFERRED, DUPLICATED, DELETED, WAITING_FOR_COLLECT, COLLECTED] |
|
|
Contract number |
|
|
User id |
|
|
Company id |
|
|
Id in spooler |
|
|
Customer number |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 901
{
"processId" : "jobId",
"created" : "2007-12-03T10:15:30Z",
"targetId" : "00000000-0000-0000-0000-000000000011",
"targetName" : "default workflow for customerContract",
"targetAbbreviation" : "W1",
"referenceId" : null,
"jobCustomerReference1" : "jobCustomerReference1",
"jobCustomerReference2" : "jobCustomerReference2",
"jobCustomerReference3" : "jobCustomerReference3",
"jobCustomerReference4" : "jobCustomerReference4",
"jobCustomerReference5" : "jobCustomerReference5",
"jobCustomerReference6" : "jobCustomerReference6",
"fileSize" : 100,
"fileName" : "fileName",
"events" : [ {
"created" : "2007-12-03T10:15:30Z",
"action" : "SCHEDULED"
}, {
"created" : "2007-12-03T10:15:30Z",
"action" : "UPLOADED"
} ],
"userId" : "userId",
"companyId" : null,
"customerContract" : "customerContract",
"customerNumber" : null,
"idInSpooler" : null
}
CURL request
$ curl 'http://localhost:8080/v1/uploads/processId' -i -X GET \
-H 'X-PF-DWC-Requester-Role: ROLE_PF_ADMIN'
Getting file-link
/v1/uploads/{id}/generate-link
Response fields
Path | Type | Description |
---|---|---|
|
|
Download link |
|
|
Upload ID |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 61
{
"id" : "jobId",
"downloadLink" : "https://s3.aws/123"
}
CURL request
$ curl 'http://localhost:8080/v1/uploads/jobId/generate-link' -i -X GET \
-H 'X-PF-DWC-Requester-Role: ROLE_CUSTOMER_UPLOADER'
Getting uploads
/v1/uploads
Filter and sort parameters
GET /v1/uploads
Parameter | Description |
---|---|
|
Page number to return. |
|
Page size. Default 35 |
|
Sorting in format [property][,ASC|DESC]. Allowed values: [customerContract, jobState, created, companyId, customerNumber, targetName, targetId]. Allowed direction: [ASC, DESC]. Default direction is ASC. |
|
Filter by company-id |
|
Filter by customer number |
|
Filter by job state. Allowed values [SCHEDULED, UPLOADED, TRANSFER_FAILED, TRANSFERRED, DUPLICATED, DELETED, WAITING_FOR_COLLECT, COLLECTED] |
|
Filter by expected-file-format. Allowed values [PDF, UNKNOWN] |
|
Filter by created date: uploads created after the specified date |
|
Filter by created date: uploads created before the specified date |
Example request
GET /v1/uploads?sort=jobState%2CDESC&sort=customerContract&page=0&size=10&jobState=DUPLICATED&startPeriod=2000-12-24T09%3A38%3A40.982Z&endPeriod=2100-12-24T09%3A38%3A40.982Z&expectedFileFormat=PDF HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_UPLOADER
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1103
{
"content" : [ {
"processId" : "jobId",
"referenceId" : "referenceId",
"jobState" : "DUPLICATED",
"created" : "2007-12-03T10:15:30Z",
"fileName" : "fileName",
"targetId" : "00000000-0000-0000-0000-000000000011",
"targetName" : "default workflow for customerContract",
"targetAbbreviation" : "W1",
"expectedFileFormat" : "UNKNOWN",
"pdfValidationState" : "NOT_REQUIRED",
"approvalState" : "NOT_REQUIRED",
"downloadable" : false
}, {
"processId" : "jobId2",
"referenceId" : "referenceId2",
"jobState" : "DUPLICATED",
"created" : "2007-12-03T10:15:30Z",
"fileName" : "fileName2",
"targetId" : "00000000-0000-0000-0000-000000000011",
"targetName" : "default workflow for customerContract",
"targetAbbreviation" : "W1",
"expectedFileFormat" : "UNKNOWN",
"pdfValidationState" : "NOT_REQUIRED",
"approvalState" : "NOT_REQUIRED",
"downloadable" : false
} ],
"totalElements" : 2,
"totalPages" : 1,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"size" : 2,
"number" : 0,
"sort" : [ ]
}
Response fields
Path | Type | Description |
---|---|---|
|
|
Upload id |
|
|
Timestamp of upload |
|
|
upload target |
|
|
upload target name |
|
|
upload target abbreviation |
|
|
Reference-Id |
|
|
Filename |
|
|
Job-State. Allowed Values [SCHEDULED, UPLOADED, TRANSFER_FAILED, TRANSFERRED, DUPLICATED, DELETED, WAITING_FOR_COLLECT, COLLECTED] |
|
|
Approval-State. Allowed Values [REQUIRED, NOT_REQUIRED, WAITING_APPROVAL, APPROVED, REJECTED, EXPIRED] |
|
|
PDF-Validation-State. Allowed Values [NOT_REQUIRED, WAITING_VALIDATION, VALIDATED, REJECTED] |
|
|
Expected File-Format. Allowed Values [PDF, UNKNOWN] |
|
|
File downloadable? |
CURL request
$ curl 'http://localhost:8080/v1/uploads?sort=jobState%2CDESC&sort=customerContract&page=0&size=10&jobState=DUPLICATED&startPeriod=2000-12-24T09%3A38%3A40.982Z&endPeriod=2100-12-24T09%3A38%3A40.982Z&expectedFileFormat=PDF' -i -X GET \
-H 'X-PF-DWC-Requester-Role: ROLE_CUSTOMER_UPLOADER'
Getting approval-tasks
/v1/approval-tasks
Filter and sort parameters
GET /v1/approval-tasks
Parameter | Description |
---|---|
|
Page number to return. |
|
Page size. Default 35 |
|
Sorting in format [property][,ASC|DESC]. Allowed values: [approvalState, uploadCreated, targetName]. Allowed direction: [ASC, DESC]. Default direction is ASC. |
|
Name of workflow/target |
|
Filter by process ids |
|
Filter by approval state. Allowed values [REQUIRED, NOT_REQUIRED, WAITING_APPROVAL, APPROVED, REJECTED, EXPIRED] |
|
Filter by free search of filename |
Example request
GET /v1/approval-tasks?sort=approvalState%2CDESC&sort=uploadCreated%2CASC&page=1&size=5&targetName=targetName&approvalStates=WAITING_APPROVAL&approvalStates=APPROVED&freeSearch=free HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_APPROVER
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1116
{
"content" : [ {
"targetName" : "default workflow for customerContract",
"targetId" : "00000000-0000-0000-0000-000000000011",
"processId" : "processId1",
"id" : "00000000-0000-0000-0000-000000000001",
"uploadCreated" : "2007-12-03T10:15:30Z",
"fileName" : "fileName",
"approvalState" : "WAITING_APPROVAL",
"uploaderId" : null,
"uploaderEmail" : "uploaderEmail",
"approverId" : null,
"approverEmail" : "approverEmail",
"message" : null
}, {
"targetName" : "default workflow for customerContract",
"targetId" : "00000000-0000-0000-0000-000000000011",
"processId" : "processId2",
"id" : "00000000-0000-0000-0000-000000000001",
"uploadCreated" : "2007-12-03T10:15:30Z",
"fileName" : "fileName",
"approvalState" : "WAITING_APPROVAL",
"uploaderId" : null,
"uploaderEmail" : "uploaderEmail",
"approverId" : null,
"approverEmail" : "approverEmail",
"message" : null
} ],
"totalElements" : 2,
"totalPages" : 1,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"size" : 2,
"number" : 0,
"sort" : [ ]
}
Response fields
Path | Type | Description |
---|---|---|
|
|
id of the approval task |
|
|
upload id |
|
|
upload target id |
|
|
Timestamp of upload |
|
|
upload target name |
|
|
Filename |
|
|
Uploader ID |
|
|
Email of the Uploader |
|
|
Approver ID |
|
|
Email of the Approver |
|
|
Approval-State. Allowed Values [REQUIRED, NOT_REQUIRED, WAITING_APPROVAL, APPROVED, REJECTED, EXPIRED] |
|
|
Approval message |
CURL request
$ curl 'http://localhost:8080/v1/approval-tasks?sort=approvalState%2CDESC&sort=uploadCreated%2CASC&page=1&size=5&targetName=targetName&approvalStates=WAITING_APPROVAL&approvalStates=APPROVED&freeSearch=free' -i -X GET \
-H 'X-PF-DWC-Requester-Role: ROLE_CUSTOMER_APPROVER'
Approve approval-tasks
/v1/approval-tasks/{id}/decide
Multipart post request is used to approve approval-tasks. Parts of the request are:
Part | Description |
---|---|
|
The modified PDF to be shared with uploader |
|
The approval decision json |
Decision fields are:
Path | Type | Description | Constraints |
---|---|---|---|
approvalState |
String |
Result of the approval. Allowed values: [APPROVED, REJECTED] |
Must not be null |
message |
String |
The approval message |
Size must be between 0 and 255 inclusive |
emailOptions |
String |
An Email notification Option. By default: ONLY_UPLOADER. Allowed values: [ONLY_UPLOADER, CC_APPROVER] |
Example request
POST /v1/approval-tasks/00000000-0000-0000-0000-000000000000/decide HTTP/1.1
Content-Type: multipart/form-data;charset=UTF8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_APPROVER
Host: localhost:8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=test.pdf
Content-Type: application/pdf
Default PDF content
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=decision; filename=decision.json
Content-Type: application/json
{"approvalState":"REJECTED","message":"message","emailOptions":"CC_APPROVER"}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 367
{
"targetName" : null,
"targetId" : "00000000-0000-0000-0000-000000000001",
"processId" : null,
"id" : "00000000-0000-0000-0000-000000000000",
"uploadCreated" : null,
"fileName" : null,
"approvalState" : "REJECTED",
"uploaderId" : "uploaderId",
"uploaderEmail" : "uploaderEmail",
"approverId" : null,
"approverEmail" : null,
"message" : null
}
Response fields
Path | Type | Description |
---|---|---|
|
|
id of the approval task |
|
|
upload id |
|
|
upload target id |
|
|
Timestamp of upload |
|
|
upload target name |
|
|
Filename |
|
|
Uploader ID |
|
|
Email of the Uploader |
|
|
Approver ID |
|
|
Email of the Approver |
|
|
Approval-State. Allowed Values [REQUIRED, NOT_REQUIRED, WAITING_APPROVAL, APPROVED, REJECTED, EXPIRED] |
|
|
Approval message |
CURL request
$ curl 'http://localhost:8080/v1/approval-tasks/00000000-0000-0000-0000-000000000000/decide' -i -X POST \
-H 'Content-Type: multipart/form-data;charset=UTF8' \
-H 'X-PF-DWC-Requester-Role: ROLE_CUSTOMER_APPROVER' \
-F 'file=@test.pdf;type=application/pdf' \
-F 'decision=@decision.json;type=application/json'
Known error codes
Code | Description |
---|---|
de.profiforms.docxworld.upload.error.client.access_denied |
Access denied |
de.profiforms.docxworld.upload.error.client.bad_request |
Bad Request |
de.profiforms.docxworld.upload.error.client.chunk_missing |
Cannot complete upload. Chunks are missing |
de.profiforms.docxworld.upload.error.client.customer_contract_inactive |
Customer contract is not active exception |
de.profiforms.docxworld.upload.error.client.customer_contract_not_exists |
Customer contract not exists exception |
de.profiforms.docxworld.upload.error.client.customer_number_inactive |
Customer number is not active exception |
de.profiforms.docxworld.upload.error.client.encryption_not_allowed |
Encryption not allowed exception |
de.profiforms.docxworld.upload.error.client.encryption_parameters_missing |
Incomplete set of data for encryption data key |
de.profiforms.docxworld.upload.error.client.invalid_sort_argument |
Invalid sort argument exception |
de.profiforms.docxworld.upload.error.client.job_already_exists |
Job already exists exception |
de.profiforms.docxworld.upload.error.client.job_not_found |
Job not exists exception |
de.profiforms.docxworld.upload.error.client.malformed_request |
Malformed request |
de.profiforms.docxworld.upload.error.client.s3_complete_upload |
Cannot complete upload. |
de.profiforms.docxworld.upload.error.client.s3_key_not_found |
Job not exists exception |
de.profiforms.docxworld.upload.error.client.target_inactive |
Target inactive exception |
de.profiforms.docxworld.upload.error.client.target_not_exists |
Target not exists exception |
de.profiforms.docxworld.upload.error.client.unauthorized |
Unauthorized access error. |
de.profiforms.docxworld.upload.error.client.user_not_found |
User not found |
de.profiforms.docxworld.upload.error.client.validation |
Validation error |
de.profiforms.docxworld.upload.error.server.approval_task_not_decidable |
Approval task not decidable exception |
de.profiforms.docxworld.upload.error.server.approval_task_not_found |
Approval task not exists exception |
de.profiforms.docxworld.upload.error.server.file_not_downloadable |
File not downloadable |
de.profiforms.docxworld.upload.error.server.file_not_exists |
File not exists |
de.profiforms.docxworld.upload.error.server.job_collection_not_found |
Job collection not exists exception |
de.profiforms.docxworld.upload.error.server.no_such_client_key_encr_algorithm |
No such key encryption algorithm |
de.profiforms.docxworld.upload.error.server.no_such_data_encr_algorithm |
No such data encryption algorithm |
de.profiforms.docxworld.upload.error.server.unexpected_internal |
Unexpected internal error |
Company
Get company by ID
GET /v1/companies/00000000-0000-0000-0000-000000000001 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 912
{
"id" : "00000000-0000-0000-0000-000000000001",
"version" : 0,
"name" : "Company Name",
"customerNumbers" : [ {
"number" : "customerNumber-1",
"version" : 0,
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-2",
"version" : 0,
"description" : "customerContract-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB",
"isActive" : false
} ],
"isActive" : false
} ]
}
Read companies
GET /v1/companies HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 6022
{
"content" : [ {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"name" : "Company Name",
"customerNumbers" : [ {
"number" : "customerNumber-1",
"version" : null,
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-1-1",
"version" : null,
"description" : "customerContract-1-1 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB",
"isActive" : false
}, {
"number" : "customerContract-1-2",
"version" : null,
"description" : "customerContract-1-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "RAW",
"uploadType" : "SINGLE",
"isActive" : false
} ],
"isActive" : false
}, {
"number" : "customerNumber-2",
"version" : null,
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-2-1",
"version" : null,
"description" : "customerContract-2-1 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB",
"isActive" : false
}, {
"number" : "customerContract-2-2",
"version" : null,
"description" : "customerContract-2-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "RAW",
"uploadType" : "SINGLE",
"isActive" : false
} ],
"isActive" : false
} ]
}, {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"name" : "Company Name",
"customerNumbers" : [ {
"number" : "customerNumber-1",
"version" : null,
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-1-1",
"version" : null,
"description" : "customerContract-1-1 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB",
"isActive" : false
}, {
"number" : "customerContract-1-2",
"version" : null,
"description" : "customerContract-1-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "RAW",
"uploadType" : "SINGLE",
"isActive" : false
} ],
"isActive" : false
}, {
"number" : "customerNumber-2",
"version" : null,
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-2-1",
"version" : null,
"description" : "customerContract-2-1 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB",
"isActive" : false
}, {
"number" : "customerContract-2-2",
"version" : null,
"description" : "customerContract-2-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "RAW",
"uploadType" : "SINGLE",
"isActive" : false
} ],
"isActive" : false
} ]
} ],
"totalElements" : 2,
"totalPages" : 1,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"size" : 2,
"number" : 0,
"sort" : [ ]
}
Example. Read companies with filter
GET /v1/companies?freeSearch=123&page=0&size=5 HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Register new company request
POST /v1/companies HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 756
Host: localhost:8080
{
"name" : "Company Name",
"customerNumbers" : [ {
"number" : "customerNumber-1",
"states" : [ {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
}, {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-2",
"description" : "customerContract-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB"
} ]
} ]
}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
name |
String |
Company name. Must be unique(case insensitive) |
Must not be blank |
customerNumbers |
Array |
Array of customer numbers, assigned to this company |
Must not be empty. Must not contain objects with the same numbers |
customerNumbers[]number |
String |
Customer number. Must be unique(case insensitive) |
Must not be blank |
customerNumbers[]states |
Array |
Array of customer number state transitions. |
|
customerNumbers[]customerContracts |
Array |
Array of customer contracts, assigned to particular customer number |
Must not contain objects with the same numbers |
customerNumbers[].states[]state |
String |
Customer number state. Allowed values: [ACTIVE, INACTIVE]. By default INACTIVE |
Must not be null |
customerNumbers[].states[]validFrom |
String |
Customer number state activation timestamp. By default current time |
Must be in the future or the present within leeway. Must not be null |
customerNumbers[].customerContracts[]number |
String |
Customer contract number. Must be unique(case insensitive) |
Must not be blank |
customerNumbers[].customerContracts[]description |
String |
Customer contract number description |
|
customerNumbers[].customerContracts[]states |
Array |
Array of customer contract state transitions. |
|
customerNumbers[].customerContracts[]approvable |
Boolean |
Uploads approvable? |
|
customerNumbers[].customerContracts[]collectable |
Boolean |
Uploads collectable? |
|
customerNumbers[].customerContracts[]externalOutput |
Boolean |
Use an external service for uploads? |
|
customerNumbers[].customerContracts[]fileType |
String |
FileType of upload. Allowed values: [PDF, RAW] |
Must not be null |
customerNumbers[].customerContracts[]uploadType |
String |
UploadType of upload. Allowed values: [JOB, SINGLE] |
Must not be null |
customerNumbers[].customerContracts[].states[]state |
String |
Customer contract state. Allowed values: [ACTIVE, INACTIVE]. By default INACTIVE |
Must not be null |
customerNumbers[].customerContracts[].states[]validFrom |
String |
Customer contract state activation timestamp. By default current time |
Must be in the future or the present within leeway. Must not be null |
Example response
HTTP/1.1 201 Created
Location: http://localhost:8080/v1/companies/00000000-0000-0000-0000-000000000001
Content-Type: application/json
Content-Length: 912
{
"id" : "00000000-0000-0000-0000-000000000001",
"version" : 0,
"name" : "Company Name",
"customerNumbers" : [ {
"number" : "customerNumber-1",
"version" : 0,
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-2",
"version" : 0,
"description" : "customerContract-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB",
"isActive" : false
} ],
"isActive" : false
} ]
}
Response fields
Path | Type | Description |
---|---|---|
|
|
Company id |
|
|
Company name |
|
|
Company revision. Changes to company will change it revision |
|
|
Array of customer numbers, assigned to this company |
|
|
Customer number. Must be unique(case insensitive) |
|
|
Array of customer number state transitions. By default INACTIVE |
|
|
Customer number revision. Changes to customer number will change it revision |
|
|
True, if customerNumber is currently active |
|
|
Customer number state. Allowed values: [ACTIVE, INACTIVE] |
|
|
Customer number state activation timestamp. By default current time |
|
|
Array of customer contracts, assigned to particular customer number |
|
|
Customer contract number. Must be unique(case insensitive) |
|
|
Customer contract number description |
|
|
Array of customer contract state transitions. By default INACTIVE |
|
|
Customer contract revision. Changes to customer contract will change it revision |
|
|
True, if customerContract is currently active |
|
|
True, if customerContract is approvable |
|
|
True, if customerContract is collectable |
|
|
True, if customerContract uses external output |
|
|
The file-type of the uploads |
|
|
The upload-type of the uploads |
|
|
Customer contract state. Allowed values: [ACTIVE, INACTIVE] |
|
|
Customer contract state activation timestamp. By default current time |
Example. Register new company minimal request and response
Request
POST /v1/companies HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 94
Host: localhost:8080
{
"name" : "Profiforms",
"customerNumbers" : [ {
"number" : "customerNumber_1"
} ]
}
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/v1/companies/00000000-0000-0000-0000-000000000001
Content-Type: application/json
Content-Length: 338
{
"id" : "00000000-0000-0000-0000-000000000001",
"version" : 0,
"name" : "Profiforms",
"customerNumbers" : [ {
"number" : "customerNumber_1",
"version" : 0,
"states" : [ {
"state" : "INACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
} ],
"customerContracts" : null,
"isActive" : false
} ]
}
Same default behaviour is valid for customer contracts.
Example. Register new company with custom customer number status
Request
POST /v1/companies HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 147
Host: localhost:8080
{
"name" : "Profiforms",
"customerNumbers" : [ {
"number" : "customerNumber_1",
"states" : [ {
"state" : "ACTIVE"
} ]
} ]
}
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/v1/companies/00000000-0000-0000-0000-000000000001
Content-Type: application/json
Content-Length: 336
{
"id" : "00000000-0000-0000-0000-000000000001",
"version" : 0,
"name" : "Profiforms",
"customerNumbers" : [ {
"number" : "customerNumber_1",
"version" : 0,
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
} ],
"customerContracts" : null,
"isActive" : false
} ]
}
Same default behaviour is valid for customer contracts.
Update company metadata request
PUT /v1/companies/00000000-0000-0000-0000-000000000001 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 29
Host: localhost:8080
{
"name" : "Company Name"
}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
name |
String |
Company name. Must be unique(case insensitive) |
Must not be blank |
Adding customer numbers
POST /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 1304
Host: localhost:8080
[ {
"number" : "customerNumber-1",
"states" : [ {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
}, {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-1",
"description" : "customerContract-1 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB"
} ]
}, {
"number" : "customerNumber-2",
"states" : [ {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
}, {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
} ],
"customerContracts" : [ {
"number" : "customerContract-2",
"description" : "customerContract-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB"
} ]
} ]
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
[] |
Array |
Array of customer numbers, assigned to this company |
|
[]number |
String |
Customer number. Must be unique(case insensitive) |
Must not be blank |
[]states |
Array |
Array of customer number state transitions. |
|
[]customerContracts |
Array |
Array of customer contracts, assigned to particular customer number |
Must not contain objects with the same numbers |
[].states[]state |
String |
Customer number state. Allowed values: [ACTIVE, INACTIVE]. By default INACTIVE |
Must not be null |
[].states[]validFrom |
String |
Customer number state activation timestamp. By default current time |
Must be in the future or the present within leeway. Must not be null |
[].customerContracts[]number |
String |
Customer contract number. Must be unique(case insensitive) |
Must not be blank |
[].customerContracts[]description |
String |
Customer contract number description |
|
[].customerContracts[]states |
Array |
Array of customer contract state transitions. |
|
[].customerContracts[]approvable |
Boolean |
Uploads approvable? |
|
[].customerContracts[]collectable |
Boolean |
Uploads collectable? |
|
[].customerContracts[]externalOutput |
Boolean |
Use an external service for uploads? |
|
[].customerContracts[]fileType |
String |
FileType of upload. Allowed values: [PDF, RAW] |
Must not be null |
[].customerContracts[]uploadType |
String |
UploadType of upload. Allowed values: [JOB, SINGLE] |
Must not be null |
[].customerContracts[].states[]state |
String |
Customer contract state. Allowed values: [ACTIVE, INACTIVE]. By default INACTIVE |
Must not be null |
[].customerContracts[].states[]validFrom |
String |
Customer contract state activation timestamp. By default current time |
Must be in the future or the present within leeway. Must not be null |
Adding customer number states
POST /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers/1/states HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 144
Host: localhost:8080
[ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-05T11:22:33.456Z"
} ]
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
[] |
Array |
An array of customer number state transitions. |
|
[]state |
String |
Customer number state. Allowed values: [ACTIVE, INACTIVE]. By default INACTIVE |
Must not be null |
[]validFrom |
String |
Customer number state activation timestamp. By default current time |
Must be in the future or the present within leeway. Must not be null |
Deleting customer number
DELETE /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers/67 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Deleting customer number states
DELETE /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers/1/states HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 58
Host: localhost:8080
[ "2121-02-15T11:22:33.456Z", "2121-02-25T11:22:33.456Z" ]
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
[] |
Array |
An array of instant states to be deleted. |
Updating customer contract metadata
PUT /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers/1/customer-contracts/2 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 39
Host: localhost:8080
{
"description" : "new description"
}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
description |
String |
Contract description |
Adding customer contracts
POST /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers/1/customer-contracts HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 772
Host: localhost:8080
[ {
"number" : "customerContract-1",
"description" : "customerContract-1 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB"
}, {
"number" : "customerContract-2",
"description" : "customerContract-2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB"
} ]
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
[] |
Array |
Array of customer contract numbers |
|
[]number |
String |
Customer contract number. Must be unique(case insensitive) |
Must not be blank |
[]description |
String |
Customer contract number description |
|
[]states |
Array |
Array of customer contract state transitions. |
|
[]approvable |
Boolean |
Uploads approvable? |
|
[]collectable |
Boolean |
Uploads collectable? |
|
[]externalOutput |
Boolean |
Use an external service for uploads? |
|
[]fileType |
String |
FileType of upload. Allowed values: [PDF, RAW] |
Must not be null |
[]uploadType |
String |
UploadType of upload. Allowed values: [JOB, SINGLE] |
Must not be null |
[].states[]state |
String |
Customer contract state. Allowed values: [ACTIVE, INACTIVE]. By default INACTIVE |
Must not be null |
[].states[]validFrom |
String |
Customer contract state activation timestamp. By default current time |
Must be in the future or the present within leeway. Must not be null |
Adding customer contract states
POST /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers/1/customer-contracts/1/states HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 144
Host: localhost:8080
[ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-05T11:22:33.456Z"
} ]
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
[] |
Array |
An array of customer contract state transitions. |
|
[]state |
String |
Customer contract state. Allowed values: [ACTIVE, INACTIVE]. By default INACTIVE |
Must not be null |
[]validFrom |
String |
Customer contract state activation timestamp. By default current time |
Must be in the future or the present within leeway. Must not be null |
Deleting customer contract
DELETE /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers/customerNumber-1/customer-contracts/3124 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Deleting customer contract states
DELETE /v1/companies/00000000-0000-0000-0000-000000000001/customer-numbers/1/customer-contracts/1/states HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Content-Length: 58
Host: localhost:8080
[ "2121-02-15T11:22:33.456Z", "2121-02-25T11:22:33.456Z" ]
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
[] |
Array |
An array of instant states to be deleted. |
Read dw24 Companies
GET /v1/companies/dw24 HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_PF_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf8
Content-Length: 632
[ {
"customerNumber" : "customer1",
"customerName" : "company1",
"feedbackAddress" : "feed@back.com",
"contracts" : [ {
"contractNumber" : "contract",
"description" : "description",
"name" : "name",
"validFrom" : "2020-09-14T13:56:01.314Z",
"validTo" : "2020-09-14T13:56:01.314Z"
} ]
}, {
"customerNumber" : "customer2",
"customerName" : "company2",
"feedbackAddress" : "feed@back.com",
"contracts" : [ {
"contractNumber" : "contract",
"description" : "description",
"name" : "name",
"validFrom" : "2020-09-14T13:56:01.314Z",
"validTo" : "2020-09-14T13:56:01.314Z"
} ]
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
Company customer number |
|
|
Company customer name |
|
|
Feedback address |
|
|
Company contracts |
|
|
Company contract number |
|
|
Company contract description |
|
|
Company contract name |
|
|
Company contract valid from |
|
|
Company contract valid to |
Known error codes
Code | Description |
---|---|
de.profiforms.docxworld.connect.company.error.client.external_receiver_url_validation_error |
External receiver URL validation error |
de.profiforms.docxworld.connect.company.error.client.workflow_approvalNeeded_state |
invalid workflow approvalNeeded state |
de.profiforms.docxworld.connect.company.error.client.invalid_sort_argument |
Invalid sort argument exception |
de.profiforms.docxworld.connect.company.error.client.customer_contract_already_exists |
CustomerContract already exists exception |
de.profiforms.docxworld.connect.company.error.client.instant_duplicate_in_request |
Request contains duplicate instants |
de.profiforms.docxworld.connect.company.error.client.workflow_not_exists |
Workflow not exist |
de.profiforms.docxworld.connect.company.error.client.customer_contract_not_exists |
Customer contract not exist |
de.profiforms.docxworld.connect.company.error.client.customer_number_not_exists |
Customer number not exist |
de.profiforms.docxworld.connect.company.error.client.target_not_exists |
Target not exist |
de.profiforms.docxworld.connect.company.error.client.customer_already_exists |
Customer already exists |
de.profiforms.docxworld.connect.company.error.client.workflow_already_exists |
workflow with such name or abbreviation already exists |
de.profiforms.docxworld.connect.company.error.client.access_denied |
Access denied |
de.profiforms.docxworld.connect.company.error.client.validation |
Validation error |
de.profiforms.docxworld.connect.company.error.client.company_not_exists |
Company not exist |
de.profiforms.docxworld.connect.company.error.client.role_header_missing |
Required request header is missing |
de.profiforms.docxworld.connect.company.error.client.customer_number_already_exists |
CustomerNumber already exists exception |
de.profiforms.docxworld.connect.company.error.server.unexpected_internal |
Unexpected internal error |
de.profiforms.docxworld.connect.company.error.client.malformed_request |
Malformed JSON request |
de.profiforms.docxworld.connect.company.error.client.transition_state_already_exists |
TransitionState already exists exception |
de.profiforms.docxworld.connect.company.error.client.customer_contract_cant_be_deleted |
CustomerContract can’t be deleted |
de.profiforms.docxworld.connect.company.error.client.customer_number_cant_be_deleted |
CustomerNumber can’t be deleted |
de.profiforms.docxworld.connect.company.error.client.instant_state_in_the_past |
States from the past cannot be deleted |
de.profiforms.docxworld.connect.company.error.sns.send_message_failed |
Failed to send notifications. Changes cannot be applied. |
Contract
Example request
GET /v1/customer-contracts?sort=fileType%2CDESC&sort=uploadType%2CDESC&sort=customerContract&page=0&size=10&customerContracts=customerContract&customerNumbers=customerNumber&companyIds=00000000-0000-0000-0000-000000000001&uploadTypes=JOB&fileTypes=PDF&approvable=true&collectable=true&state=ACTIVE&expectedFileFormat=PDF HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1156
{
"content" : [ {
"number" : "customerContract-customerContract1",
"version" : null,
"description" : "customerContract-customerContract1 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB",
"isActive" : false
}, {
"number" : "customerContract-customerContract2",
"version" : null,
"description" : "customerContract-customerContract2 description",
"states" : [ {
"state" : "ACTIVE",
"validFrom" : "2121-01-31T11:22:33.456Z"
}, {
"state" : "INACTIVE",
"validFrom" : "2121-02-01T11:22:33.456Z"
} ],
"approvable" : false,
"collectable" : false,
"externalOutput" : false,
"fileType" : "PDF",
"uploadType" : "JOB",
"isActive" : false
} ],
"totalElements" : 2,
"totalPages" : 1,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"size" : 2,
"number" : 0,
"sort" : [ ]
}
Example. Read contracts with filter
GET /v1/customer-contracts?sort=fileType%2CDESC&sort=uploadType%2CDESC&sort=customerContract&page=0&size=10&customerContracts=customerContract&customerNumbers=customerNumber&companyIds=00000000-0000-0000-0000-000000000001&uploadTypes=JOB&fileTypes=PDF&approvable=true&collectable=true&state=ACTIVE&expectedFileFormat=PDF HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Host: localhost:8080
Workflow
Register new workflow request
POST /v1/workflows HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Content-Length: 268
Host: localhost:8080
{
"customerContract" : "customerContract-1-1",
"name" : "workflow 1",
"abbreviation" : "W1",
"description" : "description workflow 1",
"approvalNeeded" : false,
"status" : "ACTIVE",
"externalReceiver" : {
"url" : "https://external-receiver-url"
}
}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
name |
String |
Workflow name. Must be unique(case insensitive) |
Must not be blank. Size must be between 1 and 64 inclusive |
abbreviation |
String |
Workflow abbreviation. Must be unique(case insensitive) |
Must not be blank. Size must be between 1 and 16 inclusive |
customerContract |
String |
Customer contract number, workflow associated with |
Must not be blank |
description |
String |
Workflow description |
Size must be between 0 and 255 inclusive |
approvalNeeded |
Boolean |
If approval is requered for this workflow |
|
externalReceiver.url |
String |
External receiver |
|
status |
String |
Status of the workflow. Allowed values: [ACTIVE, INACTIVE] |
Example response
HTTP/1.1 201 Created
Location: http://localhost:8080/v1/workflows/00000000-0000-0000-0000-000000000001
Content-Type: application/json
Content-Length: 420
{
"id" : "00000000-0000-0000-0000-000000000001",
"version" : 1,
"companyId" : "00000000-0000-0000-0000-000000000001",
"customerContract" : "customerContract-1-1",
"name" : "workflow 1",
"abbreviation" : "W1",
"description" : "description workflow 1",
"approvalNeeded" : false,
"status" : "ACTIVE",
"encryptionAllowed" : true,
"externalReceiver" : {
"url" : "https://external-receiver-url"
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
Workflow id |
|
|
Company id |
|
|
Workflow name |
|
|
Customer contract number, workflow associated with |
|
|
Workflow abbreviation |
|
|
Workflow description |
|
|
If approval is required for this workflow |
|
|
If encryption is allowed for this workflow |
|
|
Workflow revision. Changes to Workflow will change it revision |
|
|
Workflow status. Possible values: [ACTIVE, INACTIVE] |
|
|
External receiver url |
Update workflow meta-data request
PUT /v1/workflows/00000000-0000-0000-0000-000000000001 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Content-Length: 98
Host: localhost:8080
{
"name" : "newName",
"abbreviation" : "newAbbreviation",
"description" : "newDescription"
}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
name |
String |
Workflow name. Must be unique(case insensitive) |
Must not be blank. Size must be between 1 and 64 inclusive |
abbreviation |
String |
Workflow abbreviation. Must be unique(case insensitive) |
Must not be blank. Size must be between 1 and 16 inclusive |
description |
String |
Workflow description. |
Size must be between 0 and 255 inclusive |
Update workflow settings request
PUT /v1/workflows/00000000-0000-0000-0000-000000000001/settings HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Content-Length: 29
Host: localhost:8080
{
"approvalNeeded" : true
}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
approvalNeeded |
Boolean |
Workflow setting, if approval is needed. |
Update workflow status request
PUT /v1/workflows/00000000-0000-0000-0000-000000000001/status HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Content-Length: 27
Host: localhost:8080
{
"status" : "INACTIVE"
}
Request fields
Path | Type | Description | Constraints |
---|---|---|---|
status |
String |
Workflow status. Allowed values: [ACTIVE, INACTIVE] |
Get workflow by ID
GET /v1/workflows/00000000-0000-0000-0000-000000000001 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 420
{
"id" : "00000000-0000-0000-0000-000000000001",
"version" : 1,
"companyId" : "00000000-0000-0000-0000-000000000001",
"customerContract" : "customerContract-1-1",
"name" : "workflow 1",
"abbreviation" : "W1",
"description" : "description workflow 1",
"approvalNeeded" : false,
"status" : "ACTIVE",
"encryptionAllowed" : true,
"externalReceiver" : {
"url" : "https://external-receiver-url"
}
}
List workflows request
Request parameters
GET /v1/workflows
Parameter | Description |
---|---|
|
Filter and return workflows containing provided sequence in name, abbreviation or description. Case insensitive. |
|
Filter and return workflows with provided name. |
|
Filter and return workflows assigned to provided contracts. |
|
Filter and return workflows assigned to provided companies. |
|
Filter and return workflows with provided abbreviation. |
|
Filter and return workflows with provided approvalNeeded. |
|
Page number to return. [0,totalPages) |
|
Page size. Default 35 |
Example request
GET /v1/workflows?page=0&size=5&freeSearch=345&name=workflow&customerContracts=1&customerContracts=2&companyIds=00000000-0000-0000-0000-000000000001&companyIds=00000000-0000-0000-0000-000000000002&abbreviation=w1&approvalNeeded=false HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1076
{
"content" : [ {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"companyId" : "00000000-0000-0000-0000-000000000001",
"customerContract" : "customerContract-1-1",
"name" : "workflow 1",
"abbreviation" : "W1",
"description" : "description workflow 1",
"approvalNeeded" : false,
"status" : "ACTIVE",
"encryptionAllowed" : true,
"externalReceiver" : {
"url" : "https://external-receiver-url"
}
}, {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"companyId" : "00000000-0000-0000-0000-000000000001",
"customerContract" : "customerContract-1-1",
"name" : "workflow 1",
"abbreviation" : "W1",
"description" : "description workflow 1",
"approvalNeeded" : false,
"status" : "ACTIVE",
"encryptionAllowed" : true,
"externalReceiver" : {
"url" : "https://external-receiver-url"
}
} ],
"totalElements" : 2,
"totalPages" : 1,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"size" : 2,
"number" : 0,
"sort" : [ ]
}
Target
Get target by ID
GET /v1/targets/00000000-0000-0000-0000-000000000001 HTTP/1.1
Content-Type: application/json;charset=UTF8
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 567
{
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"targetType" : "DEFAULT",
"workflow" : {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"companyId" : "00000000-0000-0000-0000-000000000001",
"customerContract" : "customerContract-1-1",
"name" : "workflow 1",
"abbreviation" : "W1",
"description" : "description workflow 1",
"approvalNeeded" : false,
"status" : "ACTIVE",
"encryptionAllowed" : true,
"externalReceiver" : {
"url" : "https://external-receiver-url"
}
}
}
List targets request
Request parameters
GET /v1/targets
Parameter | Description |
---|---|
|
Filter and return targets assigned to provided contracts. |
|
Filter and return targets assigned to provided companies. |
|
Filter and return targets assigned to provided workflows. |
|
Page number to return. [0,totalPages) |
|
Page size. Default 35 |
|
Sorting in format [property][,ASC|DESC]. Allowed values: [workflow]. Allowed direction: [ASC, DESC]. Default direction is ASC. |
Example request
GET /v1/targets?page=0&size=5&customerContracts=1&customerContracts=2&companyIds=00000000-0000-0000-0000-000000000001&companyIds=00000000-0000-0000-0000-000000000002&workflowIds=00000000-0000-0000-0000-000000000001&workflowIds=00000000-0000-0000-0000-000000000002 HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_ADMIN
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1384
{
"content" : [ {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"targetType" : "DEFAULT",
"workflow" : {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"companyId" : "00000000-0000-0000-0000-000000000001",
"customerContract" : "customerContract-1-1",
"name" : "workflow 1",
"abbreviation" : "W1",
"description" : "description workflow 1",
"approvalNeeded" : false,
"status" : "ACTIVE",
"encryptionAllowed" : true,
"externalReceiver" : {
"url" : "https://external-receiver-url"
}
}
}, {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"targetType" : "DEFAULT",
"workflow" : {
"id" : "00000000-0000-0000-0000-000000000001",
"version" : null,
"companyId" : "00000000-0000-0000-0000-000000000001",
"customerContract" : "customerContract-1-1",
"name" : "workflow 1",
"abbreviation" : "W1",
"description" : "description workflow 1",
"approvalNeeded" : false,
"status" : "ACTIVE",
"encryptionAllowed" : true,
"externalReceiver" : {
"url" : "https://external-receiver-url"
}
}
} ],
"totalElements" : 2,
"totalPages" : 1,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"size" : 2,
"number" : 0,
"sort" : [ ]
}
Download
List downloads request
GET /v1/downloads
Parameter | Description |
---|---|
|
Filter and return downloads for given targets. |
|
Filter and return downloads for target-names containing input value. |
|
Filter and return downloads for given download-types. Allowed values: [RESULT, REPORT] |
|
Page number to return. [0,totalPages) |
|
Page size. Default 35 |
|
Sorting in format [property][,ASC|DESC]. Allowed values: [created, targetName, downloadType]. Allowed direction: [ASC, DESC]. Default direction is ASC. |
Example request
##
GET /v1/downloads?targets=00000000-0000-0000-0000-000000000001&targets=00000000-0000-0000-0000-000000000002&downloadTypes=RESULT&downloadTypes=REPORT HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_DOWNLOADER_RESULTS
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 834
{
"content" : [ {
"id" : "00000000-0000-0000-0000-000000000001",
"fileName" : "download1",
"customerContract" : "42",
"targetId" : "00000000-0000-0000-0000-000000000001",
"targetName" : "targetName_42",
"created" : "2121-01-31T11:17:33.456Z",
"downloadLinkGenerated" : false,
"size" : 42,
"type" : "RESULT"
}, {
"id" : "00000000-0000-0000-0000-000000000001",
"fileName" : "download2",
"customerContract" : "42",
"targetId" : "00000000-0000-0000-0000-000000000001",
"targetName" : "targetName_42",
"created" : "2121-01-31T11:17:33.456Z",
"downloadLinkGenerated" : false,
"size" : 42,
"type" : "RESULT"
} ],
"totalElements" : 2,
"totalPages" : 1,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"size" : 2,
"number" : 0,
"sort" : [ ]
}
Get download link
Example request
GET /v1/downloads/00000000-0000-0000-0000-000000000001/generate-link HTTP/1.1
X-PF-DWC-Requester-Role: ROLE_CUSTOMER_DOWNLOADER_RESULTS
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 406
{
"id" : "00000000-0000-0000-0000-000000000001",
"downloadLink" : "https://dwc-ai-test.s3.eu-central-1.amazonaws.com/report.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220607T153352Z&X-Amz-SignedHeaders=host&X-Amz-Expires=548767&X-Amz-Credential=AKIAWSSDUUOI3B7IN4U3%2F20220607%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Signature=45a70be4763f8adc3836218c2c0de829dc17b1e598a716e2d916131935fd23cb"
}
Known error codes
Code | Description |
---|---|
de.profiforms.docxworld.connect.download.error.client.access_denied |
Access denied |
de.profiforms.docxworld.connect.download.error.client.malformed_request |
Malformed JSON request |
de.profiforms.docxworld.connect.download.error.client.invalid_sort_argument |
Invalid sort argument exception |
de.profiforms.docxworld.connect.download.error.client.no_file_attached |
No file attached exception |
de.profiforms.docxworld.connect.download.error.client.validation |
Validation error |
de.profiforms.docxworld.connect.download.error.client.target_not_exists |
Target not exists exception |
de.profiforms.docxworld.connect.download.error.server.unexpected_internal |
Unexpected internal error |
de.profiforms.docxworld.connect.download.error.client.error |
Client error |
de.profiforms.docxworld.connect.download.error.client.file_not_exists |
File not exists exception |
de.profiforms.docxworld.connect.download.error.client.role_header_missing |
Required request header is missing |