{"info":{"_postman_id":"c5b65ac5-9492-46ec-a168-24e5263548d0","name":"Data Ingestion API","description":"<html><head></head><body><p>This documentation is about RAIN’s Data Ingestion API which allows clients to securely send Eligible Employees (EE) and Timekeeping (TK) data to RAIN's system.</p>\n<p>HR, Payroll, and Timekeeping providers that want to integrate with RAIN’s platform to provide Earned Wage Access (EWA) capabilities to their users can push EE and TK data to Rain via this API. Providers can also push data via CSV or API connector, though this documentation exclusively covers integration with RAIN's Data Ingestion API.</p>\n<p>The audience of this documentation is Backend and QA engineers from RAIN’s partners that will work on the integration, which entails getting Eligible Employee and Timekeeping data from their system and sending it to RAIN through this API.</p>\n<p>All the ingestion endpoints work asynchronously. This means that our system will process the submitted data in the background and send the processing status via webhooks.</p>\n<p>The high level view of the API can be seem in the diagram below:</p>\n<img src=\"https://lucid.app/publicSegments/view/c5a7d386-bd45-49fd-a7a2-761561ddf6df/image.png\">\n\n<p><strong>Figure 1: Authentication overview diagram</strong></p>\n<img src=\"https://lucid.app/publicSegments/view/26272112-0083-4464-978d-31985b4229ab/image.png\">\n\n<p><strong>Figure 2: Ingestion overview diagram</strong></p>\n<h2 id=\"environment\">Environment</h2>\n<p>The RAIN's Workspace with the Data Ingestion API Collection is available <a href=\"https://www.postman.com/rain-app/workspace/rain-s-workspace/collection/19628595-c5b65ac5-9492-46ec-a168-24e5263548d0?ctx=documentation\">here</a>.</p>\n<p>This Collection includes a pre-configured environment. You will need to set up the following variables in order to run each request:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Name</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>client_id</code></td>\n<td><em>client id</em> provided by RAIN</td>\n</tr>\n<tr>\n<td><code>client_secret</code></td>\n<td><em>client secret</em> provided by RAIN</td>\n</tr>\n<tr>\n<td><code>scope</code></td>\n<td><em>scope</em> provided by RAIN</td>\n</tr>\n<tr>\n<td><code>api_url</code></td>\n<td>URL for the desired environment</td>\n</tr>\n<tr>\n<td><code>x_api_key</code></td>\n<td><em>API Key</em> provided by RAIN</td>\n</tr>\n<tr>\n<td><code>access_token</code></td>\n<td>Generated by requesting POST <em>/v1/oauth2/token</em></td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"1-key-api-concepts\">1. Key API Concepts</h1>\n<h1 id=\"11-glossary-of-terms\">1.1. Glossary of Terms</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Term</strong></th>\n<th><strong>Definition</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Earned Wage</td>\n<td>Amount in USD earned by the employee calculated cumulatively until a specific date, according to the hours worked. E.g. an employee that earns $20/hour, after working 2 days of 8 hours each has an Earned Wage of 2x8x20 = 320 USD.</td>\n</tr>\n<tr>\n<td>Group code</td>\n<td>Code used to group employees in locations or roles.</td>\n</tr>\n<tr>\n<td>Pay cycle</td>\n<td>Start/end date for the period that the employee is paid. E.g. for a weekly pay cycle, the pay cycle can start on a Sunday and end on a Saturday.</td>\n</tr>\n<tr>\n<td>EE</td>\n<td>Eligible Employee</td>\n</tr>\n<tr>\n<td>TK</td>\n<td>Timekeeping of an employee</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"12-data-flow-diagram\">1.2. Data Flow Diagram</h1>\n<p>The following are high level diagrams that show the data ingestion flow:</p>\n<h3 id=\"employer-ingestion\">Employer Ingestion</h3>\n<img src=\"https://lucid.app/publicSegments/view/18f9d7f1-a527-49a4-9fbc-26092159c686/image.png\">\n\n<h3 id=\"employee-ingestion\">Employee Ingestion</h3>\n<img src=\"https://lucid.app/publicSegments/view/0d154dfb-cb7f-414d-959a-504b0176d806/image.png\">\n\n<h3 id=\"timekeeping-ingestion\">Timekeeping Ingestion</h3>\n<img src=\"https://lucid.app/publicSegments/view/465e060c-cd38-41bb-97f4-ab21e227bf33/image.png\">\n\n<h1 id=\"13-security-overview\">1.3. Security Overview</h1>\n<p>To provide safe and secure access to RAIN's API endpoints, TLS connections and mTLS authentication are required. All the endpoints also require an API key and OAuth2 authentication. This means that in order to use the Data Ingestion API, RAIN must grant credentials, keys, and certificates to the partner in advance.</p>\n<img src=\"https://www.cloudflare.com/resources/images/slt3lc6tev37/5SjaQfZzDLEGqyzFkA0AA4/d227a26bbd7bc6d24363e9b9aaabef55/how_mtls_works-what_is_mutual_tls.png\">\n\n<p>Reference: <a href=\"https://www.cloudflare.com/learning/access-management/what-is-mutual-tls/\"><em>What is mutual TLS (mTLS)?</em></a></p>\n<h1 id=\"14-development-process-and-environments\">1.4. Development Process and Environments</h1>\n<p>RAIN provides a <code>sandbox environment</code> to be used by the client to validate the development and integration with RAIN's system.<br>This environment has settings similar to the <code>production environment</code>, which will be provided to the integrator after validation in the <code>sandbox environment</code> is completed.</p>\n<h1 id=\"2-getting-started\">2. Getting Started</h1>\n<p>This section is a list of practical guides on how to use our API including onboarding, authentication and using the main endpoints.</p>\n<p>To start using our API, you first need to get access to:</p>\n<p>* API credentials and certificates<br>* Sandbox environment URL</p>\n<p>In order for RAIN to provide access to the API, here is <strong>what you will need to provide to your RAIN technical contact:</strong></p>\n<ol>\n<li>URL of the webhook (REST) where the processing events will be sent.</li>\n<li>API key to access the URL of the webhook.</li>\n<li>PGP key pair. Send the public key to RAIN so the certificate can be shared.</li>\n</ol>\n<p>Here are the specific items that <strong>your RAIN technical contact will provide you</strong>:</p>\n<ol>\n<li>Sandbox environment URL.</li>\n<li>TLS certificate with annual renewal, sent encrypted with the PGP key pair.</li>\n<li>API key.</li>\n<li>Client ID and client secret, for <strong>OAuth2</strong> authentication.</li>\n</ol>\n<img src=\"https://lucid.app/publicSegments/view/2c7317a5-f6fb-4ca0-bb02-0652e3e8dd27/image.png\">\n\n<p><strong>Figure 3: Items exchange diagram</strong></p>\n<h1 id=\"21-certificate-management\">2.1. Certificate Management</h1>\n<p>The standard <strong>certificate duration we use is 1 year.</strong> Below is the explanation of how to obtain the certificate on different occasions.</p>\n<h3 id=\"requesting-the-first-certificate\">Requesting the First Certificate</h3>\n<p>The first certificate will be sent manually and will be encrypted using the PGP public key provided to RAIN, as explained in the <a href=\"#2-getting-started\">Section 2</a> above.</p>\n<h3 id=\"renewing-certificate\">Renewing Certificate</h3>\n<p>From the second certificate onwards, RAIN will send the new certificate using a webhook event. Below you can see an example of the payload:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"CERTIFICATE_RENEWAL\",\n  \"body\": {\n    \"download_link_key\": \"https://url-download.com/client.key.gpg\",\n    \"download_link_pem\": \"https://url-download.com/client.pem.gpg\"\n  }\n}\n\n</code></pre>\n<p>Check the <em>Topic Certificate Renewal Event</em> for more details.</p>\n<h1 id=\"22-submitting-employer-data\">2.2. Submitting Employer Data</h1>\n<h2 id=\"employer-ingestion-1\">Employer ingestion</h2>\n<p>To submit employer data to RAIN's Data Ingestion API, the client will need to use the <a href=\"#99d7d41e-8f1d-4c51-973b-b7d8ecb7a4f8\">Employer Ingestion endpoint</a>.</p>\n<p>This endpoint allows clients to submit one single employer data per request. The response of each request will contain the result if the employer has been processed by RAIN's system.</p>\n<p><strong>The client should submit all the employers before start sending the employees to be ingested.</strong> The field <code>employer_code</code> will be used to link an employer to its employees.</p>\n<h2 id=\"employer-retrieval\">Employer retrieval</h2>\n<p>To retrieve employers ingested by RAIN's Data Ingestion API, the client will need to use the <a href=\"#f6945fe9-299e-472c-9a7d-10cf7ff8c1d5\">Employer retrieval endpoint</a>.</p>\n<p>This endpoint allows clients to get all or one single employer per request. The response of each request will be a list containing the employers data ingested by RAIN's system.</p>\n<h2 id=\"employer-update\">Employer update</h2>\n<p>To update an employer ingested by RAIN's Data Ingestion API, the client will need to use the <a href=\"#0d8ded45-e332-405a-acef-2d513b7ea575\">Employer update endpoint</a>.</p>\n<p>This endpoint allows clients to update an employer <code>name</code> and <code>status</code> per request. The response of each request will contain the result if the employer has been updated by RAIN's system.</p>\n<p><strong>Remember to update the employer</strong> <strong><code>status</code></strong> <strong>to</strong> <strong><code>ACTIVE</code></strong> <strong>once it's ready to be listed to its employees on RAIN's system.</strong></p>\n<h1 id=\"23-submitting-employee-data\">2.3. Submitting Employee Data</h1>\n<p>To submit employee data to RAIN's Data Ingestion API, the client will need to use the <a href=\"#bc00be52-1962-4254-a071-459e68548111\">Employees Ingestion endpoint</a>.</p>\n<p>This endpoint allows clients to submit a batch of employee data. The response of each request will be a <code>batch_id</code> which can be used to link the webhook event <code>EMPLOYEE_BATCH_PROCESSED</code>. After the batch has been processed by RAIN's system, the webhook processor will notify the client with the ingestion result. More details about the webhook event can be found in <em>Topic Employee Event</em>.</p>\n<h1 id=\"24-submitting-timekeeping-data\">2.4. Submitting Timekeeping Data</h1>\n<p>To submit employees' timekeeping data to RAIN's Data Ingestion API, the client will need to use the <a href=\"#4492fca9-f137-4a1d-a5ee-d7cca9ff811f\">Timekeeping Ingestion endpoint</a>.</p>\n<p>This endpoint allows clients to submit a batch of the employees' timekeeping data. The response of each request will be a <code>batch_id</code> which can be used to link the webhook event <code>TIMEKEEPING_BATCH_PROCESSED</code>. After the batch has been processed by RAIN's system, the webhook processor will notify the client with the ingestion result. More details about the webhook event can be found in <em>Topic Timekeeping Event</em>.</p>\n<h1 id=\"25-monitoring-webhooks-events\">2.5. Monitoring Webhooks Events</h1>\n<p>Considering the asynchronous processing, all the results of the processing operations will be communicated via webhook event.</p>\n<h3 id=\"requirements\">Requirements</h3>\n<p>To be able to receive these events, the client must provide to RAIN an endpoint that accepts a <code>POST</code> request containing an <code>API KEY</code> in the header.</p>\n<p>The request body content will have the event's details, wherein the client will be able to get the results of the asynchronous processing.</p>\n<p>The following request is an example of what RAIN will be sending to the client's webhook endpoint.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">curl --location --request POST 'api-client-example.com/webhook' \\\n--header 'x-api-key: valid-api-key' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"type\": \"EMPLOYEE_BATCH_PROCESSED\",\n  \"body\": {\n    \"batch_id\": \"uuid\",\n    \"employer_code\": \"testeintimp\",\n    \"employees\": [\n      {\n        \"employee_code\": \"70155dbc-480d-492d-9d58-4eaff1f5a31a\",\n        \"status\": \"PROCESSED\"\n      }\n    ]\n  }\n}\n'\n\n</code></pre>\n<h3 id=\"event-fields\">Event Fields</h3>\n<p>The table below summarizes the fields for the events:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field name</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>Type of event  <br>Enum:  <br><code>EMPLOYEE_BATCH_PROCESSED</code>,  <br><code>TIMEKEEPING_BATCH_PROCESSED</code>,  <br><code>CERTIFICATE_RENEWAL</code></td>\n</tr>\n<tr>\n<td>body.batch_id</td>\n<td>Unique ID for a specific data ingestion execution</td>\n</tr>\n<tr>\n<td>body.employer_code</td>\n<td>Unique ID from the employer that the employee belongs to.</td>\n</tr>\n<tr>\n<td>body.download_link</td>\n<td>Download link for a certificate encrypted PGP file</td>\n</tr>\n<tr>\n<td>employees.employee_code</td>\n<td>Employee's ID from client system</td>\n</tr>\n<tr>\n<td>employees.status</td>\n<td>Employee's data ingestion result  <br>Enum:  <br><code>PROCESSED</code>, <code>ERROR</code></td>\n</tr>\n<tr>\n<td>timekeepings.timekeeping_code</td>\n<td>Employee's timekeeping ID from client system</td>\n</tr>\n<tr>\n<td>timekeepings.status</td>\n<td>Employee's timekeeping data ingestion result  <br>Enum:  <br><code>PROCESSED</code>, <code>ERROR</code></td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"26-event-types\">2.6. Event Types</h1>\n<h3 id=\"employee-event\">Employee event</h3>\n<p>The <code>body.employees</code> field contains all the processed status of each employee for a specific batch</p>\n<h4 id=\"event-example\">Event example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"EMPLOYEE_BATCH_PROCESSED\",\n  \"body\": {\n    \"batch_id\": \"uuid\",\n    \"employer_code\": \"string\",\n    \"employees\": [\n      {\n        \"employee_code\": \"70155dbc-480d-492d-9d58-4eaff1f5a31a\",\n        \"status\": \"PROCESSED\"\n      }\n    ]\n  }\n}\n\n</code></pre>\n<h3 id=\"timekeeping-event\">Timekeeping event</h3>\n<p>The <code>body.timekeepings</code> field contains the processed status of each timekeeping for a specific batch.</p>\n<h4 id=\"event-example-1\">Event example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"TIMEKEEPING_BATCH_PROCESSED\",\n  \"body\": {\n    \"batch_id\": \"uuid\",\n    \"timekeepings\": [\n      {\n        \"timekeeping_code\": \"70155dbc-480d-492d-9d58-4eaff1f5a31a\",\n        \"status\": \"PROCESSED\"\n      }\n    ]\n  }\n}\n\n</code></pre>\n<h3 id=\"certificate-renewal-event\">Certificate Renewal Event</h3>\n<p>The <code>body.download_link_key</code> and <code>body.download_link_pem</code> are temporary downloadable encrypted PGP files that contain the mTLS certificate key and pem file, respectively. These files must be sent in all requests in order to access RAIN's services.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"CERTIFICATE_RENEWAL\",\n  \"body\": {\n    \"download_link_key\": \"https://url-download.com/client.key.gpg\",\n    \"download_link_pem\": \"https://url-download.com/client.pem.gpg\"\n  }\n}\n\n</code></pre>\n<h3 id=\"reading-the-encrypted-pgp-file\">Reading the encrypted PGP file</h3>\n<p>Each download link is going to contain an encrypted PGP file. Decrypt each of them with the PGP private key generated previously to get the file content.</p>\n<h1 id=\"27-api-rate-limit\">2.7. API Rate Limit</h1>\n<p>To help manage the amount of requests to RAIN's systems, limits are set on the number of requests that can be sent to the API. These limits are established to provide a reliable and scalable system.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Resource</strong></th>\n<th><strong>Rate</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authentication</td>\n<td>10 reqs/sec</td>\n</tr>\n<tr>\n<td>Employer</td>\n<td>10 reqs/sec</td>\n</tr>\n<tr>\n<td>Employee</td>\n<td>10 reqs/sec</td>\n</tr>\n<tr>\n<td>Timekeeping</td>\n<td>10 reqs/sec</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"3-important\">3. Important</h1>\n<p>In order to use any of the API resources, it is <strong>required</strong> to send the TLS certificates along with the requests.</p>\n<p>Curl Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl --key client.key --cert client.pem --location \\\n--request POST 'https://api.data-ingestion.rain.us/{{path}}'\n\n</code></pre><p>To setup Postman certificate settings, follow these <a href=\"https://learning.postman.com/docs/sending-requests/certificates/\">instructions</a>.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"1. Key API Concepts","slug":"1-key-api-concepts"},{"content":"1.1. Glossary of Terms","slug":"11-glossary-of-terms"},{"content":"1.2. Data Flow Diagram","slug":"12-data-flow-diagram"},{"content":"1.3. Security Overview","slug":"13-security-overview"},{"content":"1.4. Development Process and Environments","slug":"14-development-process-and-environments"},{"content":"2. Getting Started","slug":"2-getting-started"},{"content":"2.1. Certificate Management","slug":"21-certificate-management"},{"content":"2.2. Submitting Employer Data","slug":"22-submitting-employer-data"},{"content":"2.3. Submitting Employee Data","slug":"23-submitting-employee-data"},{"content":"2.4. Submitting Timekeeping Data","slug":"24-submitting-timekeeping-data"},{"content":"2.5. Monitoring Webhooks Events","slug":"25-monitoring-webhooks-events"},{"content":"2.6. Event Types","slug":"26-event-types"},{"content":"2.7. API Rate Limit","slug":"27-api-rate-limit"},{"content":"3. Important","slug":"3-important"}],"owner":"19628595","collectionId":"c5b65ac5-9492-46ec-a168-24e5263548d0","publishedId":"Uz5NiDCE","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"3B4DCC"},"publishDate":"2022-06-10T20:22:40.000Z"},"item":[{"name":"Authentication","event":[{"listen":"prerequest","script":{"exec":[""],"type":"text/javascript","id":"6aea3795-01ba-4595-a4ad-326184c71bda"}},{"listen":"test","script":{"exec":["var body = pm.response.json();","pm.environment.set(\"access_token\", body.access_token);"],"type":"text/javascript","id":"e0527da5-b7f3-42ec-9aee-47c84cea1396"}}],"id":"17440dfd-fc72-4ea2-8d25-5593509d782c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"username":"{{client_id}}","password":"{{client_secret}}"},"isInherited":false},"method":"POST","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"scope\": \"{{scope}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/oauth2/token","description":"<blockquote>\n<p>To perform this request it is necessary to attach the TLS certificates as described <a href=\"#3-important\">here</a>. </p>\n</blockquote>\n<p>Use the Authentication endpoint to retrieve the JWT Token in order to access the other resources.</p>\n","urlObject":{"path":["oauth2","token"],"host":["{{api_url}}"],"query":[{"disabled":true,"key":"","value":""}],"variable":[]}},"response":[{"id":"19669057-daca-4297-aeb9-cafb71628032","name":"200 Success","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"},{"key":"","value":"","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n    \"scope\": {{scope}}\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/oauth2/token"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"access_token\",\n    \"expires_in\": 3600,\n    \"token_type\": \"Bearer\"\n}"},{"id":"808e8ed7-dea0-4d98-86ba-4f14729f8c3a","name":"400 Invalid credentials","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"},{"key":"Authorization","value":"Basic ...invalid_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"scope\": {{scope}}\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/oauth2/token"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"invalid_client\"\n}"},{"id":"9b2dcc0a-54da-4c06-ad8e-3ff28a3b4870","name":"400 Missing scope","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"},{"key":"","value":"","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n    \"scope\": {{scope}}\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/oauth2/token"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"missing_scope\"\n}"}],"_postman_id":"17440dfd-fc72-4ea2-8d25-5593509d782c"},{"name":"Employees ingestion","id":"bc00be52-1962-4254-a071-459e68548111","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"POST","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"employees\": [\n    {\n      \"employee_code\": \"EE001\",\n      \"employer_code\": \"testeintimp\",\n      \"group_code\": \"testeintimp\",\n      \"status\": \"ACTIVE\",\n      \"wage_type\": \"HOURLY\",\n      \"pay_frequency\": \"BI_WEEKLY\",\n      \"pay_rate\": 10,\n      \"pay_cycle\": {\n        \"start_date\": \"2022-06-05\",\n        \"end_date\": \"2022-06-20\"\n      },\n      \"first_name\": \"Harmony\",\n      \"last_name\": \"FakeTestzz\",\n      \"email\": \"emery@rippin.info\",\n      \"phone_number\": \"1-225-450-2584\"\n    },\n    {\n      \"employee_code\": \"EE002\",\n      \"employer_code\": \"testeintimp\",\n      \"group_code\": \"testeintimp\",\n      \"status\": \"ACTIVE\",\n      \"wage_type\": \"SALARY\",\n      \"pay_frequency\": \"BI_WEEKLY\",\n      \"pay_rate\": 10,\n      \"pay_cycle\": {\n        \"start_date\": \"2022-06-05\",\n        \"end_date\": \"2022-06-20\"\n      },\n      \"first_name\": \"Isiah\",\n      \"last_name\": \"FakeTestzz\",\n      \"email\": \"sophia.franecki@hartmann-wintheiser.biz\",\n      \"phone_number\": \"400.951.4168\"\n    },\n    {\n      \"employee_code\": \"EE003\",\n      \"employer_code\": \"testeintimp\",\n      \"group_code\": \"testeintimp\",\n      \"status\": \"ACTIVE\",\n      \"wage_type\": \"SALARY\",\n      \"pay_frequency\": \"BI_WEEKLY\",\n      \"pay_rate\": 10,\n      \"pay_cycle\": {\n        \"start_date\": \"2022-06-05\",\n        \"end_date\": \"2022-06-20\"\n      },\n      \"first_name\": \"Madelene\",\n      \"last_name\": \"FakeTestzz\",\n      \"email\": \"dorinda_rutherford@williamson-parisian.name\",\n      \"phone_number\": \"1-451-539-7684\"\n    },\n    {\n      \"employee_code\": \"EE004\",\n      \"employer_code\": \"testeintimp\",\n      \"group_code\": \"testeintimp\",\n      \"status\": \"ACTIVE\",\n      \"wage_type\": \"HOURLY\",\n      \"pay_frequency\": \"BI_WEEKLY\",\n      \"pay_rate\": 10,\n      \"pay_cycle\": {\n        \"start_date\": \"2022-06-05\",\n        \"end_date\": \"2022-06-20\"\n      },\n      \"first_name\": \"Wilfredo\",\n      \"last_name\": \"FakeTestzz\",\n      \"email\": \"helene.gusikowski@kunze.biz\",\n      \"phone_number\": \"1-101-596-1054\"\n    },\n    {\n      \"employee_code\": \"EE005\",\n      \"employer_code\": \"testeintimp\",\n      \"group_code\": \"testeintimp\",\n      \"status\": \"ACTIVE\",\n      \"wage_type\": \"SALARY\",\n      \"pay_frequency\": \"BI_WEEKLY\",\n      \"pay_rate\": 10,\n      \"pay_cycle\": {\n        \"start_date\": \"2022-06-05\",\n        \"end_date\": \"2022-06-20\"\n      },\n      \"first_name\": \"Freddy\",\n      \"last_name\": \"FakeTestzz\",\n      \"email\": \"loree_kulas@cremin.io\",\n      \"phone_number\": \"(587) 720-0865\"\n    },\n    {\n      \"employee_code\": \"EE006\",\n      \"employer_code\": \"testeintimp\",\n      \"group_code\": \"testeintimp\",\n      \"status\": \"INACTIVE\",\n      \"wage_type\": \"SALARY\",\n      \"pay_frequency\": \"BI_WEEKLY\",\n      \"pay_rate\": 10,\n      \"pay_cycle\": {\n        \"start_date\": \"2022-06-05\",\n        \"end_date\": \"2022-06-20\"\n      },\n      \"first_name\": \"Felipe\",\n      \"last_name\": \"FakeTestzz\",\n      \"email\": \"benny.ritchie@moen.net\",\n      \"phone_number\": \"(483) 766-3129\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employees","description":"<blockquote>\n<p>To perform this request it is necessary to attach the TLS certificates as described <a href=\"#3-important\">here</a>.</p>\n</blockquote>\n<p>This endpoint allows the client to submit employee data. If new data is submitted for an existing <code>employee_code</code> , that employee’s data will be updated. If an <code>employee_code</code> is not present in RAIN’s system, that employee’s data will be ingested.</p>\n<h3 id=\"request-body\">Request body</h3>\n<p>The request payload size must not be larger than 3 MB.</p>\n<p><strong>Body</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body Fields</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>employees</td>\n<td>true</td>\n<td>Employee[]</td>\n<td>List containing data of employees  <br />Max array length: 10000  <br />Min array length: 1</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Employee</strong></p>\n<p>The <code>first_name</code>, <code>last_name</code>, <code>email</code> and <code>phone_number</code> fields are optional, however, for them to work as optional it requires a specific configuration from RAIN.<br />So this need to be informed during onboarding, otherwise the employees data sent won't be successfully processed.</p>\n<p>The fields <code>pay_cycle.start_date</code>, <code>pay_cycle.end_date</code>, and <code>pay_frequency</code> are also optional, but if one of them is sent the others also need to be sent. <strong>It is preferred that these fields are sent,</strong> however, if they aren't, a default value will be automatically calculated and set for them.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Employee Fields</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>employee_code</td>\n<td>true</td>\n<td>string</td>\n<td>Unique ID for the employee on the client side</td>\n</tr>\n<tr>\n<td>employer_code</td>\n<td>true</td>\n<td>string</td>\n<td>Unique ID from the employer that the employee belongs to.</td>\n</tr>\n<tr>\n<td>status</td>\n<td>true</td>\n<td>string</td>\n<td>Determines if the employee is active or inactive.  <br />Enum:  <br /><code>ACTIVE</code>,<code>INACTIVE</code></td>\n</tr>\n<tr>\n<td>wage_type</td>\n<td>true</td>\n<td>string</td>\n<td>Determines the pay type of the employee.  <br />Enum:  <br /><code>HOURLY</code>,<code>SALARY</code></td>\n</tr>\n<tr>\n<td>group_code</td>\n<td>false</td>\n<td>string</td>\n<td>Determines the payment group that the employee belongs to.  <br /><strong>This value is provided by RAIN during onboarding.</strong></td>\n</tr>\n<tr>\n<td>pay_rate</td>\n<td>true</td>\n<td>number</td>\n<td>Determines how much an employee gets paid per hour</td>\n</tr>\n<tr>\n<td>pay_frequency</td>\n<td>false</td>\n<td>string</td>\n<td>Determines the pay cycle frequency of the employee.  <br />Enum:  <br /><code>WEEKLY</code>,<code>BI_WEEKLY</code>,<code>SEMI_MONTHLY</code>,<code>MONTHLY</code>  <br />While not required, this data is preferred. If you will not be including this data, you must connect with your RAIN point of contact to align.</td>\n</tr>\n<tr>\n<td>pay_cycle.start_date</td>\n<td>false</td>\n<td>string</td>\n<td>Pay cycle start date.  <br />Format: <code>yyyy-MM-dd</code>  <br />Validation: the date must be earlier than the current date.  <br />While not required, this data is preferred. If you will not be including this data, you must connect with your RAIN point of contact to align.</td>\n</tr>\n<tr>\n<td>pay_cycle.end_date</td>\n<td>false</td>\n<td>string</td>\n<td>Pay cycle end date  <br />Format: <code>yyyy-MM-dd</code>  <br />Validation: the date must be later than the current date.  <br />While not required, this data is preferred. If you will not be including this data, you must connect with your RAIN point of contact to align.</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>false</td>\n<td>string</td>\n<td>Employee's first name</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>false</td>\n<td>string</td>\n<td>Employee's last name</td>\n</tr>\n<tr>\n<td>email</td>\n<td>false</td>\n<td>string</td>\n<td>Employee's e-mail.  <br />If there is no other unique identifier available, this may be required.</td>\n</tr>\n<tr>\n<td>phone_number</td>\n<td>false</td>\n<td>string</td>\n<td>Employee's phone number.  <br />If there is no other unique identifier available, this may be required.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["employees"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[{"id":"0edf7727-d6a9-4316-93a1-a3c053d3084d","name":"200 Success","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"employees\": [\n        {\n            \"employee_code\": \"1234\",\n            \"employer_code\": \"ABCD\",\n            \"status\": \"ACTIVE\",\n            \"wage_type\": \"HOURLY\",\n            \"pay_frequency\": \"WEEKLY\",\n            \"pay_rate\": 20.20,\n            \"pay_cycle\": {\n                \"start_date\": \"2022-06-06\",\n                \"end_date\": \"2022-06-06\"\n            },\n            \"first_name\": \"Bruce\",\n            \"last_name\": \"Wayne\",\n            \"email\": \"example@mail.com\",\n            \"phone_number\": \"123456\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employees"},"code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"batch_id\": \"2854b0db-b1de-4739-99c4-e1337a1b7e83\"\n}"},{"id":"ea01f601-7edc-40b3-8966-cb0125cd3c7c","name":"429 Rate Limit Exceeded","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"employees\": [\n        {\n            \"employee_code\": \"1234\",\n            \"employer_code\": \"ABCD\",\n            \"status\": \"ACTIVE\",\n            \"wage_type\": \"HOURLY\",\n            \"pay_frequency\": \"WEEKLY\",\n            \"pay_rate\": 20.20,\n            \"pay_cycle\": {\n                \"start_date\": \"2022-06-06\",\n                \"end_date\": \"2022-06-06\"\n            },\n            \"first_name\": \"Bruce\",\n            \"last_name\": \"Wayne\",\n            \"email\": \"example@mail.com\",\n            \"phone_number\": \"123456\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employees"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"Rate Limit Exceeded!"},{"id":"3386dc24-3708-4ca9-999d-8fa9f7a3967e","name":"400 Bad Request - Too many employees","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{    \r\n    \"employees\": [\r\n        // More than 10000 employees\r\n        // ...\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employees"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"error\": {\n    \"employees\": [\n      \"Array length must be between 1 and 10000.\"\n    ]\n  }\n}"},{"id":"d7a7db5b-305d-4ad0-855a-3e261fd54361","name":"400 Bad Request - Invalid Data","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"employees\": [\r\n    {\r\n      \"employee_code\": \"1234\",\r\n      \"employer_code\": \"ABCD\",\r\n      \"status\": \"ACTIVE\",\r\n      \"wage_type\": \"HOURLY\",\r\n      \"pay_frequency\": \"invalid_frequency\",\r\n      \"pay_rate\": \"invalid_number\",\r\n      \"pay_cycle\": {\r\n        \"start_date\": \"2022-05-22\",\r\n        \"end_date\": \"2022-13-06\"\r\n      },\r\n      \"unknown_field\": \"Bruce\",\r\n      \"last_name\": \"\",\r\n      \"email\": \"invalidmail.com\",\r\n      \"phone_number\": \"123456\"\r\n    }\r\n  ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employees"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"error\": {\n    \"employees\": {\n      \"0\": {\n        \"email\": [\n          \"Value is not a valid email address.\"\n        ],\n        \"pay_rate\": [\n          \"Value is not a valid number.\"\n        ],\n        \"pay_cycle\": {\n          \"end_date\": [\n            \"Value is not a valid date, must to be 'yyyy-MM-dd' format.\"\n          ]\n        },\n        \"last_name\": [\n          \"Value should not be empty.\"\n        ],\n        \"pay_frequency\": [\n          \"Value must be one of: 'WEEKLY', 'BI_WEEKLY', 'SEMI_MONTHLY', 'MONTHLY'.\"\n        ],\n        \"first_name\": [\n          \"Missing data for required field.\"\n        ],\n        \"unknown_field\": [\n          \"Unknown field.\"\n        ]\n      }\n    }\n  }\n}"}],"_postman_id":"bc00be52-1962-4254-a071-459e68548111"},{"name":"Timekeeping ingestion","id":"4492fca9-f137-4a1d-a5ee-d7cca9ff811f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"POST","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"timekeepings\": [\r\n    {\r\n      \"timekeeping_code\": \"TK2505\",\r\n      \"employee_code\": \"EECODE9\",\r\n      \"worked_hours\": 8.5,\r\n      \"work_date\": \"2022-06-07\",\r\n      \"earned_wage\": 199.99\r\n    },\r\n    {\r\n      \"timekeeping_code\": \"TK2506\",\r\n      \"employee_code\": \"EECODE9\",\r\n      \"worked_hours\": 8,\r\n      \"work_date\": \"2022-06-08\",\r\n      \"earned_wage\": 200\r\n    },\r\n    {\r\n      \"timekeeping_code\": \"TK2507\",\r\n      \"employee_code\": \"EECODE10\",\r\n      \"worked_hours\": 8.5,\r\n      \"work_date\": \"2022-06-07\",\r\n      \"earned_wage\": 199.99\r\n    },\r\n    {\r\n      \"timekeeping_code\": \"TK2508\",\r\n      \"employee_code\": \"EECODE10\",\r\n      \"worked_hours\": 8.5,\r\n      \"work_date\": \"2022-06-08\",\r\n      \"earned_wage\": 199.99\r\n    }\r\n  ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/timekeepings","description":"<blockquote>\n<p>To perform this request it is necessary to attach the TLS certificates as described <a href=\"#3-important\">here</a>.</p>\n</blockquote>\n<p>This endpoint allows the client to submit employees' timekeeping to be ingested by RAIN's system.</p>\n<h3 id=\"request-body\">Request body</h3>\n<p>The request payload size must not be larger than 3 MB.</p>\n<p><strong>Body</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body Fields</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>timekeepings</td>\n<td>true</td>\n<td>Timekeeping[]</td>\n<td>List containing data of employee's timekeepings  <br />Max array length: 10000  <br />Min array length: 1</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Timekeeping</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Timekeeping</strong> F<strong>ields</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>timekeeping_code</td>\n<td>true</td>\n<td>string</td>\n<td>Unique ID for the timekeeping on the client side</td>\n</tr>\n<tr>\n<td>employee_code</td>\n<td>true</td>\n<td>string</td>\n<td>Unique ID for the employee on the client side</td>\n</tr>\n<tr>\n<td>worked_hours</td>\n<td>true</td>\n<td>number</td>\n<td>Total amount of worked hours for the given employee</td>\n</tr>\n<tr>\n<td>work_date</td>\n<td>true</td>\n<td>string</td>\n<td>Work date for the given employee  <br />Format: <code>yyyy-MM-dd</code></td>\n</tr>\n<tr>\n<td>earned_wage</td>\n<td>true</td>\n<td>number</td>\n<td>Total amount of wage earned on the shift for the given employee.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["timekeepings"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[{"id":"2fc9d1ca-6387-45dc-a3fc-883bf8e7f515","name":"200 Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"timekeepings\": [\n        {\n            \"timekeeping_code\": \"4567\",\n            \"employee_code\": \"1234\",\n            \"worked_hours\": 8.0,\n            \"work_date\": \" 2022-04-02\",\n            \"earned_wage\": 160.0\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/timekeepings"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"batch_id\": \"2854b0db-b1de-4739-99c4-e1337a1b7e83\"\n}"},{"id":"b9aeb6ac-35be-4f04-acc1-6a17f415baef","name":"429 Rate Limit Exceeded","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"timekeepings\": [\n        {\n            \"timekeeping_code\": \"4567\",\n            \"employee_code\": \"1234\",\n            \"worked_hours\": 8.0,\n            \"work_date\": \" 2022-04-02\",\n            \"earned_wage\": 160.0\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/timekeepings"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"Rate Limit Exceeded!"},{"id":"083f8f63-0c10-417a-b46d-2c63261e9e23","name":"400 Bad Request - Too many timekeepings","originalRequest":{"method":"POST","header":[{"key":"","name":"Content-Type","value":"","type":"text","disabled":true},{"key":"Content-Type","value":"","disabled":true}],"body":{"mode":"raw","raw":"{\n    \"timekeepings\": [\n        // More than 10000 timekeepings\n        //...\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/timekeepings"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"timekeepings\": [\n            \"Array length must be between 1 and 10000.\"\n        ]\n    }\n}"},{"id":"3cce7998-3205-473e-b53f-193bbec774aa","name":"400 Bad Request - Invalid Data","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"timekeepings\": [\r\n        {\r\n            \"timekeeping_code\": \"\",\r\n            \"employee_code\": \"1234\",\r\n            \"worked_hours\": \"8.0\",\r\n            \"work_date\": \" 2022-13-02\",\r\n            \"unknown_field\": 160.0\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/timekeepings"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"error\": {\n    \"timekeepings\": {\n      \"0\": {        \n        \"worked_hours\": [\n          \"Value is not a valid number.\"\n        ],\n        \"work_date\": [\n          \"Value is not a valid date, must to be 'yyyy-MM-dd' format.\"\n        ],        \n        \"earned_wage\": [\n          \"Missing data for required field.\"\n        ],\n        \"unknown_field\": [\n          \"Unknown field.\"\n        ]\n      }\n    }\n  }\n}"}],"_postman_id":"4492fca9-f137-4a1d-a5ee-d7cca9ff811f"},{"name":"Employers ingestion","id":"99d7d41e-8f1d-4c51-973b-b7d8ecb7a4f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"POST","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"employer_code\":\"ABCD\",\r\n    \"name\": \"EmployerTest\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employers","description":"<blockquote>\n<p>To perform this request it is necessary to attach the TLS certificates as described <a href=\"#3-important\">here</a>.</p>\n</blockquote>\n<p>This endpoint allows the client to submit employers to be ingested by RAIN's system. If there is an attempt of ingest a new employer with the same <code>employer_code</code> or <code>name</code> of an employer that was already ingested, an error will be returned. In order to update an existing employer, use the PUT endpoint.</p>\n<h3 id=\"request-body\">Request body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Fields</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>employer_code</td>\n<td>true</td>\n<td>string</td>\n<td>Unique ID for the employer on the client side.</td>\n</tr>\n<tr>\n<td>name</td>\n<td>true</td>\n<td>string</td>\n<td>Employer's name</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["employers"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[{"id":"bd4d9d0c-eaf4-4621-9229-a36474908501","name":"201 Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"employer_code\":\"ABCD\",\r\n    \"name\": \"EmployerTest\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employers"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Employer created.\"\n}"},{"id":"ca9c9919-b01a-454a-b132-f45f022bbae9","name":"429 Rate Limit Exceeded","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"employer_code\":\"ABCD\",\r\n    \"name\": \"EmployerTest\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{api_url}}/employers","host":["{{api_url}}"],"path":["employers"],"query":[{"key":"employer_code","value":null,"type":"text","disabled":true}]}},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"Rate Limit Exceeded!"},{"id":"c746aa9e-219c-41a8-95bc-5601c6e28cc8","name":"400 Bad Request - Invalid Data","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"employer_code\":\"\",\r\n    \"name\": \"\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employers"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"name\": [\n            \"Value should not be empty.\"\n        ],\n        \"employer_code\": [\n            \"Value should not be empty.\"\n        ]\n    }\n}"},{"id":"986ae9a2-3a85-4691-a282-9d333b034af3","name":"400 Bad Request - Employer already exists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"employer_code\":\"ABCD\",\r\n    \"name\": \"EmployerTest\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employers"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Employer already created.\"\n}"}],"_postman_id":"99d7d41e-8f1d-4c51-973b-b7d8ecb7a4f8"},{"name":"Employers","id":"f6945fe9-299e-472c-9a7d-10cf7ff8c1d5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"GET","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"}],"url":"{{api_url}}/employers","description":"<blockquote>\n<p>To perform this request it is necessary to attach the TLS certificates as described <a href=\"#3-important\">here</a>.</p>\n</blockquote>\n<p>This endpoint allows the client to retrieve the employers ingested by RAIN's system. In order to insert new employers, use the <code>POST</code> endpoint.</p>\n<h3 id=\"query-params\">Query params</h3>\n<p>If no query params is specified, all the employers will be returned.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Fields</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>employer_code</td>\n<td>false</td>\n<td>string</td>\n<td>Unique ID for the employer on the client side.  <br />Use this field to get an employer by the employer code.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["employers"],"host":["{{api_url}}"],"query":[{"disabled":true,"description":{"content":"<p>Unique ID for the employer on the client side</p>\n","type":"text/plain"},"key":"employer_code","value":"{employer_code}"}],"variable":[]}},"response":[{"id":"e6016ba9-59ae-4feb-bcd4-cf0e0ed9e3b3","name":"200 Success","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"url":{"raw":"{{api_url}}/employers","host":["{{api_url}}"],"path":["employers"],"query":[{"key":"employer_code","value":"{employer_code}","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"employers\": [\n        {\n            \"name\": \"EmployerTest\",\n            \"employer_code\": \"employertest\",\n            \"status\": \"INACTIVE\",\n            \"created_at\": \"2022-07-01T18:04:46.002000+00:00\",\n            \"updated_at\": \"2022-07-01T18:04:46.002000+00:00\"\n        }\n    ]\n}"},{"id":"bf9cd6fa-0563-432d-ae04-4882c16f9edc","name":"429 Rate Limit Exceeded","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"url":{"raw":"{{api_url}}/employers","host":["{{api_url}}"],"path":["employers"],"query":[{"key":"employer_code","value":"{employer_code}","type":"text","disabled":true}]}},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"Rate Limit Exceeded!"},{"id":"bf26c6e4-4a14-4ab1-9f5d-de78b6909298","name":"400 Bad Request - Invalid parameter","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"url":{"raw":"{{api_url}}/employers?employer_code","host":["{{api_url}}"],"path":["employers"],"query":[{"key":"employer_code","value":null}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"employer_code\": [\n            \"Value should not be empty.\"\n        ]\n    }\n}"}],"_postman_id":"f6945fe9-299e-472c-9a7d-10cf7ff8c1d5"},{"name":"Employer update","id":"0d8ded45-e332-405a-acef-2d513b7ea575","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"PUT","header":[{"key":"x-api-key","value":"{{x_api_key}}","type":"text"}],"body":{"mode":"raw","raw":"{    \r\n    \"name\": \"EmployerTest\",\r\n    \"status\": \"ACTIVE\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{api_url}}/employers/:employer_code","description":"<blockquote>\n<p>To perform this request it is necessary to attach the TLS certificates as described <a href=\"#3-important\">here</a>.</p>\n</blockquote>\n<p>This endpoint allows the client to update employer's <code>name</code> and <code>status</code>. If there is an attempt of update an employer with the same <code>name</code> of an employer that was already ingested, an error will be returned.</p>\n<p><strong>Remember to update the employer</strong> <strong><code>status</code></strong> <strong>to</strong> <strong><code>ACTIVE</code></strong> <strong>once it's ready to be listed to its employees on RAIN's system.</strong></p>\n<h3 id=\"path-variables\">Path variables</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Fields</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>employer_code</td>\n<td>true</td>\n<td>string</td>\n<td>Unique ID for the employer on the client side.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body\">Request body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Fields</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>false</td>\n<td>string</td>\n<td>Employer's name</td>\n</tr>\n<tr>\n<td>status</td>\n<td>false</td>\n<td>string</td>\n<td>Determines if the employer is active or inactive.  <br />Enum:  <br /><code>ACTIVE</code>, <code>INACTIVE</code></td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["employers",":employer_code"],"host":["{{api_url}}"],"query":[],"variable":[{"id":"c9f7cfe8-c7f6-4561-b78f-72aab5f7a1cd","description":{"content":"<p>Unique ID for the employer on the client side</p>\n","type":"text/plain"},"type":"any","value":"","key":"employer_code"}]}},"response":[{"id":"ae847963-fef5-451f-9485-6cc35721310d","name":"200 Success","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{    \r\n    \"name\": \"EmployerTest\",\r\n    \"status\": \"ACTIVE\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{api_url}}/employers/:employer_code","host":["{{api_url}}"],"path":["employers",":employer_code"],"variable":[{"key":"employer_code","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Employer updated.\"\n}"},{"id":"8f57969a-f17b-4108-b019-70d88d1e1b1a","name":"429 Rate Limit Exceeded","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{    \r\n    \"name\": \"EmployerTest\",\r\n    \"status\": \"ACTIVE\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{api_url}}/employers/:employer_code","host":["{{api_url}}"],"path":["employers",":employer_code"],"variable":[{"key":"employer_code","value":null}]}},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"Rate Limit Exceeded!"},{"id":"4bc5d829-69b1-4a78-8fcd-be85625c2dd0","name":"400 Bad Request - Invalid Data","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{    \r\n    \"name\": \"\",\r\n    \"status\":\"\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{api_url}}/employers/:employer_code","host":["{{api_url}}"],"path":["employers",":employer_code"],"variable":[{"key":"employer_code","value":null}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"name\": [\n            \"Value should not be empty.\"\n        ],\n        \"status\": [\n            \"Value should not be empty.\"\n        ]\n    }\n}"},{"id":"f39265b0-617c-4c94-a68c-ec2b5f6d61ff","name":"400 Bad Request - Employer name already exists","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{    \r\n    \"name\": \"EmployerTest\",\r\n    \"status\": \"ACTIVE\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{api_url}}/employers/:employer_code","host":["{{api_url}}"],"path":["employers",":employer_code"],"variable":[{"key":"employer_code","value":null}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Employer with this name already exists.\"\n}"},{"id":"3168f166-5988-4d88-8341-97bc264dcc60","name":"404 Not found - Employer not found","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"x-api-key","type":"text"}],"body":{"mode":"raw","raw":"{    \r\n    \"name\": \"EmployerTest\",\r\n    \"status\": \"ACTIVE\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{api_url}}/employers/:employer_code","host":["{{api_url}}"],"path":["employers",":employer_code"],"variable":[{"key":"employer_code","value":null}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Employer not found.\"\n}"}],"_postman_id":"0d8ded45-e332-405a-acef-2d513b7ea575"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"1cfe473e-6847-4df0-8605-9e2c584520b5"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"19a951b4-7dab-48ec-94a6-2981cb9cab8b"}}]}