Skip to content

Commit b1b741a

Browse files
committed
OneBlink & CivicPlus v1.11
AP-6057 # Custom PDF operation
1 parent 89eb4eb commit b1b741a

File tree

2 files changed

+495
-31
lines changed

2 files changed

+495
-31
lines changed

certified-connectors/CivicPlus/apiDefinition.swagger.json

Lines changed: 251 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"version": "1.10",
4+
"version": "1.11",
55
"title": "CivicPlus Transform",
66
"description": "Empowers business users to create and deploy digital forms for enterprise and government organizations as web and native apps, while allowing developers to customize, extend, or harness the forms through their own custom apps. Connect your forms with this connector to allow easy submission of your form data into your backend systems or databases without the need to write complex integration code.",
77
"contact": {
@@ -15,9 +15,15 @@
1515
},
1616
"host": "auth-api.transform.civicplus.com",
1717
"basePath": "/",
18-
"schemes": ["https"],
19-
"consumes": ["application/json"],
20-
"produces": ["application/json"],
18+
"schemes": [
19+
"https"
20+
],
21+
"consumes": [
22+
"application/json"
23+
],
24+
"produces": [
25+
"application/json"
26+
],
2127
"paths": {
2228
"/form-submission-meta/web-hooks": {
2329
"x-ms-notification-content": {
@@ -40,7 +46,9 @@
4046
"x-ms-visibility": "important",
4147
"schema": {
4248
"type": "object",
43-
"required": ["callbackUrl"],
49+
"required": [
50+
"callbackUrl"
51+
],
4452
"properties": {
4553
"callbackUrl": {
4654
"type": "string",
@@ -72,7 +80,10 @@
7280
"x-ms-visibility": "advanced",
7381
"title": "Trigger",
7482
"description": "Select when this trigger will occur",
75-
"enum": ["AFTER_SUBMISSION", "AFTER_APPROVAL"],
83+
"enum": [
84+
"AFTER_SUBMISSION",
85+
"AFTER_APPROVAL"
86+
],
7687
"x-ms-enum-values": [
7788
{
7889
"value": "AFTER_SUBMISSION",
@@ -267,7 +278,9 @@
267278
"summary": "Retrieve Form Submission Attachment",
268279
"operationId": "GetFormSubmissionAttachment",
269280
"x-ms-visibility": "important",
270-
"produces": ["*/*"],
281+
"produces": [
282+
"*/*"
283+
],
271284
"parameters": [
272285
{
273286
"name": "formId",
@@ -339,7 +352,9 @@
339352
"summary": "Retrieve Forms",
340353
"operationId": "GetForms",
341354
"x-ms-visibility": "internal",
342-
"produces": ["application/json"],
355+
"produces": [
356+
"application/json"
357+
],
343358
"parameters": [],
344359
"responses": {
345360
"200": {
@@ -391,6 +406,80 @@
391406
}
392407
}
393408
},
409+
"/forms/{formId}": {
410+
"get": {
411+
"description": "Allow for a Form to be retrieved",
412+
"summary": "Retrieve Form",
413+
"operationId": "GetForm",
414+
"x-ms-visibility": "internal",
415+
"produces": [
416+
"application/json"
417+
],
418+
"parameters": [
419+
{
420+
"in": "path",
421+
"name": "formId",
422+
"type": "integer",
423+
"required": true,
424+
"x-ms-visibility": "important"
425+
}
426+
],
427+
"responses": {
428+
"200": {
429+
"description": "OK",
430+
"schema": {
431+
"type": "object",
432+
"properties": {
433+
"id": {
434+
"type": "number"
435+
},
436+
"name": {
437+
"type": "string"
438+
},
439+
"customPDFs": {
440+
"type": "array",
441+
"items": {
442+
"type": "object",
443+
"properties": {
444+
"id": {
445+
"type": "string"
446+
},
447+
"label": {
448+
"type": "string"
449+
}
450+
}
451+
}
452+
}
453+
}
454+
}
455+
},
456+
"401": {
457+
"description": "Unauthenticated",
458+
"schema": {
459+
"$ref": "#/definitions/APIErrorPayload"
460+
}
461+
},
462+
"403": {
463+
"description": "Forbidden",
464+
"schema": {
465+
"$ref": "#/definitions/APIErrorPayload"
466+
}
467+
},
468+
"404": {
469+
"description": "Not Found",
470+
"schema": {
471+
"$ref": "#/definitions/APIErrorPayload"
472+
}
473+
},
474+
"500": {
475+
"description": "Internal Server Error",
476+
"schema": {
477+
"$ref": "#/definitions/APIErrorPayload"
478+
}
479+
}
480+
}
481+
}
482+
},
394483
"/forms/{formId}/approval-steps": {
395484
"get": {
396485
"description": "Allows for Form approval steps to be retrieved",
@@ -586,7 +675,9 @@
586675
"summary": "Generate Form Submission PDF",
587676
"operationId": "GenerateFormSubmissionPDF",
588677
"x-ms-visibility": "important",
589-
"produces": ["application/pdf"],
678+
"produces": [
679+
"application/pdf"
680+
],
590681
"parameters": [
591682
{
592683
"name": "formId",
@@ -616,6 +707,11 @@
616707
"x-ms-summary": "Include submission identifier in PDF",
617708
"description": "The submission identifier can be included at the bottom of each page in the PDF"
618709
},
710+
"includeExternalIdInPdf": {
711+
"type": "boolean",
712+
"x-ms-summary": "Include external identifier in PDF",
713+
"description": "The external identifier can be included at the bottom of each page in the PDF"
714+
},
619715
"includePaymentInPdf": {
620716
"type": "boolean",
621717
"x-ms-summary": "Include payment details in PDF",
@@ -626,6 +722,17 @@
626722
"x-ms-summary": "Page break on form pages",
627723
"description": "Form pages can be translated to page breaks in the PDF"
628724
},
725+
"excludedCSSClasses": {
726+
"type": "array",
727+
"x-ms-summary": "Excluded form elements via CSS classes",
728+
"description": "The CSS classes assigned to the form elements to exclude from the PDF",
729+
"x-ms-visibility": "advanced",
730+
"items": {
731+
"type": "string",
732+
"description": "The CSS class assigned to the form elements to exclude from the PDF",
733+
"x-ms-summary": "CSS class"
734+
}
735+
},
629736
"excludedElementIds": {
630737
"type": "array",
631738
"x-ms-summary": "Excluded form elements",
@@ -645,7 +752,9 @@
645752
"x-ms-summary": "Include Approval Details In PDF",
646753
"title": "Include Approval Details In PDF",
647754
"x-ms-visibility": "advanced",
648-
"enum": ["ALL"]
755+
"enum": [
756+
"ALL"
757+
]
649758
}
650759
}
651760
},
@@ -654,7 +763,10 @@
654763
"x-ms-summary": "Change PDF page sizing",
655764
"title": "PDF Page Size",
656765
"x-ms-visibility": "advanced",
657-
"enum": ["Letter", "A4"],
766+
"enum": [
767+
"Letter",
768+
"A4"
769+
],
658770
"x-ms-enum-values": [
659771
{
660772
"value": "Letter",
@@ -707,13 +819,125 @@
707819
}
708820
}
709821
},
822+
"/forms/{formId}/submissions/{submissionId}/custom-pdf-document": {
823+
"post": {
824+
"description": "Allows for a custom PDF to be generated",
825+
"summary": "Generate Custom PDF",
826+
"operationId": "GenerateCustomPDF",
827+
"x-ms-visibility": "important",
828+
"produces": [
829+
"application/pdf"
830+
],
831+
"parameters": [
832+
{
833+
"name": "formId",
834+
"in": "path",
835+
"description": "Form containing the custom PDF",
836+
"required": true,
837+
"type": "integer",
838+
"x-ms-summary": "Form",
839+
"x-ms-visibility": "important",
840+
"x-ms-dynamic-values": {
841+
"operationId": "GetForms",
842+
"value-path": "id",
843+
"value-collection": "forms",
844+
"value-title": "name"
845+
}
846+
},
847+
{
848+
"name": "submissionId",
849+
"in": "path",
850+
"description": "ID of the form submission",
851+
"required": true,
852+
"type": "string",
853+
"x-ms-summary": "Submission Id",
854+
"x-ms-visibility": "important"
855+
},
856+
{
857+
"name": "Request Body",
858+
"in": "body",
859+
"description": "This is the request body",
860+
"schema": {
861+
"type": "object",
862+
"properties": {
863+
"customPdfId": {
864+
"type": "string",
865+
"x-ms-summary": "Custom PDF",
866+
"x-ms-visibility": "important",
867+
"description": "The custom PDF to generate",
868+
"x-ms-dynamic-values": {
869+
"operationId": "GetForm",
870+
"value-path": "id",
871+
"value-collection": "customPDFs",
872+
"value-title": "label",
873+
"parameters": {
874+
"formId": {
875+
"parameter": "formId"
876+
}
877+
}
878+
}
879+
},
880+
"isCustomPdfEditable": {
881+
"type": "boolean",
882+
"x-ms-summary": "Allow editing PDF",
883+
"x-ms-visibility": "important",
884+
"description": "Allow resulting filled fields on PDF to be edited",
885+
"default": false
886+
}
887+
},
888+
"required": [
889+
"customPdfId",
890+
"isCustomPdfEditable"
891+
]
892+
}
893+
}
894+
],
895+
"responses": {
896+
"201": {
897+
"description": "Created",
898+
"schema": {
899+
"type": "string",
900+
"format": "binary",
901+
"description": "Output file content from the PDF Service",
902+
"x-ms-summary": "Form Submission PDF Content"
903+
}
904+
},
905+
"401": {
906+
"description": "Unauthenticated",
907+
"schema": {
908+
"$ref": "#/definitions/APIErrorPayload"
909+
}
910+
},
911+
"403": {
912+
"description": "Forbidden",
913+
"schema": {
914+
"$ref": "#/definitions/APIErrorPayload"
915+
}
916+
},
917+
"404": {
918+
"description": "Not Found",
919+
"schema": {
920+
"$ref": "#/definitions/APIErrorPayload"
921+
}
922+
},
923+
"500": {
924+
"description": "Internal Server Error",
925+
"schema": {
926+
"$ref": "#/definitions/APIErrorPayload"
927+
}
928+
}
929+
}
930+
}
931+
},
710932
"/form-submission-meta/{submissionId}/payments/cp-pay": {
711933
"get": {
712934
"description": "Allows for a CivicPlus Pay Payment to be retrieved",
713935
"summary": "Get CivicPlus Pay Payment",
714936
"operationId": "GetFormSubmissionCivicPlusPayPayment",
715937
"x-ms-visibility": "important",
716-
"produces": ["application/json"],
938+
"produces": [
939+
"application/json"
940+
],
717941
"parameters": [
718942
{
719943
"name": "submissionId",
@@ -1211,12 +1435,19 @@
12111435
"x-ms-summary": ": Payment Method"
12121436
},
12131437
"CPPayPaymentTypeEnum": {
1214-
"enum": ["CreditDebitCard", "Ach"],
1438+
"enum": [
1439+
"CreditDebitCard",
1440+
"Ach"
1441+
],
12151442
"type": "string",
12161443
"x-ms-summary": ": Payment Type"
12171444
},
12181445
"CPPayResponseTypeEnum": {
1219-
"enum": ["Incomplete", "Success", "Fail"],
1446+
"enum": [
1447+
"Incomplete",
1448+
"Success",
1449+
"Fail"
1450+
],
12201451
"type": "string"
12211452
},
12221453
"CPPayErrorCodeEnum": {
@@ -1351,7 +1582,11 @@
13511582
"x-ms-summary": ": Error Code"
13521583
},
13531584
"CPPaySignatureFormatEnum": {
1354-
"enum": ["RawData", "Png", "SigBin2"],
1585+
"enum": [
1586+
"RawData",
1587+
"Png",
1588+
"SigBin2"
1589+
],
13551590
"type": "string",
13561591
"x-ms-summary": ": Signature Format"
13571592
}
@@ -1381,4 +1616,4 @@
13811616
"propertyValue": "Productivity;Data"
13821617
}
13831618
]
1384-
}
1619+
}

0 commit comments

Comments
 (0)