{"id":8435,"date":"2022-02-07T14:28:00","date_gmt":"2022-02-07T22:28:00","guid":{"rendered":"https:\/\/minisoft.com\/support\/?p=8435"},"modified":"2022-06-08T15:48:51","modified_gmt":"2022-06-08T22:48:51","slug":"eformz-api-management-developer-resources","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/eformz-api-management-developer-resources\/","title":{"rendered":"eFORMz API Management (Developer Resources) [Web Services]"},"content":{"rendered":"\n<p>NOTE: For information on the Ship\/FX API, consult the following: <a href=\"\/support\/index.php\/ship-fx-api-management-developer-resources\/\">Ship\/FX API Management (Developer Resources)<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"591\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-1024x591.png\" alt=\"\" class=\"wp-image-8436\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-1024x591.png 1024w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-300x173.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-768x443.png 768w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-1536x886.png 1536w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-2048x1181.png 2048w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-150x87.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-250x144.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-550x317.png 550w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-800x461.png 800w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-312x180.png 312w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-520x300.png 520w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/09\/eFORMz_API-867x500.png 867w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">Drop Ship<\/h1>\n\n\n\n<p>Calling the eFORMz dropship template library makes use of the &#8216;output&#8217; endpoint, which is described in more detail below.  <\/p>\n\n\n\n<p>Dropship Standardized XML Schema: <a href=\"\/support\/wp-content\/uploads\/2020\/09\/DropShipSchema.zip\">DropShipSchema<\/a><\/p>\n\n\n\n<p>Call Dropship (JSON): <a href=\"\/support\/wp-content\/uploads\/2021\/05\/DropShipSample.postman_collection.zip\">DropShipSample<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2021\/05\/DropShip_JSON.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"360\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2021\/05\/DropShip_JSON-1024x360.png\" alt=\"\" class=\"wp-image-9247\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/05\/DropShip_JSON-1024x360.png 1024w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/05\/DropShip_JSON-300x105.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/05\/DropShip_JSON-768x270.png 768w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/05\/DropShip_JSON-150x53.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/05\/DropShip_JSON.png 1343w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">Endpoints: Director\/Output<\/h1>\n\n\n\n<p>There are two primary endpoints available to eFORMz customers. These are the \u2018director\u2019 and \u2018output\u2019 endpoints.<\/p>\n\n\n\n<p>An \u201cendpoint\u201d is one end of a communication channel. When&nbsp;<a href=\"https:\/\/minisoft.com\/support\/index.php\/eformz-api\/\">an API interacts with another system<\/a>, the touchpoints of this communication are considered endpoints. For APIs, an endpoint can include a URL of a server or service. The place that APIs send requests and where the resource lives is called an endpoint.<\/p>\n\n\n\n<p>The \u2018director\u2019 endpoint returns success or failure only. It processes data in the background. The \u2018output\u2019 endpoint processes data during the call and returns the results as part of the web service call. Both of these endpoints can take parameters either through the URL or in the data.<\/p>\n\n\n\n<p>While the portion of the URL with authentication is encrypted for transmission, many people have policies restricting this practice. Passing the parameters in the data, including authentication, is possible using either XML or JSON. The order or sequence of elements in either format is not relevant to the processing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">eFORMz Web Service API response codes<\/h3>\n\n\n\n<p>As stated above, for an API call to the \u201cdirector\u201d endpoint, there are the two responses: success or failure. Effectively, you are pushing data into an \u2018-ac\u2019 (accessible) Local Director Queue. The response codes are <code>200<\/code> for success and <code>500<\/code> for an error.<\/p>\n\n\n\n<p>The \u2018output\u2019 endpoint executes a project, which can call other projects, and returns output. The type of project output is configurable. There are quite a few responses possible if the URL is not formed in an expected fashion. A good source for the \u2018types\u2019 of endpoints is the AuthenticationCfg.xml file. There you will find:<br>\u2022 &lt;Authentication Name=&#8221;activeFORMz&#8221;<br>\u2022 &lt;Authentication Name=&#8221;eFORMz Web Services&#8221;<br>\u2022 &lt;Authentication Name=&#8221;ServiceManagerManagement&#8221;<br>\u2022 &lt;Authentication Name=&#8221;ServiceManagerConfiguration&#8221;<\/p>\n\n\n\n<p>The AuthenticationCfg.xml has <code>401<\/code> responses in addition to the <code>200<\/code> and <code>500<\/code> codes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Authentication\/Authorization<\/h2>\n\n\n\n<p>Authentication proves who you are. Authorization refers to what you are allowed to see and do. <code>AuthenticationCfg.xml<\/code> is the file that handles authentication and authorization. Web Service Authentication can be through username\/password, LDAP, Kerberos or Azure AD. <\/p>\n\n\n\n<p>Basic (<code>username:password<\/code>)<br>Authenticator=<code>\"com.minisoft.common.CredentialsInXMLFileAuthenticator\"<\/code><br>Authenticator=<code>\"com.minisoft.common.ADAuthenticator\"<br><\/code>Authenticator=<code>\"com.minisoft.common.LDAPAuthenticator\"<\/code><\/p>\n\n\n\n<p>Bearer (Token-based authentication)<br>Authenticator=<code>\"com.minisoft.common.AADAuthenticator\"<\/code><\/p>\n\n\n\n<p>The on-premises Microsoft Active Directory is accessed through Kerberos. Azure Active Directory is web-based and has its own definition within the <code>AuthenticationCfg.xml<\/code>. Web Service Authorization (for an authenticated user) is through the URL\/URI used. This depends on the endpoint used and can be the project of config parameters. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Group Name=\"Testing\"&gt;\n     &lt;Member Name=\"projects\/eSHIP\/SHIPFXConfiguration.xml\" \/&gt;\n     &lt;Member Name=\"projects\/SHIPFX\/SHIPFXAdmin.xml\" \/&gt;\n     &lt;Member Name=\"projects\/eSHIP\/ShipperWS.efz\" \/&gt;\n     &lt;Member Name=\"projects\/eSHIP\/GetRatesWS.efz\" \/&gt;\n&lt;\/Group&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">URL Formats<\/h2>\n\n\n\n<p><a href=\"\/support\/index.php\/eformz-api-url-formats\/\">eFORMz API: URL Formats<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Parameters<\/h2>\n\n\n\n<p><a href=\"\/support\/index.php\/eformz-api-url-parameters\/\">eFORMz API URL Parameters<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Director Sample<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">URL<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/localhost:8001\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">XML<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;ServiceConfiguration ServiceType=\"director\" Host=\"localhost\" Port=\"9996\" ConfigurationName=\"accessible.cfg\" QueueName=\"Accessible\" NameTemplate=\"data_.xml\" ProcessData=\"true\" UseParmsAsData=\"false\"&gt;\n  &lt;InputData usepostdata=\"false\" format=\"XML\" encoding=\"none\"&gt;\n    &lt;Data&gt;\n      &lt;AdditionalInfo&gt;\n                &lt;misc&gt;info&lt;\/misc&gt;\n      &lt;\/AdditionalInfo&gt;\n    &lt;\/Data&gt;\n  &lt;\/InputData&gt;\n&lt;\/ServiceConfiguration&gt;\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">JSON<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"ServiceConfiguration\":\n          {\n             \"ServiceType\":\"director\",\n             \"Port\":9996,\n             \"NameTemplate\":\"data_.json\",\n             \"Host\":\"localhost\",\n             \"UseParmsAsData\":false,\n             \"ConfigurationName\":\"accessible.cfg\",\n             \"InputData\":\n             {\n                    \"usepostdata\":false,\n                    \"format\":\"JSON\",\n                    \"Data\":\n                    {\n                          \"AdditionalInfo\":\n                               {\n                               \u201cmisc\u201d:\u201dinfo\u201d\n                               },\n                    },\n                    \"encoding\":\"none\"\n             },\n             \"QueueName\":\"Accessible\",\n             \"ProcessData\":true\n          }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Output Sample<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">XML<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/localhost:8001\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp&amp;config=projects\/OutputGuideServer\/configOutputUsePostData.xml<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt; \n&lt;ServiceConfiguration ServiceType=\"output\" project=\"projects\/OutputGuideServer\/MapPackSlipData0.efz\" format=\".xml\"&gt; \n  &lt;InputData format=\"XML\"&gt; \n    &lt;Root&gt; \n      &lt;abc&gt;test&lt;\/abc&gt; \n    &lt;\/Root&gt; \n  &lt;\/InputData&gt; \n&lt;\/ServiceConfiguration&gt; <\/code><\/pre>\n\n\n\n<p>The root node must be named <code>ServiceConfiguration<\/code> and the parameters are specified as attributes of that node. The <code>output<\/code> parameter directs the eFORMz web service to return the output of an eFORMz project specified by the <code>project<\/code> parameter. The calling application can pass in input data for the project in a variety of ways. The <code>InputData<\/code> node with the attribute <code>format<\/code> specifies the format of the embedded data. The data passed to the project is the <code>Root<\/code> node and all of its descendant nodes (<code>abc<\/code> in this example).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">JSON<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"356\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-1024x356.png\" alt=\"\" class=\"wp-image-8794\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-1024x356.png 1024w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-300x104.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-768x267.png 768w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-150x52.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-250x87.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-550x191.png 550w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-800x278.png 800w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-518x180.png 518w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-863x300.png 863w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test-1438x500.png 1438w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/JSON_Test.png 1501w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>JSONTest.postman_collection.json<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/localhost:8001\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp&amp;output&amp;project=projects\/JSON\/MirrorTest.efz&amp;usepostdata&amp;dataformat=JSON&amp;format=.txt<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"success\": true,\n    \"header\": null,\n    \"data\": {\n        \"Messages\": null,\n        \"FulfillmentAddress\": &#91;\n            {\n                \"AddressTypeId\": {\n                    \"AddressTypeId\": \"Billing\"\n                },\n                \"Address\": {\n                    \"FirstName\": \"First\",\n                    \"LastName\": \"Last\",\n                    \"Address1\": \"1024 First Street\",\n                    \"Address2\": \"Suite 311\",\n                    \"Address3\": null,\n                    \"City\": \"Snohomish\",\n                    \"State\": \"WA\",\n                    \"PostalCode\": \"98290\",\n                    \"County\": null,\n                    \"Country\": \"US\",\n                    \"Phone\": \"8006820200\",\n                    \"Email\": \"sales@minisoft.com\"\n                },\n                \"Process\": null\n            },\n        ],\n    },\n    \"message\": null,\n    \"errors\": &#91;],\n    \"exceptions\": &#91;],\n    \"messages\": {\n        \"Message\": &#91;],\n        \"Size\": 0\n    },\n}<\/code><\/pre>\n\n\n\n<p>Download the working sample with a Postman test call here: <a href=\"\/support\/wp-content\/uploads\/2021\/01\/JSONTest.zip\"><strong>JSONTest<\/strong><\/a>. JSON comes in, the MirrorAction.efz project affects the fields and JSON is sent out.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Set Response Header<\/h3>\n\n\n\n<p>Response headers can be set by the project defining and setting global variables:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"365\" height=\"177\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type1.png\" alt=\"\" class=\"wp-image-8781\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type1.png 365w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type1-300x145.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type1-150x73.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type1-250x121.png 250w\" sizes=\"(max-width: 365px) 100vw, 365px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"363\" height=\"68\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type2.png\" alt=\"\" class=\"wp-image-8782\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type2.png 363w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type2-300x56.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type2-150x28.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2021\/01\/Content-Type2-250x47.png 250w\" sizes=\"(max-width: 363px) 100vw, 363px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Source Parameter (Create JSON)<\/h3>\n\n\n\n<p><code>&amp;Source<\/code> is an <a href=\"\/support\/index.php\/eformz-api-url-parameters\/\">API parameter<\/a> used to to identify a Global Variable in the called project.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;localhost:8001\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp&amp;output&amp;project=projects\/sample\/JSON_IO.efz&amp;usepostdata=true&amp;source=gsource<\/code><\/pre>\n\n\n\n<p>When the variable is found in the set of Global Variables having the \u201cPass last value to Queue Monitor\u201d set, the last value is returned as the API call return data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2022\/06\/Source1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"391\" height=\"340\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2022\/06\/Source1.png\" alt=\"\" class=\"wp-image-10365\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2022\/06\/Source1.png 391w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2022\/06\/Source1-300x261.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2022\/06\/Source1-150x130.png 150w\" sizes=\"(max-width: 391px) 100vw, 391px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2022\/02\/Source2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"485\" height=\"355\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2022\/02\/Source2.png\" alt=\"\" class=\"wp-image-10366\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2022\/02\/Source2.png 485w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2022\/02\/Source2-300x220.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2022\/02\/Source2-150x110.png 150w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/a><\/figure>\n\n\n\n<p>Tag: Make an API call<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: For information on the Ship\/FX API, consult the following: Ship\/FX API Management (Developer Resources) Drop Ship Calling the eFORMz dropship template library makes use of the &#8216;output&#8217; endpoint, which is described in more detail below. Dropship Standardized XML Schema: DropShipSchema Call Dropship (JSON): DropShipSample Endpoints: Director\/Output There are two primary endpoints available to eFORMz [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[454],"tags":[584,583,633,342,25],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8435"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=8435"}],"version-history":[{"count":26,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8435\/revisions"}],"predecessor-version":[{"id":10367,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8435\/revisions\/10367"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=8435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=8435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=8435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}