Import-based document drafter v2
- Print
- PDF
Import-based document drafter v2
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Description
Drafts documents via import
Request URL
POST https://workplace.apigw.ntruss.com/workflow/apigw/v2/company/{companyId}/import/doc
Request headers
Header | Description |
---|---|
x-ncp-apigw-timestamp | - It indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC - Request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes |
x-ncp-iam-access-key | - Access key ID issued from the NAVER Cloud Platform portal or a sub-account |
x-ncp-apigw-signature-v2 | - Signature of the body in the above example encrypted with secret key mapped to access key ID - HMAC encryption algorithm is HMAC-SHA256 |
Request path parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Integration key (CompanyId) Developers > Default settings > Integration key |
Request body parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
docNo | String | 100 | Y | Document number |
dfmNm | String | 100 | Y | Form name |
docTitle | String | 1000 | Y | Title |
trgtUserNm | String | 1000 | Y | Applicant |
drftYmd | String | 8 | Y | Draft date (YYYYMMDD) |
pdfFileId | String | 36 | N | PDF attachment ID |
registExternalKey | String | 36 | Y | Registrant ID - Foreign key (external) - Requires WORKPLACE employee ID, foreign key, or login ID |
registUserId | String | 36 | Y | Registrant WORKPLACE ID - Requires WORKPLACE employee ID, foreign key, or login ID |
registLoginId | String | 36 | Y | Registrant login ID - Requires WORKPLACE employee ID, foreign key, or login ID |
fileIdList | List | N | Attachment ID | |
aprvLineList | List | N | Approval line information - Approval Line Details | |
shreTargetTpCd | String | 20 | N | Share target (not shared if sharer information is omitted) - user: Share with certain targets - comp: Share with all targets |
shreTargetList | List | N | Sharer information - Sharer Details |
Approval line details
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
aprvOrd | int | Y | Approval order (filled in sequentially from 1) | |
aprvUserNm | String | 1000 | Y | Approver name |
aprvDt | String | 20 | Y | Approval date and time (YYYY-MM-DD HH:MM:SS) |
Sharer details
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
shreUserCompanyId | String | 36 | Y | Share target (user): Sharer company ID |
shreExternalKey | String | 36 | Y | Share target (user): Sharer foreign key - Requires WORKPLACE employee ID, foreign key, or login ID |
shreUserId | String | 36 | Y | Share target (user): Sharer WORKPLACE ID - Requires WORKPLACE employee ID, foreign key, or login ID |
shreLoginId | String | 36 | Y | Share target (user): Sharer login ID - Requires WORKPLACE employee ID, foreign key, or login ID |
shreCompanyId | String | 36 | Y | Share target (comp): Valid sharer company ID |
Request examples
POST /workflow/apigw/v2/company/e721e2da-29ee-4782-9672-3d2b150ac1a6/import/doc
HOST: workplace.apigw.ntruss.com
Content-Type: application/json
x-ncp-apigw-timestamp: 1505290625682
x-ncp-iam-access-key: D78BB444D6D3C84CA38A
x-ncp-apigw-signature-v2: WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=
{
"docNo": "2022-EX001",
"dfmNm": "Draft document",
"docTitle": "Draft document for approval",
"trgtUserNm": "Honggildong",
"drftYmd": "20220820",
"pdfFileId": "dbee1643-4c3e-47de-9b42-4166a42705ed",
"registExternalKey": "",
"registUserId": "96b02530-82de-41c8-8223-3055c74e705e",
"registLoginId": "",
"fileIdList": [
"007d4fbc-dcaf-423c-9c15-fb3716be21e3",
"0218bd02-402c-4fee-ba16-385665e00b67"
],
"aprvLineList": [
{
"aprvOrd": 1,
"aprvUserNm": "Honggildong",
"aprvDt": "2022-08-21 15:00:00"
}
],
"shreTargetTpCd": "user",
"shreTargetList": [
{
"shreUserCompanyId" : "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"shreExternalKey": "",
"shreUserId": "",
"shreLoginId": "admin@test.co.kr",
"shreCompanyId": ""
}
]
}
Responses
Returned as HTTP status codes in the response body
HTTP status code | Response message | Description |
---|---|---|
200 | OK | Normal successful request |
201 | Created | Successful resource creation |
400 | Bad Request | Request failure |
500 | Internal Server Error | - Common server error - Error codes in the 400 range indicate client-side errors - Error codes in the 500 range indicate server-side errors |
Response examples
HTTP/1.1 200 OK
Server: nginx
date: Sun21 Aug 2022 05:37:34 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 68d1o68pm4cr63gc3169gm4p34
{
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"docId": "22541"
}
Was this article helpful?