Import-based document drafter v2
    • PDF

    Import-based document drafter v2

    • PDF

    Article Summary

    Description

    Drafts documents via import

    Request URL

    POST https://workplace.apigw.ntruss.com/workflow/apigw/v2/company/{companyId}/import/doc
    


    Request headers

    HeaderDescription
    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

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YIntegration key (CompanyId) Developers > Default settings > Integration key

    Request body parameters

    ParameterTypeSizeRequirement statusDescription
    docNoString100YDocument number
    dfmNmString100YForm name
    docTitleString1000YTitle
    trgtUserNmString1000YApplicant
    drftYmdString8YDraft date (YYYYMMDD)
    pdfFileIdString36NPDF attachment ID
    registExternalKeyString36YRegistrant ID - Foreign key (external)
    - Requires WORKPLACE employee ID, foreign key, or login ID
    registUserIdString36YRegistrant WORKPLACE ID
    - Requires WORKPLACE employee ID, foreign key, or login ID
    registLoginIdString36YRegistrant login ID
    - Requires WORKPLACE employee ID, foreign key, or login ID
    fileIdListListNAttachment ID
    aprvLineListListNApproval line information
    - Approval Line Details
    shreTargetTpCdString20NShare target (not shared if sharer information is omitted)
    - user: Share with certain targets
    - comp: Share with all targets
    shreTargetListListNSharer information
    - Sharer Details

    Approval line details

    ParameterTypeSizeRequirement statusDescription
    aprvOrdintYApproval order (filled in sequentially from 1)
    aprvUserNmString1000YApprover name
    aprvDtString20YApproval date and time (YYYY-MM-DD HH:MM:SS)

    Sharer details

    ParameterTypeSizeRequirement statusDescription
    shreUserCompanyIdString36YShare target (user): Sharer company ID
    shreExternalKeyString36YShare target (user): Sharer foreign key
    - Requires WORKPLACE employee ID, foreign key, or login ID
    shreUserIdString36YShare target (user): Sharer WORKPLACE ID
    - Requires WORKPLACE employee ID, foreign key, or login ID
    shreLoginIdString36YShare target (user): Sharer login ID
    - Requires WORKPLACE employee ID, foreign key, or login ID
    shreCompanyIdString36YShare 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 codeResponse messageDescription
    200OKNormal successful request
    201CreatedSuccessful resource creation
    400Bad RequestRequest failure
    500Internal 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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.