{"info":{"_postman_id":"12dab9c6-a213-4d2b-a0c1-557f5305570c","name":"Biznesi Im API","description":"<html><head></head><body><h1 id=\"overview\">Overview</h1>\n<p>The Biznesi Im API provides a powerful tool for accessing business data within our application. By utilizing an API key for authentication, users can retrieve detailed information about registered businesses, ensuring secure and efficient data access.</p>\n<p><strong>Key features of the API include:</strong></p>\n<ul>\n<li><p><strong>Data Access:</strong> Retrieve essential business data, including company details, contact information, and ownership structure.</p>\n</li>\n<li><p><strong>Fast &amp; Reliable:</strong> Optimized for performance, the API ensures rapid data retrieval, making it ideal for applications requiring real-time access.</p>\n</li>\n<li><p><strong>Secure Integration:</strong> The API employs secure authentication via API keys, protecting sensitive business information.</p>\n</li>\n<li><p><strong>Easy to Use:</strong> With clear and structured endpoints, businesses can be found quickly and effortlessly, simplifying the process of managing and accessing business data.</p>\n</li>\n</ul>\n<p>This API enhances data discovery and management for businesses, empowering users to integrate business information seamlessly into their systems.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Overview","slug":"overview"}],"owner":"38452043","collectionId":"12dab9c6-a213-4d2b-a0c1-557f5305570c","publishedId":"2sAXxS7BT6","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-11T12:39:13.000Z"},"item":[{"name":"Authentication","item":[],"id":"c1adef45-b75e-4cf6-98e0-bfc76d2b0d34","description":"<p>To use the <strong>Biznesi Im</strong> API, each request must include an <strong>API Key</strong> for authentication. Without a valid API Key, requests will be denied.</p>\n<blockquote>\n<p>Please contact us at <a href=\"https://mailto:is@logic.al\">office@xpertt.net</a> to get access to API testing environment </p>\n</blockquote>\n<h4 id=\"requirements\">Requirements:</h4>\n<ul>\n<li><p><strong>API Key</strong>: Generated within the <strong>Biznesi Im</strong> application.</p>\n</li>\n<li><p><strong>Header</strong>: Add the API Key to each request's header:</p>\n<ul>\n<li><p><strong>Header Name</strong>: <code>X-Api-Key</code></p>\n</li>\n<li><p><strong>Header Value</strong>: <code>{API_KEY}</code></p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"example-request\">Example Request:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-csharp\">GET /api/business/getbusiness HTTP/1.1\nHost: biznesiim.com\nX-Api-Key: {API_KEY}\n\n</code></pre>\n<h4 id=\"error-handling\">Error Handling:</h4>\n<ul>\n<li><p><strong>401 Unauthorized</strong>: Requests without a valid API Key will receive this error.</p>\n</li>\n<li><p><strong>403 Forbidden</strong>: If the request comes from outside the server's domain and the <code>X-Swagger-Request</code> header is not found, the response will return a 403 status with the following error message:</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Access denied. The element 'X-Swagger-Request' could not be found. Please refer to our documentation for further details.\"\n}\n\n</code></pre>\n","_postman_id":"c1adef45-b75e-4cf6-98e0-bfc76d2b0d34"},{"name":"Endpoints","item":[{"name":"/api/business/getbusiness","id":"ee1cbe84-2e80-46eb-820c-4e2ea359a3d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Api-Key"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{base_url}}/api/Business/getbusiness?page={{page}}&pageSize={{pageSize}}","description":"<p>This endpoint fetches a paginated list of all registered businesses. It supports query parameters for pagination to retrieve businesses in chunks.</p>\n<h2 id=\"status-code\">Status Code</h2>\n<blockquote>\n<p>API return status code 200,400,404,500 </p>\n</blockquote>\n<h3 id=\"status-code-200\">Status Code 200</h3>\n<blockquote>\n<p>Success response </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"businessName\": \"string\",\n      \"tradeName\": \"string\",\n      \"businessType\": \"string\",\n      \"uniqueBusinessId\": \"number\",\n      \"businessNumber\": \"number\",\n      \"fiscalNumber\": \"number\",\n      \"numberOfEmployees\": \"number\",\n      \"registrationDate\": \"date\",\n      \"municipality\": \"string\",\n      \"address\": \"string\",\n      \"phoneNumber\": \"string\",\n      \"email\": \"string\",\n      \"capital\": \"number\",\n      \"arbK_Status\": \"boolean\",\n      \"_Activities\": [\n        {\n          \"activityId\": \"number\",\n          \"businessId\": \"number\",\n          \"activityCode\": \"number\",\n          \"activityDescription\": \"string\",\n          \"activityType\": \"string\"\n        }\n      ],\n      \"_AuthorizedRepresentatives\": [\n        {\n          \"authorizedRepresentativeId\": \"number\",\n          \"businessId\": \"number\",\n          \"firstName\": \"string\",\n          \"lastName\": \"string\",\n          \"businessPosition\": \"string\",\n          \"authorization\": \"string\"\n        }\n      ],\n      \"_OwnershipEntities\": [\n        {\n          \"ownershipEntityId\": \"number\",\n          \"businessId\": \"number\",\n          \"fullName\": \"string\",\n          \"gender\": \"string\",\n          \"capitalInEuro\": \"number\",\n          \"capitalInPercentage\": \"number\"\n        }\n      ],\n      \"_Units\": [\n        {\n          \"unitId\": \"number\",\n          \"businessId\": \"number\",\n          \"unitNumber\": \"number\",\n          \"unitName\": \"string\",\n          \"unitCode\": \"number\",\n          \"unitPlace\": \"string\"\n        }\n      ]\n    }\n  ],\n  \"succeeded\": true,\n  \"message\": \"Operation completed successfully\",\n  \"status\": 200\n}\n\n</code></pre>\n<h3 id=\"status-code-404\">Status Code 404</h3>\n<blockquote>\n<p>The requested business or data was not found. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": null,\n  \"succeeded\": false,\n  \"message\": \"Business not found\",\n  \"status\": 404\n}\n\n</code></pre>\n<h3 id=\"status-code-500\">Status Code 500</h3>\n<blockquote>\n<p>An error occurred on the server while processing the request. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": null,\n  \"succeeded\": false,\n  \"message\": \"An error occurred while fetching data\",\n  \"status\": 500\n}\n\n</code></pre>\n","urlObject":{"path":["api","Business","getbusiness"],"host":["{{base_url}}"],"query":[{"key":"page","value":"{{page}}"},{"key":"pageSize","value":"{{pageSize}}"}],"variable":[]}},"response":[{"id":"ec79e506-3864-46a8-8d33-7131b971ba73","name":"/api/business/getbusiness","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-Api-Key","value":"{{ApiKey}}","description":"Apl key for authorization\n","type":"text"}],"url":{"raw":"{{base_url}}/api/Business/getbusiness?page={{page}}&pageSize={{pageSize}}","host":["{{base_url}}"],"path":["api","Business","getbusiness"],"query":[{"key":"page","value":"{{page}}"},{"key":"pageSize","value":"{{pageSize}}"}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"X-Api-Key","value":"{{ApiKey}}","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"data\": {\n    \"businessName\": \"DataLab L.L.C.\",\n    \"tradeName\": null,\n    \"businessType\": \"Shoqëri me përgjegjësi të kufizuara\",\n    \"uniqueBusinessId\": 0,\n    \"businessNumber\": 71124347,\n    \"fiscalNumber\": 601276711,\n    \"numberOfEmployees\": 2,\n    \"registrationDate\": \"2015-01-16T00:00:00\",\n    \"municipality\": \"Prishtinë\",\n    \"address\": null,\n    \"phoneNumber\": null,\n    \"email\": null,\n    \"capital\": 30000,\n    \"arbK_Status\": true,\n    \"_Activities\": null,\n    \"_AuthorizedRepresentatives\": null,\n    \"_OwnershipEntities\": null,\n    \"_Units\": null\n  },\n  \"succeeded\": true,\n  \"message\": \"Operation completed successfully\",\n  \"status\": 200\n}\n"}],"_postman_id":"ee1cbe84-2e80-46eb-820c-4e2ea359a3d9"},{"name":"/api/business/search","id":"7d2b7696-6026-45fe-8adc-c5f657b2d26c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Api-Key"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{base_url}}/api/Business/search?uniqueId={{uniqueId}}&page={{page}}&pageSize={{pageSize}}","description":"<p>This endpoint allows you to search for businesses using a unique identifier. It supports pagination and returns a paginated list of matching businesses.</p>\n<h2 id=\"status-code\">Status Code</h2>\n<blockquote>\n<p>API return status code 200,400,500 </p>\n</blockquote>\n<h3 id=\"status-code-200\">Status Code 200</h3>\n<blockquote>\n<p>Success response </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"businessName\": \"string\",\n      \"tradeName\": \"string\",\n      \"businessType\": \"string\",\n      \"uniqueBusinessId\": \"number\",\n      \"businessNumber\": \"number\",\n      \"fiscalNumber\": \"number\",\n      \"numberOfEmployees\": \"number\",\n      \"registrationDate\": \"date\",\n      \"municipality\": \"string\",\n      \"address\": \"string\",\n      \"phoneNumber\": \"string\",\n      \"email\": \"string\",\n      \"capital\": \"number\",\n      \"arbK_Status\": \"boolean\",\n      \"_Activities\": [\n        {\n          \"activityId\": \"number\",\n          \"businessId\": \"number\",\n          \"activityCode\": \"number\",\n          \"activityDescription\": \"string\",\n          \"activityType\": \"string\"\n        }\n      ],\n      \"_AuthorizedRepresentatives\": [\n        {\n          \"authorizedRepresentativeId\": \"number\",\n          \"businessId\": \"number\",\n          \"firstName\": \"string\",\n          \"lastName\": \"string\",\n          \"businessPosition\": \"string\",\n          \"authorization\": \"string\"\n        }\n      ],\n      \"_OwnershipEntities\": [\n        {\n          \"ownershipEntityId\": \"number\",\n          \"businessId\": \"number\",\n          \"fullName\": \"string\",\n          \"gender\": \"string\",\n          \"capitalInEuro\": \"number\",\n          \"capitalInPercentage\": \"number\"\n        }\n      ],\n      \"_Units\": [\n        {\n          \"unitId\": \"number\",\n          \"businessId\": \"number\",\n          \"unitNumber\": \"number\",\n          \"unitName\": \"string\",\n          \"unitCode\": \"number\",\n          \"unitPlace\": \"string\"\n        }\n      ]\n    }\n  ],\n  \"succeeded\": true,\n  \"message\": \"Operation completed successfully\",\n  \"status\": 200\n}\n\n</code></pre>\n<h3 id=\"status-code-404\">Status Code 404</h3>\n<blockquote>\n<p>The requested business or data was not found. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": null,\n  \"succeeded\": false,\n  \"message\": \"Business not found\",\n  \"status\": 404\n}\n\n</code></pre>\n<h3 id=\"status-code-500\">Status Code 500</h3>\n<blockquote>\n<p>An error occurred on the server while processing the request. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": null,\n  \"succeeded\": false,\n  \"message\": \"An error occurred while fetching data\",\n  \"status\": 500\n}\n\n</code></pre>\n","urlObject":{"path":["api","Business","search"],"host":["{{base_url}}"],"query":[{"key":"uniqueId","value":"{{uniqueId}}"},{"key":"page","value":"{{page}}"},{"key":"pageSize","value":"{{pageSize}}"}],"variable":[]}},"response":[{"id":"f0943a57-f862-419b-8d09-ec727ed18b10","name":"/api/business/search","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/api/Business/search?uniqueId={{uniqueId}}&page={{page}}&pageSize={{pageSize}}","host":["{{base_url}}"],"path":["api","Business","search"],"query":[{"key":"uniqueId","value":"{{uniqueId}}"},{"key":"page","value":"{{page}}"},{"key":"pageSize","value":"{{pageSize}}"}]}},"_postman_previewlanguage":"json","header":[{"key":"X-Api-Key","value":"{{ApiKey}}","description":"","type":"text"},{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"businessName\": \"DataLab L.L.C.\",\n        \"tradeName\": null,\n        \"businessType\": \"Shoqëri me përgjegjësi të kufizuara\",\n        \"uniqueBusinessId\": 0,\n        \"businessNumber\": 71124347,\n        \"fiscalNumber\": 601276711,\n        \"numberOfEmployees\": 2,\n        \"registrationDate\": \"2015-01-16T00:00:00\",\n        \"municipality\": \"Prishtinë\",\n        \"address\": null,\n        \"phoneNumber\": null,\n        \"email\": null,\n        \"capital\": 30000,\n        \"arbK_Status\": true,\n        \"_Activities\": null,\n        \"_AuthorizedRepresentatives\": null,\n        \"_OwnershipEntities\": null,\n        \"_Units\": null\n    },\n    \"succeeded\": true,\n    \"message\": \"Operation completed successfully\",\n    \"status\": 200\n}"}],"_postman_id":"7d2b7696-6026-45fe-8adc-c5f657b2d26c"}],"id":"a0a0531d-d030-4692-821a-20afe6060701","description":"<p>The API endpoints handle requests for managing business data, including fetching and searching businesses. Key features include:</p>\n<ul>\n<li><p><strong>GET /api/Business/getbusiness</strong>: Retrieves a paginated list of businesses with details like representatives and activities.</p>\n</li>\n<li><p><strong>GET /api/Business/search</strong>: Searches for businesses by their unique ID with pagination support.</p>\n</li>\n</ul>\n<p>Each endpoint returns structured data using the <code>OperationResult</code> format for consistent responses and error handling.</p>\n<ul>\n<li>If you will use test environment you must specifiy in all request <strong><code>page, pageSize</code></strong></li>\n</ul>\n<blockquote>\n<p>First scenario -&gt; geting all Data with pagination </p>\n</blockquote>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td>int</td>\n<td>The page number to retrieve. Default is 1.</td>\n<td>No</td>\n<td>1</td>\n</tr>\n<tr>\n<td><code>pageSize</code></td>\n<td>int</td>\n<td>The number of businesses per page. Default is 50.</td>\n<td>No</td>\n<td>50</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>Second scenario -&gt; searching data with <code>uniqueId</code> </p>\n</blockquote>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td>int</td>\n<td>The page number to retrieve. Default is 1.</td>\n<td>No</td>\n<td>1</td>\n</tr>\n<tr>\n<td><code>pageSize</code></td>\n<td>int</td>\n<td>The number of businesses per page. Default is 50.</td>\n<td>No</td>\n<td>50</td>\n</tr>\n<tr>\n<td><code>uniqueId</code></td>\n<td>int</td>\n<td>The unique identifier of the business to search for.</td>\n<td>Yes</td>\n<td>12345</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"a0a0531d-d030-4692-821a-20afe6060701"},{"name":"Testing & Variables","item":[],"id":"9fcdcd16-cd08-4d7e-872b-396ff084338e","description":"<p>Environment-specific configurations and reusable variables are defined to streamline API request testing, allowing seamless transitions between environments such as Development and Production.</p>\n<h4 id=\"key-variables\">Key Variables:</h4>\n<ul>\n<li><p><strong>base_url</strong>: Defines the root API URL, simplifying updates when switching between environments.</p>\n</li>\n<li><p>API Key: Holds the authentication token required for secure access to the API.</p>\n</li>\n<li><p><strong>uniqueId</strong>: Dynamically represents the unique identifier for a business entity, ensuring accurate data retrieval.</p>\n</li>\n<li><p><strong>page</strong>: Specifies the current page number for paginated API responses.</p>\n</li>\n<li><p><strong>pageSize</strong>: Determines the number of items to be retrieved per page in API responses.</p>\n</li>\n</ul>\n<p>This approach centralizes the handling of dynamic values, ensuring that API requests adapt automatically to changes in environment or configuration, enhancing the overall efficiency of testing.</p>\n","_postman_id":"9fcdcd16-cd08-4d7e-872b-396ff084338e"},{"name":"Response Api Key Errors","item":[],"id":"8c063c9d-0d97-49b6-8987-7bc6a23e2627","description":"<p>The API implements several validation checks and rate-limiting mechanisms to ensure security and proper usage. Below are the potential errors that may be encountered during API requests, and the corresponding HTTP status codes and error messages.</p>\n<p><strong>Status Code 403 Forbidden - Missing or Invalid Swagger Request</strong></p>\n<blockquote>\n<p><strong>Condition</strong>: When the request does not originate from the server's domain, and the <code>X-Swagger-Request</code> header is missing or incorrect. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Access denied. The element 'X-Swagger-Request' could not be found. Please refer to our documentation for further details.\"\n}\n\n</code></pre>\n<p><strong>Status Code 401 Unauthorized - Missing API Key</strong></p>\n<blockquote>\n<p><strong>Condition</strong>: When the <code>X-Api-Key</code> header is missing or not provided in the request. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"API key is missing or invalid.\"\n}\n\n</code></pre>\n<p><strong>Status Code 401 Unauthorized - Invalid API Key</strong></p>\n<blockquote>\n<p><strong>Condition</strong>: When the provided API key is not found or is inactive in the database. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Unauthorized client.\"\n}\n\n</code></pre>\n<p><strong>Status Code 403 Forbidden - Demo User Access Denied</strong></p>\n<blockquote>\n<p><strong>Condition</strong>: If the API key belongs to a user marked as <code>DemoUser</code>, access to the API is restricted. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Access denied. Demo users are not allowed to use this API. Please create a real account and try again with valid credentials.\"\n}\n\n</code></pre>\n<p><strong>Status Code 429 Too Many Requests - Rate Limit Exceeded</strong></p>\n<blockquote>\n<p><strong>Condition</strong>: When the API key is Free Plan and exceeds the allowed rate limit within a time window. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Rate limit exceeded. Try again later.\"\n}\n\n</code></pre>\n<p><strong>Status Code 403 Forbidden - API Usage Limit Exceeded</strong></p>\n<blockquote>\n<p><strong>Condition</strong>: If the user has exceeded their subscription's allowed API usage. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"API usage limit exceeded. You have reached the maximum allowed usage for your subscription.\"\n}\n\n</code></pre>\n<p><strong>Status Code 500 Internal Server Error - General Exception</strong></p>\n<blockquote>\n<p><strong>Condition</strong>: If an internal error occurs during API request processing. </p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"An internal server error occurred: {Exception Message}\"\n}\n\n</code></pre>\n","_postman_id":"8c063c9d-0d97-49b6-8987-7bc6a23e2627"}]}