Metadata-Version: 2.1
Name: affixapi
Version: 1.0.0
Summary: Affix API
Home-page: 
Author: OpenAPI Generator community
Author-email: developers@affixapi.com
Keywords: OpenAPI,OpenAPI-Generator,Affix API
Requires-Python: >=3.6
License-File: LICENSE
Requires-Dist: urllib3>=1.25.3
Requires-Dist: python-dateutil

    The affixapi.com API documentation.  # Introduction Affix API is an OAuth 2.1 application that allows developers to access customer data, without developers needing to manage or maintain integrations; or collect login credentials or API keys from users for these third party systems.  # OAuth 2.1 Affix API follows the [OAuth 2.1 spec](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-08).  As an OAuth application, Affix API handles not only both the collection of sensitive user credentials or API keys, but also builds and maintains the integrations with the providers, so you don&#39;t have to.  # How to obtain an access token in order to get started, you must:   - register a &#x60;client_id&#x60;   - direct your user to the sign in flow  (&#x60;https://connect.affixapi.com&#x60;     [with the appropriate query     parameters](https://github.com/affixapi/starter-kit/tree/master/connect))   - capture &#x60;authorization_code&#x60; we will send to your redirect URI after     the sign in flow is complete and exchange that &#x60;authorization_code&#x60; for     a Bearer token  # Sandbox keys (developer mode) ### dev &#x60;&#x60;&#x60; eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2lkZW50aXR5IiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3BheXJ1bnMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvcGF5cnVucy86cGF5cnVuX2lkIiwiLzIwMjMtMDMtMDEvZGV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yJdLCJ0b2tlbiI6IjI5YjFjYTg4LWNlNjktNDgyZC1iNGZjLTkzMWMzZmJkYWM4ZSIsImlhdCI6MTcwMjkyMTA4MywiaXNzIjoicHVibGljYXBpLWludGVybWVkaWF0ZS5wcm9kLmVuZ2luZWVyaW5nLmFmZml4YXBpLmNvbSIsInN1YiI6ImRldmVsb3BlciIsImF1ZCI6IjA4QkIwODFFLUQ5QUI0RDE0LThERjk5MjMzLTY2NjE1Q0U5In0.2zdpFAmiyYiYk6MOcbXNUwwR4M1Fextnaac340x54AidiWXCyw-u9KeavbqfYF6q8a9kcDLrxhJ8Wc_3tIzuVw&#39; \   &#39;https://api.affixapi.com/2023-03-01/developer/employees&#39; &#x60;&#x60;&#x60;  # Webhooks An exciting feature for HR/Payroll modes are webhooks.  If enabled, your &#x60;webhook_uri&#x60; is set on your &#x60;client_id&#x60; for the respective environment: &#x60;dev | prod&#x60;  Webhooks are configured to make live requests to the underlying integration 1x/hr, and if a difference is detected since the last request, we will send a request to your &#x60;webhook_uri&#x60; with this shape:  &#x60;&#x60;&#x60; {    added: &lt;api.v20230301.Employees&gt;[     &lt;api.v20230301.Employee&gt;{       ...,       date_of_birth: &#39;2010-08-06&#39;,       display_full_name: &#39;Daija Rogahn&#39;,       employee_number: &#39;57993&#39;,       employment_status: &#39;pending&#39;,       employment_type: &#39;other&#39;,       employments: [         {           currency: &#39;eur&#39;,           effective_date: &#39;2022-02-25&#39;,           employment_type: &#39;other&#39;,           job_title: &#39;Dynamic Implementation Manager&#39;,           pay_frequency: &#39;semimonthly&#39;,           pay_period: &#39;YEAR&#39;,           pay_rate: 96000,         },       ],       first_name: &#39;Daija&#39;,       ...     }   ],   removed: [],   updated: [     &lt;api.v20230301.Employee&gt;{       ...,       date_of_birth: &#39;2009-11-09&#39;,       display_full_name: &#39;Lourdes Stiedemann&#39;,       employee_number: &#39;63189&#39;,       employment_status: &#39;leave&#39;,       employment_type: &#39;full_time&#39;,       employments: [         {           currency: &#39;gbp&#39;,           effective_date: &#39;2023-01-16&#39;,           employment_type: &#39;full_time&#39;,           job_title: &#39;Forward Brand Planner&#39;,           pay_frequency: &#39;semimonthly&#39;,           pay_period: &#39;YEAR&#39;,           pay_rate: 86000,         },       ],       first_name: &#39;Lourdes&#39;,     }   ] } &#x60;&#x60;&#x60;  the following headers will be sent with webhook requests:  &#x60;&#x60;&#x60; x-affix-api-signature: ab8474e609db95d5df3adc39ea3add7a7544bd215c5c520a30a650ae93a2fba7  x-affix-api-origin:  webhooks-employees-webhook  user-agent:  affixapi.com &#x60;&#x60;&#x60;  Before trusting the payload, you should sign the payload and verify the signature matches the signature sent by the &#x60;affixapi.com&#x60; service.  This secures that the data sent to your &#x60;webhook_uri&#x60; is from the &#x60;affixapi.com&#x60; server.  The signature is created by combining the signing secret (your &#x60;client_secret&#x60;) with the body of the request sent using a standard HMAC-SHA256 keyed hash.  The signature can be created via:   - create an &#x60;HMAC&#x60; with your &#x60;client_secret&#x60;   - update the &#x60;HMAC&#x60; with the payload   - get the hex digest -&gt; this is the signature  Sample &#x60;typescript&#x60; code that follows this recipe:  &#x60;&#x60;&#x60; import { createHmac } from &#39;crypto&#39;;  export const computeSignature &#x3D; ({   str,   signingSecret, }: {   signingSecret: string;   str: string; }): string &#x3D;&gt; {   const hmac &#x3D; createHmac(&#39;sha256&#39;, signingSecret);   hmac.update(str);   const signature &#x3D; hmac.digest(&#39;hex&#39;);    return signature; }; &#x60;&#x60;&#x60;  ## Rate limits Open endpoints (not gated by an API key) (applied at endpoint level):   - 15 requests every 1 minute (by IP address)   - 25 requests every 5 minutes (by IP address)  Gated endpoints (require an API key) (applied at endpoint level):   - 40 requests every 1 minute (by IP address)   - 40 requests every 5 minutes (by &#x60;client_id&#x60;)  Things to keep in mind:   - Open endpoints (not gated by an API key) will likely be called by your     users, not you, so rate limits generally would not apply to you.   - As a developer, rate limits are applied at the endpoint granularity.     - For example, say the rate limits below are 10 requests per minute by ip.       from that same ip, within 1 minute, you get:       - 10 requests per minute on &#x60;/orders&#x60;,       - another 10 requests per minute on &#x60;/items&#x60;,       - and another 10 requests per minute on &#x60;/identity&#x60;,       - for a total of 30 requests per minute.   # noqa: E501
    
